Class SolutionCollector

java.lang.Object

public class SolutionCollector
extends SearchMonitor
This class is the root class of all solution collectors.
It implements a basic query API to be used independently
of the collector used.
  • Constructor Details

    • SolutionCollector

      protected SolutionCollector​(long cPtr, boolean cMemoryOwn)
    • SolutionCollector

      public SolutionCollector​(Solver solver, Assignment assignment)
    • SolutionCollector

      public SolutionCollector​(Solver solver)
  • Method Details

    • getCPtr

      protected static long getCPtr​(SolutionCollector obj)
    • finalize

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

      public void delete()
      Overrides:
      delete in class SearchMonitor
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class BaseObject
    • add

      public void add​(IntVar var)
      Add API.
    • add

      public void add​(IntVar[] vars)
    • add

      public void add​(IntervalVar var)
    • add

      public void add​(IntervalVar[] vars)
    • add

      public void add​(SequenceVar var)
    • add

      public void add​(SequenceVar[] vars)
    • addObjective

      public void addObjective​(IntVar objective)
    • enterSearch

      public void enterSearch()
      Beginning of the search.
      Overrides:
      enterSearch in class SearchMonitor
    • solutionCount

      public int solutionCount()
      Returns how many solutions were stored during the search.
    • solution

      public Assignment solution​(int n)
      Returns the nth solution.
    • wallTime

      public long wallTime​(int n)
      Returns the wall time in ms for the nth solution.
    • branches

      public long branches​(int n)
      Returns the number of branches when the nth solution was found.
    • failures

      public long failures​(int n)
      Returns the number of failures encountered at the time of the nth
      solution.
    • objectiveValue

      public long objectiveValue​(int n)
      Returns the objective value of the nth solution.
    • value

      public long value​(int n, IntVar var)
      This is a shortcut to get the Value of 'var' in the nth solution.
    • startValue

      public long startValue​(int n, IntervalVar var)
      This is a shortcut to get the StartValue of 'var' in the nth solution.
    • endValue

      public long endValue​(int n, IntervalVar var)
      This is a shortcut to get the EndValue of 'var' in the nth solution.
    • durationValue

      public long durationValue​(int n, IntervalVar var)
      This is a shortcut to get the DurationValue of 'var' in the nth solution.
    • performedValue

      public long performedValue​(int n, IntervalVar var)
      This is a shortcut to get the PerformedValue of 'var' in the nth solution.
    • forwardSequence

      public int[] forwardSequence​(int n, SequenceVar var)
      This is a shortcut to get the ForwardSequence of 'var' in the
      nth solution. The forward sequence is the list of ranked interval
      variables starting from the start of the sequence.
    • backwardSequence

      public int[] backwardSequence​(int n, SequenceVar var)
      This is a shortcut to get the BackwardSequence of 'var' in the
      nth solution. The backward sequence is the list of ranked interval
      variables starting from the end of the sequence.
    • unperformed

      public int[] unperformed​(int n, SequenceVar var)
      This is a shortcut to get the list of unperformed of 'var' in the
      nth solution.