Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ constraint_solver/

operations_research::OptimizeVar Class Reference

This class encapsulate an objective. More...

#include <constraint_solver.h>

Inheritance diagram for operations_research::OptimizeVar:

operations_research::SearchMonitor operations_research::BaseObject

List of all members.

Public Member Functions

 OptimizeVar (Solver *const s, bool maximize, IntVar *const a, int64 step)
 Objective Management.
virtual ~OptimizeVar ()
int64 best () const
 Returns the best value found during search.
IntVarVar () const
 Returns the variable that is optimized.
virtual void EnterSearch ()
 Internal methods.
virtual void RestartSearch ()
 Restart the search.
virtual void RefuteDecision (Decision *d)
 Before refuting the Decision.
virtual bool AtSolution ()
 This method is called when a valid solution is found.
virtual bool AcceptSolution ()
 This method is called when a solution is found.
virtual string Print () const
virtual string DebugString () const
virtual void Accept (ModelVisitor *const visitor) const
 Accepts the given model visitor.
void ApplyBound ()


Detailed Description

This class encapsulate an objective.

Todo:
TODO(user): Refactor this into an Objective class:
  • print methods for AtNode and AtSolution.
  • support for weighted objective and lexicographical objective.
Objective Management It requires the direction (minimize or maximize), the variable to optimize and the improvement step.

Definition at line 3936 of file constraint_solver.h.


Constructor & Destructor Documentation

operations_research::OptimizeVar::OptimizeVar ( Solver *const   s,
bool  maximize,
IntVar *const   a,
int64  step 
)

Objective Management.

Definition at line 2416 of file search.cc.

operations_research::OptimizeVar::~OptimizeVar (  )  [virtual]

Definition at line 2425 of file search.cc.


Member Function Documentation

int64 operations_research::OptimizeVar::best (  )  const [inline]

Returns the best value found during search.

Definition at line 3942 of file constraint_solver.h.

IntVar* operations_research::OptimizeVar::Var (  )  const [inline]

Returns the variable that is optimized.

Definition at line 3945 of file constraint_solver.h.

void operations_research::OptimizeVar::EnterSearch (  )  [virtual]

Internal methods.

Reimplemented from operations_research::SearchMonitor.

Definition at line 2427 of file search.cc.

void operations_research::OptimizeVar::RestartSearch (  )  [virtual]

Restart the search.

Reimplemented from operations_research::SearchMonitor.

Definition at line 2436 of file search.cc.

void operations_research::OptimizeVar::RefuteDecision ( Decision d  )  [virtual]

Before refuting the Decision.

Reimplemented from operations_research::SearchMonitor.

Definition at line 2450 of file search.cc.

bool operations_research::OptimizeVar::AtSolution (  )  [virtual]

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.

Definition at line 2466 of file search.cc.

bool operations_research::OptimizeVar::AcceptSolution (  )  [virtual]

This method is called when a solution is found.

It asserts of the solution is valid. A value of false indicate that the solution should be discarded.

Reimplemented from operations_research::SearchMonitor.

Definition at line 2454 of file search.cc.

string operations_research::OptimizeVar::Print (  )  const [virtual]

Definition at line 2479 of file search.cc.

string operations_research::OptimizeVar::DebugString (  )  const [virtual]

Reimplemented from operations_research::BaseObject.

Definition at line 2483 of file search.cc.

void operations_research::OptimizeVar::Accept ( ModelVisitor *const   visitor  )  const [virtual]

Accepts the given model visitor.

Reimplemented from operations_research::SearchMonitor.

Definition at line 2496 of file search.cc.

void operations_research::OptimizeVar::ApplyBound (  ) 

Definition at line 2440 of file search.cc.


The documentation for this class was generated from the following files: