Class KLinearRelaxationSolver

java.lang.Object
com.artelys.kalis.KRelaxationSolver
com.artelys.kalis.KLinearRelaxationSolver
Direct Known Subclasses:
KClpLinearRelaxationSolver, KCoinLinearRelaxationSolver

public class KLinearRelaxationSolver extends KRelaxationSolver
This class is intended as a superclass for linear relaxation solvers.

Such a solver must be provided with
- a linear relaxation (KLinearRelaxation)
- an objective variable (KNumVar)
- a sense for optimization (KProblem::Sense).

It relies on a LP/MIP solver to provide the following information:
- a value (a bound for the relaxed problem, cf method getBound())
- a solution, possibly not feasible for the original problem, but which can be used to guide the search for a feasible solution
- if the problem is LP, reduced costs (that can be used for instance in the "reduced cost fixing" procedure).

Since:
2016.1
  • Constructor Details

    • KLinearRelaxationSolver

      protected KLinearRelaxationSolver(long cPtr, boolean cMemoryOwn)
  • Method Details

    • getCPtr

      protected static long getCPtr(KLinearRelaxationSolver obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class KRelaxationSolver
    • delete

      public void delete()
      Overrides:
      delete in class KRelaxationSolver
    • getReducedCost

      public double getReducedCost(KNumVar var)
    • getReducedCost

      public double getReducedCost(KAuxVar var)
    • writeLP

      public int writeLP(String filename)
      Writes the current problem to a file (in lp format).

      Parameters:
      filename - the path of the file to write (existing file is overwrited, if any)
      Returns:
      return code is reserved for future use (for now, errors are trapped by an exception)
    • generateCuts

      public void generateCuts(KLinearRelaxation relaxation)
      Cut generation
      Overrides:
      generateCuts in class KRelaxationSolver