C++ Reference: class SolutionCollector

Note: This documentation is automatically generated.

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

Return type: void

Arguments: IntVar* const var

Add API.

Add

Return type: void

Arguments: const std::vector<IntVar*>& vars

Add

Return type: void

Arguments: IntervalVar* const var

Add

Return type: void

Arguments: const std::vector<IntervalVar*>& vars

Add

Return type: void

Arguments: SequenceVar* const var

Add

Return type: void

Arguments: const std::vector<SequenceVar*>& vars

AddObjective

Return type: void

Arguments: IntVar* const objective

BackwardSequence

Return type: const std::vector<int>&

Arguments: int n, SequenceVar* const 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.

branches

Return type: int64_t

Arguments: int n

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

DebugString

Return type: std::string

DurationValue

Return type: int64_t

Arguments: int n, IntervalVar* const var

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

EndValue

Return type: int64_t

Arguments: int n, IntervalVar* const var

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

EnterSearch

Return type: void

Beginning of the search.

failures

Return type: int64_t

Arguments: int n

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

ForwardSequence

Return type: const std::vector<int>&

Arguments: int n, SequenceVar* const 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.

objective_value

Return type: int64_t

Arguments: int n

Returns the objective value of the nth solution.

PerformedValue

Return type: int64_t

Arguments: int n, IntervalVar* const var

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

solution

Return type: Assignment*

Arguments: int n

Returns the nth solution.

solution_count

Return type: int

Returns how many solutions were stored during the search.

SolutionCollector

Arguments: Solver* const solver, const Assignment* assignment

SolutionCollector

Return type: explicit

Arguments: Solver* const solver

~SolutionCollector

StartValue

Return type: int64_t

Arguments: int n, IntervalVar* const var

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

Unperformed

Return type: const std::vector<int>&

Arguments: int n, SequenceVar* const var

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

Value

Return type: int64_t

Arguments: int n, IntVar* const var

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

wall_time

Return type: int64_t

Arguments: int n

Returns the wall time in ms for the nth solution.