Class KSolution

java.lang.Object
com.artelys.kalis.KSolution

public class KSolution extends Object
This class represents a solution of a KProblem.

Example :

KProblem p(...);
KSolver solver(p);
solver.solve();
KSolution sol = p.getSolution();


Since:
2016.1
See Also:
KProblem

  • Field Details

    • swigCMemOwn

      protected transient boolean swigCMemOwn
  • Constructor Details

    • KSolution

      protected KSolution(long cPtr, boolean cMemoryOwn)
    • KSolution

      public KSolution()
      Constructor
    • KSolution

      public KSolution(com.artelys.kalis.SWIGTYPE_p_KSolution_I solution)
    • KSolution

      public KSolution(KSolution toCopy)
  • Method Details

    • getCPtr

      protected static long getCPtr(KSolution obj)
    • finalize

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

      public void delete()
    • getCopyPtr

      public KSolution getCopyPtr()
    • getValue

      public int getValue(KIntVar intVar)
      Return the instantiation of a variable in the solution
    • getValue

      public double getValue(KFloatVar floatVar)
      Return the instantiation of a variable in the solution
    • getValue

      public double getValue(KNumVar numVar)
      Return the instantiation of the variable in the solution
    • getObjectiveValue

      public double getObjectiveValue()
      Return the objective value of the solution if applicable
    • setAsTarget

      public void setAsTarget()
    • print

      public void print()
      Pretty print the solution
    • print

      public void print(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
    • printResume

      public void printResume(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
    • printResume

      public void printResume()
    • printProblem

      public void printProblem()
    • getIntAttrib

      public int getIntAttrib(int attrib)
    • getDblAttrib

      public double getDblAttrib(int attrib)
    • hasObjective

      public boolean hasObjective()
    • getHashCode

      public double getHashCode()