Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
DemonProfiler (Solver *const solver) | |
~DemonProfiler () override | |
int64_t | CurrentTime () const |
void | BeginConstraintInitialPropagation (Constraint *const constraint) override |
Propagation events. | |
void | EndConstraintInitialPropagation (Constraint *const constraint) override |
void | BeginNestedConstraintInitialPropagation (Constraint *const constraint, Constraint *const delayed) override |
void | EndNestedConstraintInitialPropagation (Constraint *const constraint, Constraint *const delayed) override |
void | RegisterDemon (Demon *const demon) override |
void | BeginDemonRun (Demon *const demon) override |
void | EndDemonRun (Demon *const demon) override |
void | StartProcessingIntegerVariable (IntVar *const var) override |
void | EndProcessingIntegerVariable (IntVar *const var) override |
void | PushContext (const std::string &context) override |
void | PopContext () override |
void | BeginFail () override |
Just when the failure occurs. | |
void | RestartSearch () override |
Restarts a search and clears all previously collected information. | |
void | SetMin (IntExpr *const expr, int64_t new_min) override |
IntExpr modifiers. | |
void | SetMax (IntExpr *const expr, int64_t new_max) override |
void | SetRange (IntExpr *const expr, int64_t new_min, int64_t new_max) override |
void | SetMin (IntVar *const var, int64_t new_min) override |
IntVar modifiers. | |
void | SetMax (IntVar *const var, int64_t new_max) override |
void | SetRange (IntVar *const var, int64_t new_min, int64_t new_max) override |
void | RemoveValue (IntVar *const var, int64_t value) override |
void | SetValue (IntVar *const var, int64_t value) override |
void | RemoveInterval (IntVar *const var, int64_t imin, int64_t imax) override |
void | SetValues (IntVar *const var, const std::vector< int64_t > &values) override |
void | RemoveValues (IntVar *const var, const std::vector< int64_t > &values) override |
void | SetStartMin (IntervalVar *const var, int64_t new_min) override |
IntervalVar modifiers. | |
void | SetStartMax (IntervalVar *const var, int64_t new_max) override |
void | SetStartRange (IntervalVar *const var, int64_t new_min, int64_t new_max) override |
void | SetEndMin (IntervalVar *const var, int64_t new_min) override |
void | SetEndMax (IntervalVar *const var, int64_t new_max) override |
void | SetEndRange (IntervalVar *const var, int64_t new_min, int64_t new_max) override |
void | SetDurationMin (IntervalVar *const var, int64_t new_min) override |
void | SetDurationMax (IntervalVar *const var, int64_t new_max) override |
void | SetDurationRange (IntervalVar *const var, int64_t new_min, int64_t new_max) override |
void | SetPerformed (IntervalVar *const var, bool value) override |
void | RankFirst (SequenceVar *const var, int index) override |
SequenceVar modifiers. | |
void | RankNotFirst (SequenceVar *const var, int index) override |
void | RankLast (SequenceVar *const var, int index) override |
void | RankNotLast (SequenceVar *const var, int index) override |
void | RankSequence (SequenceVar *const var, const std::vector< int > &rank_first, const std::vector< int > &rank_last, const std::vector< int > &unperformed) override |
void | AddFakeRun (Demon *const demon, int64_t start_time, int64_t end_time, bool is_fail) |
Useful for unit tests. | |
void | PrintOverview (Solver *const solver, absl::string_view filename) |
Exports collected data as human-readable text. | |
void | ExportInformation (const Constraint *const constraint, int64_t *const fails, int64_t *const initial_propagation_runtime, int64_t *const demon_invocations, int64_t *const total_demon_runtime, int *demons) |
Export Information. | |
void | ExportInformation (const DemonRuns *const demon_runs, int64_t *const demon_invocations, int64_t *const fails, int64_t *const total_demon_runtime, double *const mean_demon_runtime, double *const median_demon_runtime, double *const stddev_demon_runtime) |
void | Install () override |
std::string | DebugString () const override |
Public Member Functions inherited from operations_research::PropagationMonitor | |
PropagationMonitor (Solver *solver) | |
-------— Propagation Monitor --------— | |
~PropagationMonitor () override | |
std::string | DebugString () const override |
void | Install () override |
Install itself on the solver. | |
Public Member Functions inherited from operations_research::SearchMonitor | |
SearchMonitor (Solver *const s) | |
SearchMonitor (const SearchMonitor &)=delete | |
This type is neither copyable nor movable. | |
SearchMonitor & | operator= (const SearchMonitor &)=delete |
~SearchMonitor () override | |
virtual void | EnterSearch () |
Beginning of the search. | |
virtual void | ExitSearch () |
End of the search. | |
virtual void | BeginNextDecision (DecisionBuilder *b) |
Before calling DecisionBuilder::Next. | |
virtual void | EndNextDecision (DecisionBuilder *b, Decision *d) |
After calling DecisionBuilder::Next, along with the returned decision. | |
virtual void | ApplyDecision (Decision *d) |
Before applying the decision. | |
virtual void | RefuteDecision (Decision *d) |
Before refuting the decision. | |
virtual void | AfterDecision (Decision *d, bool apply) |
virtual void | EndFail () |
After completing the backtrack. | |
virtual void | BeginInitialPropagation () |
Before the initial propagation. | |
virtual void | EndInitialPropagation () |
After the initial propagation. | |
virtual bool | AcceptSolution () |
virtual bool | AtSolution () |
virtual void | NoMoreSolutions () |
When the search tree is finished. | |
virtual bool | LocalOptimum () |
virtual bool | AcceptDelta (Assignment *delta, Assignment *deltadelta) |
virtual void | AcceptNeighbor () |
After accepting a neighbor during local search. | |
virtual void | AcceptUncheckedNeighbor () |
After accepting an unchecked neighbor during local search. | |
virtual bool | IsUncheckedSolutionLimitReached () |
virtual void | PeriodicCheck () |
Periodic call to check limits in long running methods. | |
virtual int | ProgressPercent () |
virtual void | Accept (ModelVisitor *visitor) const |
Accepts the given model visitor. | |
Solver * | solver () const |
Public Member Functions inherited from operations_research::BaseObject | |
BaseObject () | |
BaseObject (const BaseObject &)=delete | |
This type is neither copyable nor movable. | |
BaseObject & | operator= (const BaseObject &)=delete |
virtual | ~BaseObject () |
Additional Inherited Members | |
Static Public Attributes inherited from operations_research::SearchMonitor | |
static constexpr int | kNoProgress = -1 |
Protected Member Functions inherited from operations_research::SearchMonitor | |
void | ListenToEvent (Solver::MonitorEvent event) |
DemonProfiler manages the profiling of demons and allows access to gathered data. Add this class as a parameter to Solver and access its information after the end of a search.
Definition at line 53 of file demon_profiler.cc.
|
inlineexplicit |
Definition at line 55 of file demon_profiler.cc.
|
inlineoverride |
Definition at line 61 of file demon_profiler.cc.
|
inline |
Useful for unit tests.
Definition at line 248 of file demon_profiler.cc.
|
inlineoverridevirtual |
Propagation events.
Implements operations_research::PropagationMonitor.
Definition at line 72 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 149 of file demon_profiler.cc.
|
inlineoverridevirtual |
Just when the failure occurs.
active_constraint_ can be non null in case of initial propagation.
Reimplemented from operations_research::SearchMonitor.
Definition at line 180 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 101 of file demon_profiler.cc.
|
inline |
In microseconds.
Definition at line 68 of file demon_profiler.cc.
|
inlineoverridevirtual |
Reimplemented from operations_research::BaseObject.
Definition at line 423 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 88 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 162 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 116 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 176 of file demon_profiler.cc.
|
inline |
|
inline |
Compute mean.
Compute median.
Compute standard deviation.
Definition at line 367 of file demon_profiler.cc.
|
inlineoverridevirtual |
The demon_profiler is added by default on the main propagation monitor. It just needs to be added to the search monitors at the start of the search.
Reimplemented from operations_research::SearchMonitor.
Definition at line 421 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 178 of file demon_profiler.cc.
|
inline |
Exports collected data as human-readable text.
Definition at line 261 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 177 of file demon_profiler.cc.
|
inlineoverridevirtual |
SequenceVar modifiers.
Implements operations_research::PropagationMonitor.
Definition at line 239 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 241 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 240 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 242 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 243 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 131 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 220 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 218 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 223 of file demon_profiler.cc.
|
inlineoverridevirtual |
Restarts a search and clears all previously collected information.
Reimplemented from operations_research::SearchMonitor.
Definition at line 201 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 235 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 234 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 236 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 231 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 230 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 232 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 211 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 216 of file demon_profiler.cc.
|
inlineoverridevirtual |
IntExpr modifiers.
Implements operations_research::PropagationMonitor.
Definition at line 210 of file demon_profiler.cc.
|
inlineoverridevirtual |
IntVar modifiers.
Implements operations_research::PropagationMonitor.
Definition at line 215 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 238 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 212 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 217 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 227 of file demon_profiler.cc.
|
inlineoverridevirtual |
IntervalVar modifiers.
Implements operations_research::PropagationMonitor.
Definition at line 226 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 228 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 219 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 221 of file demon_profiler.cc.
|
inlineoverridevirtual |
Implements operations_research::PropagationMonitor.
Definition at line 175 of file demon_profiler.cc.