Class IntegerSolver.ModelIntegration

java.lang.Object
org.ojalgo.optimisation.ExpressionsBasedModel.Integration<IntegerSolver>
org.ojalgo.optimisation.integer.IntegerSolver.ModelIntegration
All Implemented Interfaces:
Optimisation, Optimisation.Integration<ExpressionsBasedModel, IntegerSolver>
Enclosing class:
IntegerSolver

public static final class IntegerSolver.ModelIntegration extends ExpressionsBasedModel.Integration<IntegerSolver>
  • Constructor Details

    • ModelIntegration

      public ModelIntegration()
  • Method Details

    • build

      public IntegerSolver build(ExpressionsBasedModel model)
      Description copied from interface: Optimisation.Integration
      An 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
    • getSolverSense

      protected Optimisation.Sense getSolverSense()
      Description copied from class: ExpressionsBasedModel.Integration
      Some solvers are hard-wired to solve either min or max problems. (Typically ojAlgo's built-in solvers are implemented that way.) If that's the case this method should indicate what the convention is. Returning null indicates there is no convention/hard-wire, and the solver will either min or max depending what's specified.

      When the solver's sense is hard-wired some things, like the sign of the optimal value or the reduced costs, may have to be adjusted.

      Since this was a late addition to this class a default implementation was needed, and null is commonly the correct return value for 3:d party solvers.

      Overrides:
      getSolverSense in class ExpressionsBasedModel.Integration<IntegerSolver>