module analysis::linearprogramming::LLLinearProgramming
rascal-0.40.16
Low level linear programming interface.
Usage
import analysis::linearprogramming::LLLinearProgramming;
Dependencies
import List;
import util::Maybe;
alias LLCoefficients
list[num]
data LLObjectiveFun
data LLObjectiveFun
= llObjFun(LLCoefficients coefficients, num const)
;
function llObjFun
LLObjectiveFun llObjFun(LLCoefficients coefficients)
data ConstraintType
data ConstraintType
= leq()
| eq()
| geq()
;
data LLConstraint
data LLConstraint
= llConstraint(LLCoefficients coefficients,
ConstraintType ctype, num const)
;
alias LLConstraints
set[LLConstraint]
alias LLVariableVals
list[num]
data LLSolution
data LLSolution
= llSolution(LLVariableVals varVals, num funVal)
;
function llRunObjFul
num llRunObjFul(LLObjectiveFun f, LLVariableVals vals)
function padToSize
list[num] padToSize(list[num] l, int s)
function normalize
tuple[LLConstraints constraints, LLObjectiveFun f]
normalize(LLConstraints constraints, LLObjectiveFun f)
function llOptimize
Maybe[LLSolution]
llOptimize(bool minimize, bool nonZero,
LLConstraints constraints, LLObjectiveFun f)