![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Base atomic objective monitor class. All non-composite metaheuristics derive from this.
Definition at line 4595 of file constraint_solver.h.
#include <constraint_solver.h>
Public Member Functions | |
| ObjectiveMonitor (Solver *solver, const std::vector< bool > &maximize, std::vector< IntVar * > vars, std::vector< int64_t > steps) | |
| ~ObjectiveMonitor () override | |
| ObjectiveMonitor (const ObjectiveMonitor &)=delete | |
| ObjectiveMonitor & | operator= (const ObjectiveMonitor &)=delete |
| IntVar * | ObjectiveVar (int index) const override |
| IntVar * | MinimizationVar (int index) const override |
| int64_t | Step (int index) const override |
| bool | Maximize (int index) const override |
| int64_t | BestValue (int index) const override |
| int | Size () const override |
| void | EnterSearch () override |
| Beginning of the search. | |
| bool | AtSolution () override |
| bool | AcceptDelta (Assignment *delta, Assignment *deltadelta) override |
| void | Accept (ModelVisitor *visitor) const override |
| Accepts the given model visitor. | |
| Public Member Functions inherited from operations_research::BaseObjectiveMonitor | |
| BaseObjectiveMonitor (Solver *solver) | |
| ~BaseObjectiveMonitor () override | |
| BaseObjectiveMonitor (const BaseObjectiveMonitor &)=delete | |
| BaseObjectiveMonitor & | operator= (const BaseObjectiveMonitor &)=delete |
| bool | is_active () const |
| void | set_active (bool is_active) |
| 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 | RestartSearch () |
| Restart 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 | BeginFail () |
| Just when the failure occurs. | |
| 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 void | NoMoreSolutions () |
| When the search tree is finished. | |
| virtual bool | LocalOptimum () |
| 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 | Install () |
| A search monitors adds itself on the active search. | |
| 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 ()=default |
| virtual std::string | DebugString () const |
Protected Member Functions | |
| const std::vector< IntVar * > & | objective_vars () const |
| const std::vector< IntVar * > & | minimization_vars () const |
| int64_t | BestInternalValue (int index) const |
| int64_t | CurrentInternalValue (int index) const |
| void | SetCurrentInternalValue (int index, int64_t value) |
| template<typename T> | |
| void | MakeMinimizationVarsLessOrEqualWithSteps (const T &upper_bounds) |
| template<typename T> | |
| IntVar * | MakeMinimizationVarsLessOrEqualWithStepsStatus (const T &upper_bounds) |
| bool | CurrentInternalValuesAreConstraining () const |
| Protected Member Functions inherited from operations_research::SearchMonitor | |
| void | ListenToEvent (Solver::MonitorEvent event) |
Protected Attributes | |
| bool | found_initial_solution_ |
Friends | |
| class | Solver |
Additional Inherited Members | |
| Static Public Attributes inherited from operations_research::SearchMonitor | |
| static constexpr int | kNoProgress = -1 |
| operations_research::ObjectiveMonitor::ObjectiveMonitor | ( | Solver * | solver, |
| const std::vector< bool > & | maximize, | ||
| std::vector< IntVar * > | vars, | ||
| std::vector< int64_t > | steps ) |
Necessary to enforce strict lexical less-than constraint.
|
inlineoverride |
Definition at line 4599 of file constraint_solver.h.
|
delete |
|
overridevirtual |
Accepts the given model visitor.
Reimplemented from operations_research::SearchMonitor.
|
overridevirtual |
Reimplemented from operations_research::SearchMonitor.
|
overridevirtual |
This method is called when a valid solution is found. If the return value is true, then search will resume after. If the result is false, then search will stop there.
Reimplemented from operations_research::SearchMonitor.
Reimplemented in operations_research::OptimizeVar.
|
inlineprotected |
Definition at line 4629 of file constraint_solver.h.
|
inlineoverridevirtual |
Implements operations_research::BaseObjectiveMonitor.
Definition at line 4614 of file constraint_solver.h.
|
inlineprotected |
Definition at line 4630 of file constraint_solver.h.
|
protected |
|
overridevirtual |
Beginning of the search.
-------— Search Monitor -------—
Reimplemented from operations_research::SearchMonitor.
|
inlineprotected |
Definition at line 4637 of file constraint_solver.h.
|
inlineprotected |
Definition at line 4650 of file constraint_solver.h.
|
inlineoverridevirtual |
Implements operations_research::BaseObjectiveMonitor.
Definition at line 4611 of file constraint_solver.h.
|
inlineprotected |
Definition at line 4626 of file constraint_solver.h.
|
inlineoverridevirtual |
Implements operations_research::BaseObjectiveMonitor.
Definition at line 4607 of file constraint_solver.h.
|
inlineprotected |
Definition at line 4625 of file constraint_solver.h.
|
inlineoverridevirtual |
Implements operations_research::BaseObjectiveMonitor.
Definition at line 4604 of file constraint_solver.h.
|
delete |
|
inlineprotected |
Definition at line 4633 of file constraint_solver.h.
|
inlineoverridevirtual |
Implements operations_research::BaseObjectiveMonitor.
Definition at line 4618 of file constraint_solver.h.
|
inlineoverridevirtual |
Implements operations_research::BaseObjectiveMonitor.
Definition at line 4610 of file constraint_solver.h.
|
friend |
Definition at line 4671 of file constraint_solver.h.
|
protected |
Definition at line 4668 of file constraint_solver.h.