Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.SolutionCollector Class Reference
Inheritance diagram for com.google.ortools.constraintsolver.SolutionCollector:
com.google.ortools.constraintsolver.SearchMonitor com.google.ortools.constraintsolver.BaseObject

Public Member Functions

synchronized void delete ()
 
 SolutionCollector (Solver solver, Assignment assignment)
 
 SolutionCollector (Solver solver)
 
void install ()
 
String toString ()
 
void add (IntVar var)
 
void add (IntVar[] vars)
 
void add (IntervalVar var)
 
void add (IntervalVar[] vars)
 
void add (SequenceVar var)
 
void add (SequenceVar[] vars)
 
void addObjective (IntVar objective)
 
void AddObjectives (IntVar[] objectives)
 
void enterSearch ()
 
int solutionCount ()
 
boolean has_solution ()
 
Assignment solution (int n)
 
Assignment last_solution_or_null ()
 
long wallTime (int n)
 
long branches (int n)
 
long failures (int n)
 
long objectiveValue (int n)
 
long ObjectiveValueFromIndex (int n, int index)
 
long value (int n, IntVar var)
 
long startValue (int n, IntervalVar var)
 
long endValue (int n, IntervalVar var)
 
long durationValue (int n, IntervalVar var)
 
long performedValue (int n, IntervalVar var)
 
int[] forwardSequence (int n, SequenceVar var)
 
int[] backwardSequence (int n, SequenceVar var)
 
int[] unperformed (int n, SequenceVar var)
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.SearchMonitor
void swigReleaseOwnership ()
 
void swigTakeOwnership ()
 
void keepAliveDecisionBuilder (DecisionBuilder db)
 
 SearchMonitor (Solver s)
 
void restartSearch ()
 
void exitSearch ()
 
void beginNextDecision (DecisionBuilder b)
 
void endNextDecision (DecisionBuilder b, Decision d)
 
void applyDecision (Decision d)
 
void refuteDecision (Decision d)
 
void afterDecision (Decision d, boolean apply)
 
void beginFail ()
 
void endFail ()
 
void beginInitialPropagation ()
 
void endInitialPropagation ()
 
boolean acceptSolution ()
 
boolean atSolution ()
 
void noMoreSolutions ()
 
boolean localOptimum ()
 
boolean acceptDelta (Assignment delta, Assignment deltadelta)
 
void acceptNeighbor ()
 
void AcceptUncheckedNeighbor ()
 
boolean IsUncheckedSolutionLimitReached ()
 
void periodicCheck ()
 
int progressPercent ()
 
void accept (ModelVisitor visitor)
 
Solver solver ()
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject ()
 

Protected Member Functions

 SolutionCollector (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.SearchMonitor
 SearchMonitor (long cPtr, boolean cMemoryOwn)
 
void swigDirectorDisconnect ()
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject (long cPtr, boolean cMemoryOwn)
 

Static Protected Member Functions

static long getCPtr (SolutionCollector obj)
 
static long swigRelease (SolutionCollector obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.SearchMonitor
static long getCPtr (SearchMonitor obj)
 
static long swigRelease (SearchMonitor obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
static long getCPtr (BaseObject obj)
 
static long swigRelease (BaseObject obj)
 

Additional Inherited Members

- Static Public Attributes inherited from com.google.ortools.constraintsolver.SearchMonitor
static final int kNoProgress = mainJNI.SearchMonitor_kNoProgress_get()
 
- Protected Attributes inherited from com.google.ortools.constraintsolver.BaseObject
transient boolean swigCMemOwn
 

Detailed Description

This class is the root class of all solution collectors.
It implements a basic query API to be used independently
of the collector used.

Definition at line 16 of file SolutionCollector.java.

Constructor & Destructor Documentation

◆ SolutionCollector() [1/3]

com.google.ortools.constraintsolver.SolutionCollector.SolutionCollector ( long cPtr,
boolean cMemoryOwn )
protected

Definition at line 19 of file SolutionCollector.java.

◆ SolutionCollector() [2/3]

com.google.ortools.constraintsolver.SolutionCollector.SolutionCollector ( Solver solver,
Assignment assignment )

Definition at line 56 of file SolutionCollector.java.

◆ SolutionCollector() [3/3]

com.google.ortools.constraintsolver.SolutionCollector.SolutionCollector ( Solver solver)

Definition at line 60 of file SolutionCollector.java.

Member Function Documentation

◆ add() [1/6]

void com.google.ortools.constraintsolver.SolutionCollector.add ( IntervalVar var)

Definition at line 83 of file SolutionCollector.java.

◆ add() [2/6]

void com.google.ortools.constraintsolver.SolutionCollector.add ( IntervalVar[] vars)

Definition at line 87 of file SolutionCollector.java.

◆ add() [3/6]

void com.google.ortools.constraintsolver.SolutionCollector.add ( IntVar var)

Add API.

Definition at line 75 of file SolutionCollector.java.

◆ add() [4/6]

void com.google.ortools.constraintsolver.SolutionCollector.add ( IntVar[] vars)

Definition at line 79 of file SolutionCollector.java.

◆ add() [5/6]

void com.google.ortools.constraintsolver.SolutionCollector.add ( SequenceVar var)

Definition at line 91 of file SolutionCollector.java.

◆ add() [6/6]

void com.google.ortools.constraintsolver.SolutionCollector.add ( SequenceVar[] vars)

Definition at line 95 of file SolutionCollector.java.

◆ addObjective()

void com.google.ortools.constraintsolver.SolutionCollector.addObjective ( IntVar objective)

Definition at line 99 of file SolutionCollector.java.

◆ AddObjectives()

void com.google.ortools.constraintsolver.SolutionCollector.AddObjectives ( IntVar[] objectives)

Definition at line 103 of file SolutionCollector.java.

◆ backwardSequence()

int[] com.google.ortools.constraintsolver.SolutionCollector.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.

Definition at line 229 of file SolutionCollector.java.

◆ branches()

long com.google.ortools.constraintsolver.SolutionCollector.branches ( int n)

Returns the number of branches when the nth solution was found.

Definition at line 154 of file SolutionCollector.java.

◆ delete()

synchronized void com.google.ortools.constraintsolver.SolutionCollector.delete ( )

Reimplemented from com.google.ortools.constraintsolver.SearchMonitor.

Definition at line 45 of file SolutionCollector.java.

◆ durationValue()

long com.google.ortools.constraintsolver.SolutionCollector.durationValue ( int n,
IntervalVar var )

This is a shortcut to get the DurationValue of 'var' in the nth solution.

Definition at line 204 of file SolutionCollector.java.

◆ endValue()

long com.google.ortools.constraintsolver.SolutionCollector.endValue ( int n,
IntervalVar var )

This is a shortcut to get the EndValue of 'var' in the nth solution.

Definition at line 197 of file SolutionCollector.java.

◆ enterSearch()

void com.google.ortools.constraintsolver.SolutionCollector.enterSearch ( )

Beginning of the search.

Reimplemented from com.google.ortools.constraintsolver.SearchMonitor.

Definition at line 110 of file SolutionCollector.java.

◆ failures()

long com.google.ortools.constraintsolver.SolutionCollector.failures ( int n)

Returns the number of failures encountered at the time of the nth
solution.

Definition at line 162 of file SolutionCollector.java.

◆ finalize()

void com.google.ortools.constraintsolver.SolutionCollector.finalize ( )
protected

Reimplemented from com.google.ortools.constraintsolver.SearchMonitor.

Definition at line 41 of file SolutionCollector.java.

◆ forwardSequence()

int[] com.google.ortools.constraintsolver.SolutionCollector.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.

Definition at line 220 of file SolutionCollector.java.

◆ getCPtr()

static long com.google.ortools.constraintsolver.SolutionCollector.getCPtr ( SolutionCollector obj)
staticprotected

Definition at line 24 of file SolutionCollector.java.

◆ has_solution()

boolean com.google.ortools.constraintsolver.SolutionCollector.has_solution ( )

Returns whether any solutions were stored during the search.

Definition at line 124 of file SolutionCollector.java.

◆ install()

void com.google.ortools.constraintsolver.SolutionCollector.install ( )

Registers itself on the solver such that it gets notified of the search
and propagation events. Override to incrementally install listeners for
specific events.

Reimplemented from com.google.ortools.constraintsolver.SearchMonitor.

Definition at line 64 of file SolutionCollector.java.

◆ last_solution_or_null()

Assignment com.google.ortools.constraintsolver.SolutionCollector.last_solution_or_null ( )

Returns the last solution if there are any, nullptr otherwise.

Definition at line 139 of file SolutionCollector.java.

◆ objectiveValue()

long com.google.ortools.constraintsolver.SolutionCollector.objectiveValue ( int n)

Returns the objective value of the nth solution.

Definition at line 169 of file SolutionCollector.java.

◆ ObjectiveValueFromIndex()

long com.google.ortools.constraintsolver.SolutionCollector.ObjectiveValueFromIndex ( int n,
int index )

Returns the value of the index-th objective of the nth solution.

Definition at line 176 of file SolutionCollector.java.

◆ performedValue()

long com.google.ortools.constraintsolver.SolutionCollector.performedValue ( int n,
IntervalVar var )

This is a shortcut to get the PerformedValue of 'var' in the nth solution.

Definition at line 211 of file SolutionCollector.java.

◆ solution()

Assignment com.google.ortools.constraintsolver.SolutionCollector.solution ( int n)

Returns the nth solution.

Definition at line 131 of file SolutionCollector.java.

◆ solutionCount()

int com.google.ortools.constraintsolver.SolutionCollector.solutionCount ( )

Returns how many solutions were stored during the search.

Definition at line 117 of file SolutionCollector.java.

◆ startValue()

long com.google.ortools.constraintsolver.SolutionCollector.startValue ( int n,
IntervalVar var )

This is a shortcut to get the StartValue of 'var' in the nth solution.

Definition at line 190 of file SolutionCollector.java.

◆ swigRelease()

static long com.google.ortools.constraintsolver.SolutionCollector.swigRelease ( SolutionCollector obj)
staticprotected

Definition at line 28 of file SolutionCollector.java.

◆ toString()

String com.google.ortools.constraintsolver.SolutionCollector.toString ( )

Reimplemented from com.google.ortools.constraintsolver.BaseObject.

Definition at line 68 of file SolutionCollector.java.

◆ unperformed()

int[] com.google.ortools.constraintsolver.SolutionCollector.unperformed ( int n,
SequenceVar var )

This is a shortcut to get the list of unperformed of 'var' in the
nth solution.

Definition at line 237 of file SolutionCollector.java.

◆ value()

long com.google.ortools.constraintsolver.SolutionCollector.value ( int n,
IntVar var )

This is a shortcut to get the Value of 'var' in the nth solution.

Definition at line 183 of file SolutionCollector.java.

◆ wallTime()

long com.google.ortools.constraintsolver.SolutionCollector.wallTime ( int n)

Returns the wall time in ms for the nth solution.

Definition at line 147 of file SolutionCollector.java.


The documentation for this class was generated from the following file: