public class SolutionCollector extends SearchMonitor
kNoProgress
swigCMemOwn
Constructor and Description |
---|
SolutionCollector(long cPtr,
boolean cMemoryOwn) |
SolutionCollector(Solver solver) |
SolutionCollector(Solver solver,
Assignment assignment) |
Modifier and Type | Method and Description |
---|---|
void |
add(IntervalVar var) |
void |
add(IntervalVar[] vars) |
void |
add(IntVar var)
Add API.
|
void |
add(IntVar[] vars) |
void |
add(SequenceVar var) |
void |
add(SequenceVar[] vars) |
void |
addObjective(IntVar objective) |
void |
AddObjectives(IntVar[] objectives) |
int[] |
backwardSequence(int n,
SequenceVar var)
This is a shortcut to get the BackwardSequence of 'var' in the
nth solution. |
long |
branches(int n)
Returns the number of branches when the nth solution was found.
|
void |
delete() |
long |
durationValue(int n,
IntervalVar var)
This is a shortcut to get the DurationValue of 'var' in the nth solution.
|
long |
endValue(int n,
IntervalVar var)
This is a shortcut to get the EndValue of 'var' in the nth solution.
|
void |
enterSearch()
Beginning of the search.
|
long |
failures(int n)
Returns the number of failures encountered at the time of the nth
solution. |
protected void |
finalize() |
int[] |
forwardSequence(int n,
SequenceVar var)
This is a shortcut to get the ForwardSequence of 'var' in the
nth solution. |
static long |
getCPtr(SolutionCollector obj) |
boolean |
has_solution()
Returns whether any solutions were stored during the search.
|
void |
install()
Registers itself on the solver such that it gets notified of the search
and propagation events. |
Assignment |
last_solution_or_null()
Returns the last solution if there are any, nullptr otherwise.
|
long |
objectiveValue(int n)
Returns the objective value of the nth solution.
|
long |
ObjectiveValueFromIndex(int n,
int index)
Returns the value of the index-th objective of the nth solution.
|
long |
performedValue(int n,
IntervalVar var)
This is a shortcut to get the PerformedValue of 'var' in the nth solution.
|
Assignment |
solution(int n)
Returns the nth solution.
|
int |
solutionCount()
Returns how many solutions were stored during the search.
|
long |
startValue(int n,
IntervalVar var)
This is a shortcut to get the StartValue of 'var' in the nth solution.
|
static long |
swigRelease(SolutionCollector obj) |
java.lang.String |
toString() |
int[] |
unperformed(int n,
SequenceVar var)
This is a shortcut to get the list of unperformed of 'var' in the
nth solution. |
long |
value(int n,
IntVar var)
This is a shortcut to get the Value of 'var' in the nth solution.
|
long |
wallTime(int n)
Returns the wall time in ms for the nth solution.
|
accept, acceptDelta, acceptNeighbor, acceptSolution, AcceptUncheckedNeighbor, afterDecision, applyDecision, atSolution, beginFail, beginInitialPropagation, beginNextDecision, endFail, endInitialPropagation, endNextDecision, exitSearch, getCPtr, IsUncheckedSolutionLimitReached, keepAliveDecisionBuilder, localOptimum, noMoreSolutions, periodicCheck, progressPercent, refuteDecision, restartSearch, solver, swigDirectorDisconnect, swigRelease, swigReleaseOwnership, swigTakeOwnership
getCPtr, swigRelease
public SolutionCollector(long cPtr, boolean cMemoryOwn)
public SolutionCollector(Solver solver, Assignment assignment)
public SolutionCollector(Solver solver)
public static long getCPtr(SolutionCollector obj)
public static long swigRelease(SolutionCollector obj)
protected void finalize()
finalize
in class SearchMonitor
public void delete()
delete
in class SearchMonitor
public void install()
SearchMonitor
install
in class SearchMonitor
public java.lang.String toString()
toString
in class BaseObject
public void add(IntVar var)
public void add(IntVar[] vars)
public void add(IntervalVar var)
public void add(IntervalVar[] vars)
public void add(SequenceVar var)
public void add(SequenceVar[] vars)
public void addObjective(IntVar objective)
public void AddObjectives(IntVar[] objectives)
public void enterSearch()
enterSearch
in class SearchMonitor
public int solutionCount()
public boolean has_solution()
public Assignment solution(int n)
public Assignment last_solution_or_null()
public long wallTime(int n)
public long branches(int n)
public long failures(int n)
public long objectiveValue(int n)
public long ObjectiveValueFromIndex(int n, int index)
public long value(int n, IntVar var)
public long startValue(int n, IntervalVar var)
public long endValue(int n, IntervalVar var)
public long durationValue(int n, IntervalVar var)
public long performedValue(int n, IntervalVar var)
public int[] forwardSequence(int n, SequenceVar var)
public int[] backwardSequence(int n, SequenceVar var)
public int[] unperformed(int n, SequenceVar var)
Copyright © 2025. All rights reserved.