Class LinearConstraint<CONSTANTS extends IConstants>

java.lang.Object
org.optsol.jmip.core.model.constraints.AbstractConstraint<com.google.ortools.linearsolver.MPSolver,CONSTANTS,com.google.ortools.linearsolver.MPVariable,com.google.ortools.linearsolver.MPConstraint>
org.optsol.jmip.linearsolver.model.constraints.LinearConstraint<CONSTANTS>
All Implemented Interfaces:
IConstraint<CONSTANTS,com.google.ortools.linearsolver.MPVariable,com.google.ortools.linearsolver.MPSolver>

public abstract class LinearConstraint<CONSTANTS extends IConstants> extends AbstractConstraint<com.google.ortools.linearsolver.MPSolver,CONSTANTS,com.google.ortools.linearsolver.MPVariable,com.google.ortools.linearsolver.MPConstraint>
  • Constructor Details

    • LinearConstraint

      protected LinearConstraint(String... constraintIndexNames)
  • Method Details

    • generateConstraint

      protected final com.google.ortools.linearsolver.MPConstraint generateConstraint(com.google.ortools.linearsolver.MPSolver solver, CONSTANTS constants, IVariableProvider<com.google.ortools.linearsolver.MPVariable> variables, AbstractConstraint<com.google.ortools.linearsolver.MPSolver,CONSTANTS,com.google.ortools.linearsolver.MPVariable,com.google.ortools.linearsolver.MPConstraint>.ConstraintKey constraintKey) throws Exception
      Specified by:
      generateConstraint in class AbstractConstraint<com.google.ortools.linearsolver.MPSolver,CONSTANTS extends IConstants,com.google.ortools.linearsolver.MPVariable,com.google.ortools.linearsolver.MPConstraint>
      Throws:
      Exception
    • configureConstraint

      protected abstract void configureConstraint(com.google.ortools.linearsolver.MPConstraint constraint, CONSTANTS constants, IVariableProvider<com.google.ortools.linearsolver.MPVariable> variables, AbstractConstraint<com.google.ortools.linearsolver.MPSolver,CONSTANTS,com.google.ortools.linearsolver.MPVariable,com.google.ortools.linearsolver.MPConstraint>.ConstraintKey constraintKey) throws Exception
      Throws:
      Exception
    • removeConstraints

      protected final void removeConstraints(com.google.ortools.linearsolver.MPSolver solver, Collection<com.google.ortools.linearsolver.MPConstraint> constraints)
      Specified by:
      removeConstraints in class AbstractConstraint<com.google.ortools.linearsolver.MPSolver,CONSTANTS extends IConstants,com.google.ortools.linearsolver.MPVariable,com.google.ortools.linearsolver.MPConstraint>
    • getDualOfConstraint

      protected double getDualOfConstraint(com.google.ortools.linearsolver.MPSolver solver, com.google.ortools.linearsolver.MPConstraint constraint)
      Specified by:
      getDualOfConstraint in class AbstractConstraint<com.google.ortools.linearsolver.MPSolver,CONSTANTS extends IConstants,com.google.ortools.linearsolver.MPVariable,com.google.ortools.linearsolver.MPConstraint>