Class KSolutionContainer

java.lang.Object
com.artelys.kalis.KSolutionContainer

public class KSolutionContainer extends Object
This class represent a pool of solution of a KProblem.
Example:

KProblem p(...);
KSolver solver(p);
solver.optimize();
KSolution sol = p.getSolutionContainer().getBestSolution();


Since:
2016.1
See Also:
KProblem
  • Field Details

    • swigCMemOwn

      protected transient boolean swigCMemOwn
  • Constructor Details

    • KSolutionContainer

      protected KSolutionContainer(long cPtr, boolean cMemoryOwn)
    • KSolutionContainer

      public KSolutionContainer()
    • KSolutionContainer

      public KSolutionContainer(KSolutionContainer toCopy)
    • KSolutionContainer

      public KSolutionContainer(com.artelys.kalis.SWIGTYPE_p_KSolutionContainer_I solutionContainer)
  • Method Details

    • getCPtr

      protected static long getCPtr(KSolutionContainer obj)
    • finalize

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

      public void delete()
    • add

      public void add(KSolution solution)
      Add a new solution of the solution container
    • getNumberOfSolutions

      public int getNumberOfSolutions()
      Return the number of solutions found
    • clear

      public void clear()
      Remove all solutions from the solution container
    • problemIsSolved

      public boolean problemIsSolved()
      Return true if the problem as at least one solution
    • getLastSolution

      public KSolution getLastSolution()
      Return the last solution found
    • getBestSolution

      public KSolution getBestSolution()
      Return the best solution found (if applicable)
    • getSolution

      public KSolution getSolution(int index)
      Return solution by index