- java.lang.Object
-
- org.ojalgo.optimisation.ExpressionsBasedModel.Integration<SimplexTableauSolver>
-
- org.ojalgo.optimisation.linear.LinearSolver.OldIntegration
-
- All Implemented Interfaces:
Optimisation,Optimisation.Integration<ExpressionsBasedModel,SimplexTableauSolver>
- Enclosing class:
- LinearSolver
static final class LinearSolver.OldIntegration extends ExpressionsBasedModel.Integration<SimplexTableauSolver>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.optimisation.Optimisation
Optimisation.Constraint, Optimisation.ConstraintType, Optimisation.Integration<M extends Optimisation.Model,S extends Optimisation.Solver>, Optimisation.Model, Optimisation.Objective, Optimisation.Options, Optimisation.ProblemStructure, Optimisation.Result, Optimisation.Sense, Optimisation.Solver, Optimisation.State
-
-
Constructor Summary
Constructors Constructor Description OldIntegration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SimplexTableauSolverbuild(ExpressionsBasedModel model)An integration must be able to instantiate a solver that can handle (any) model instance.protected intgetIndexInSolver(ExpressionsBasedModel model, Variable variable)booleanisCapable(ExpressionsBasedModel model)Optimisation.ResulttoModelState(Optimisation.Result solverState, ExpressionsBasedModel model)private static ArrayR064toModelVariableValues(Access1D<?> solverVariableValues, ExpressionsBasedModel model, ArrayR064 modelVariableValues)Optimisation.ResulttoSolverState(Optimisation.Result modelState, ExpressionsBasedModel model)This default implementation assumes the solver state and model state are identical, and simply returns the supplied model state.-
Methods inherited from class org.ojalgo.optimisation.ExpressionsBasedModel.Integration
expandFreeToFull, extractSolverState, isSwitch, newValidator, reduceFullToFree, setSwitch, withCapabilityPredicate, withOptionsModifier
-
-
-
-
Method Detail
-
toModelVariableValues
private static ArrayR064 toModelVariableValues(Access1D<?> solverVariableValues, ExpressionsBasedModel model, ArrayR064 modelVariableValues)
-
build
public SimplexTableauSolver build(ExpressionsBasedModel model)
Description copied from interface:Optimisation.IntegrationAn integration must be able to instantiate a solver that can handle (any) model instance.
-
isCapable
public boolean isCapable(ExpressionsBasedModel model)
- Returns:
- true if this solver (integration) can handle the input model
-
toModelState
public Optimisation.Result toModelState(Optimisation.Result solverState, ExpressionsBasedModel model)
Description copied from class:ExpressionsBasedModel.IntegrationThe reverse ofExpressionsBasedModel.Integration.toSolverState(Optimisation.Result, ExpressionsBasedModel).- Specified by:
toModelStatein interfaceOptimisation.Integration<ExpressionsBasedModel,SimplexTableauSolver>- Overrides:
toModelStatein classExpressionsBasedModel.Integration<SimplexTableauSolver>- See Also:
ExpressionsBasedModel.Integration.reduceFullToFree(Optimisation.Result, ExpressionsBasedModel, DenseArray.Factory),ExpressionsBasedModel.Integration.expandFreeToFull(Optimisation.Result, ExpressionsBasedModel, DenseArray.Factory)
-
toSolverState
public Optimisation.Result toSolverState(Optimisation.Result modelState, ExpressionsBasedModel model)
Description copied from class:ExpressionsBasedModel.IntegrationThis default implementation assumes the solver state and model state are identical, and simply returns the supplied model state.In any case where the set of variables present in the solver does not match what's in the model one-to-one, this method and its reciprocal
ExpressionsBasedModel.Integration.toModelState(Optimisation.Result, ExpressionsBasedModel)needs to be overridden with custom mapping implementations.A very common case is when the solver only works with free (not eliminated by the pre-solver) variables. There are helper methods to do just that.
- Specified by:
toSolverStatein interfaceOptimisation.Integration<ExpressionsBasedModel,SimplexTableauSolver>- Overrides:
toSolverStatein classExpressionsBasedModel.Integration<SimplexTableauSolver>- See Also:
ExpressionsBasedModel.Integration.reduceFullToFree(Optimisation.Result, ExpressionsBasedModel, DenseArray.Factory),ExpressionsBasedModel.Integration.expandFreeToFull(Optimisation.Result, ExpressionsBasedModel, DenseArray.Factory)
-
getIndexInSolver
protected int getIndexInSolver(ExpressionsBasedModel model, Variable variable)
- Overrides:
getIndexInSolverin classExpressionsBasedModel.Integration<SimplexTableauSolver>- Returns:
- The index with which one can reference parameters related to this variable in the solver.
-
-