abstract class AbstractMPSolver extends StrictLogging
Abstract class that should be extended to define a linear-quadratic solver.
- Alphabetic
- By Inheritance
- AbstractMPSolver
- StrictLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AbstractMPSolver()
Abstract Value Members
-
abstract
def
addConstraint(mpConstraint: MPConstraint): Unit
Add a mathematical programming constraint to the solver.
Add a mathematical programming constraint to the solver.
- mpConstraint
the mathematical programming constraint
-
abstract
def
addObjective(objective: Expression, minimize: Boolean): Unit
Add objective expression to be optimized by the solver.
Add objective expression to be optimized by the solver.
- objective
the expression to be optimized
- minimize
flag for minimization instead of maximization
-
abstract
def
buildProblem(nbRows: Int, nbCols: Int): Unit
Problem builder, should configure the solver and append mathematical model variables.
Problem builder, should configure the solver and append mathematical model variables.
- nbRows
rows in the model
- nbCols
number of variables in the model
-
abstract
def
getValue(colId: Int): Double
Get value of the variable in the specified position.
Get value of the variable in the specified position. Solution should exist in order for a value to exist.
- colId
position of the variable
- returns
the value of the variable in the solution
-
abstract
val
nbCols: Int
Number of columns / variables in the model
-
abstract
val
nbRows: Int
Number of rows in the model
-
abstract
val
objectiveValue: Double
Objective value
-
abstract
def
release(): Unit
Release the memory of this solver
-
abstract
def
setBinary(colId: Int): Unit
Set the column / variable as an binary integer variable
Set the column / variable as an binary integer variable
- colId
position of the variable
-
abstract
def
setBounds(colId: Int, lower: Double, upper: Double): Unit
Set bounds of variable in the specified position.
Set bounds of variable in the specified position.
- colId
position of the variable
- lower
domain lower bound
- upper
domain upper bound
-
abstract
def
setFloat(colId: Int): Unit
Set the column/variable as a float variable
Set the column/variable as a float variable
- colId
position of the variable
-
abstract
def
setInteger(colId: Int): Unit
Set the column/variable as an integer variable
Set the column/variable as an integer variable
- colId
position of the variable
-
abstract
def
setTimeout(limit: Int): Unit
Set a time limit for solver optimization.
Set a time limit for solver optimization. After the limit is reached the solver stops running.
- limit
the time limit
-
abstract
def
setUnboundLowerBound(colId: Int): Unit
Set lower bound to unbounded (infinite)
Set lower bound to unbounded (infinite)
- colId
position of the variable
-
abstract
def
setUnboundUpperBound(colId: Int): Unit
Set upper bound to unbounded (infinite)
Set upper bound to unbounded (infinite)
- colId
position of the variable
-
abstract
val
solution: Array[Double]
Solution, one entry for each column / variable
-
abstract
def
solveProblem(preSolve: PreSolve = PreSolve.DISABLE): ProblemStatus
Solve the problem.
Solve the problem.
- preSolve
pre-solving mode
- returns
status code indicating the nature of the solution
Concrete 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
addAllConstraints(constraints: ArrayBuffer[MPConstraint]): Unit
Add all given mathematical programming constraints to the solver.
Add all given mathematical programming constraints to the solver.
- constraints
array buffer containing the constraints
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
logger: Logger
- Attributes
- protected
- Definition Classes
- StrictLogging
-
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )