This class encapsulates an objective. It requires the direction (minimize or maximize), the variable to optimize, and the improvement step.
Definition at line 4694 of file constraint_solver.h.
|
| | OptimizeVar (Solver *solver, bool maximize, IntVar *var, int64_t step) |
| | OptimizeVar (Solver *solver, const std::vector< bool > &maximize, std::vector< IntVar * > vars, std::vector< int64_t > steps) |
| | ~OptimizeVar () override |
| int64_t | best () const |
| | Returns the best value found during search.
|
| IntVar * | var () const |
| | Returns the variable that is optimized.
|
| void | SetOnOptimalFoundcallback (std::function< void(int64_t)> on_optimal_found) |
| void | BeginNextDecision (DecisionBuilder *db) override |
| | Internal methods.
|
| void | RefuteDecision (Decision *d) override |
| | Before refuting the decision.
|
| bool | AtSolution () override |
| bool | AcceptSolution () override |
| virtual std::string | Name () const |
| std::string | DebugString () const override |
| void | ApplyBound () |
| | 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 | AcceptDelta (Assignment *delta, Assignment *deltadelta) override |
| void | Accept (ModelVisitor *visitor) const override |
| | Accepts the given model visitor.
|
| | BaseObjectiveMonitor (Solver *solver) |
| | ~BaseObjectiveMonitor () override |
| | BaseObjectiveMonitor (const BaseObjectiveMonitor &)=delete |
| BaseObjectiveMonitor & | operator= (const BaseObjectiveMonitor &)=delete |
| bool | is_active () const |
| void | set_active (bool is_active) |
| | SearchMonitor (Solver *const s) |
| | SearchMonitor (const SearchMonitor &)=delete |
| SearchMonitor & | operator= (const SearchMonitor &)=delete |
| | ~SearchMonitor () override |
| virtual void | RestartSearch () |
| | Restart the search.
|
| virtual void | ExitSearch () |
| | End of the search.
|
| 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 | 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 void | NoMoreSolutions () |
| | When the search tree is finished.
|
| virtual bool | AtLocalOptimum () |
| 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 () |
| Solver * | solver () const |
| | BaseObject () |
| | BaseObject (const BaseObject &)=delete |
| BaseObject & | operator= (const BaseObject &)=delete |
| virtual | ~BaseObject ()=default |