case class MPModel(solverLib: SolverLib = SolverLib.oJSolver) extends StrictLogging with Product with Serializable
Defines the mathematical programming model we are about to solve.
- solverLib
a solver library (default is ojSolver)
- Alphabetic
- By Inheritance
- MPModel
- Serializable
- Product
- Equals
- StrictLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MPModel(solverLib: SolverLib = SolverLib.oJSolver)
- solverLib
a solver library (default is ojSolver)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def add(constraint: Constraint): MPConstraint
- constraint
a constraint to add
- returns
an MPConstraint
- See also
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def checkConstraints(tol: Double = 10e-6): Boolean
Check if all constraints in the model are satisfied by the given solution.
Check if all constraints in the model are satisfied by the given solution.
- tol
a tolerance threshold
- returns
true if all constraints are satisfied, false otherwise
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val constraints: ArrayBuffer[MPConstraint]
- Attributes
- protected
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getStatus: SolutionStatus
- returns
the status of the solution found for the model
- def getVarValue(idx: Int): Option[Double]
- idx
the index of the variable
- returns
the solution value for the variable
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val logger: Logger
- Attributes
- protected
- Definition Classes
- StrictLogging
- def maximize(expression: Expression): MPModel
- expression
an expression to maximize
- returns
the model
- def minimize(expression: Expression): MPModel
- expression
an expression to minimize
- returns
the model
- var minimize: Boolean
- Attributes
- protected
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- var objective: Expression
- Attributes
- protected
- def objectiveValue: Double
- returns
the objective value of the underlying solver
- def optimize(expression: Expression, minimize: Boolean): MPModel
- Attributes
- protected
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- var reOptimize: Boolean
- Attributes
- protected
- def register(variable: MPVar): Int
Register a variable to the model
Register a variable to the model
- variable
an MPVar to register
- returns
the index of the variable
- See also
- def release(): Unit
Release the memory of the underlying solver.
- var solution: HashMap[Int, Double]
- Attributes
- protected
- lazy val solver: MPSolver
- Attributes
- protected
- val solverLib: SolverLib
- def start(timeLimit: Int = Int.MaxValue, preSolve: PreSolve = DISABLED): Boolean
Start the underlying solver.
Start the underlying solver.
- timeLimit
a time limit for the solver
- preSolve
a pre solve strategy
- returns
true if there is a solution, false otherwise
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def variable(idx: Int): Try[MPVar]
- idx
the index of the variable
- returns
the MPVar on the given index
- See also
- val variables: ArrayBuffer[MPVar]
- Attributes
- protected
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()