Module ojalgo
Package org.ojalgo.optimisation
Class ConfiguredIntegration<S extends Optimisation.Solver>
- java.lang.Object
-
- org.ojalgo.optimisation.ExpressionsBasedModel.Integration<S>
-
- org.ojalgo.optimisation.ConfiguredIntegration<S>
-
- All Implemented Interfaces:
Optimisation,Optimisation.Integration<ExpressionsBasedModel,S>
final class ConfiguredIntegration<S extends Optimisation.Solver> extends ExpressionsBasedModel.Integration<S>
-
-
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
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Predicate<ExpressionsBasedModel>myCapabilityPredicateprivate ExpressionsBasedModel.Integration<S>myDelegateprivate java.util.function.Consumer<Optimisation.Options>myOptionsModifier
-
Constructor Summary
Constructors Constructor Description ConfiguredIntegration(ExpressionsBasedModel.Integration<S> delegate, java.util.function.Predicate<ExpressionsBasedModel> capabilityPredicate, java.util.function.Consumer<Optimisation.Options> optionsModifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sbuild(ExpressionsBasedModel model)An integration must be able to instantiate a solver that can handle (any) model instance.booleanisCapable(ExpressionsBasedModel model)Optimisation.ResulttoModelState(Optimisation.Result solverState, ExpressionsBasedModel model)Convert solver state to model state.Optimisation.ResulttoSolverState(Optimisation.Result modelState, ExpressionsBasedModel model)Convert model state to solver state.-
Methods inherited from class org.ojalgo.optimisation.ExpressionsBasedModel.Integration
extractSolverState, getIndexInSolver, isSwitch, newValidator, setSwitch, withCapabilityPredicate, withOptionsModifier
-
-
-
-
Field Detail
-
myCapabilityPredicate
private final java.util.function.Predicate<ExpressionsBasedModel> myCapabilityPredicate
-
myDelegate
private final ExpressionsBasedModel.Integration<S extends Optimisation.Solver> myDelegate
-
myOptionsModifier
private final java.util.function.Consumer<Optimisation.Options> myOptionsModifier
-
-
Constructor Detail
-
ConfiguredIntegration
ConfiguredIntegration(ExpressionsBasedModel.Integration<S> delegate, java.util.function.Predicate<ExpressionsBasedModel> capabilityPredicate, java.util.function.Consumer<Optimisation.Options> optionsModifier)
-
-
Method Detail
-
build
public S 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 interface:Optimisation.IntegrationConvert solver state to model state. Transforming the solution (set of variable values) is the main concern. Adjusting the objective function value (if needed) is best handled elsewhere, and is not required here.The required behaviour here depends on how
Optimisation.Integration.build(Optimisation.Model)is implemented, and is the reverse mapping ofOptimisation.Integration.toSolverState(Optimisation.Result, Optimisation.Model).- Specified by:
toModelStatein interfaceOptimisation.Integration<ExpressionsBasedModel,S extends Optimisation.Solver>- Overrides:
toModelStatein classExpressionsBasedModel.Integration<S extends Optimisation.Solver>
-
toSolverState
public Optimisation.Result toSolverState(Optimisation.Result modelState, ExpressionsBasedModel model)
Description copied from interface:Optimisation.IntegrationConvert model state to solver state. Transforming the solution (set of variable values) is the main concern. Adjusting the objective function value (if needed) is best handled elsewhere, and is not required here.The required behaviour here depends on how
Optimisation.Integration.build(Optimisation.Model)is implemented, and is the reverse mapping ofOptimisation.Integration.toModelState(Result, Optimisation.Model).- Specified by:
toSolverStatein interfaceOptimisation.Integration<ExpressionsBasedModel,S extends Optimisation.Solver>- Overrides:
toSolverStatein classExpressionsBasedModel.Integration<S extends Optimisation.Solver>
-
-