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

operations_research::SolutionCollector Class Reference

Solution Collectors. More...

#include <constraint_solver.h>

Inheritance diagram for operations_research::SolutionCollector:

operations_research::SearchMonitor operations_research::BaseObject

List of all members.

Public Member Functions

 SolutionCollector (Solver *const s, const Assignment *assignment)
 Solution Collectors.
 SolutionCollector (Solver *const s)
virtual ~SolutionCollector ()
void Add (IntVar *const var)
 Add API.
void Add (const std::vector< IntVar * > &vars)
void Add (IntervalVar *const var)
void Add (const std::vector< IntervalVar * > &vars)
void AddObjective (IntVar *const objective)
virtual void EnterSearch ()
 Beginning of the search.
int solution_count () const
 Returns how many solutions were stored during the search.
Assignmentsolution (int n) const
 Returns the nth solution.
int64 wall_time (int n) const
 Returns the wall time in ms for the nth solution.
int64 branches (int n) const
 Returns the number of branches when the nth solution was found.
int64 failures (int n) const
 Returns the number of failures encountered at the time of the nth solution.
int64 objective_value (int n) const
 Returns the objective value of the nth solution.
int64 Value (int n, IntVar *const var) const
 This is a short-cut to get the Value of 'var' in the nth solution.
int64 StartValue (int n, IntervalVar *const var) const
 This is a short-cut to get the StartValue of 'var' in the nth solution.
int64 EndValue (int n, IntervalVar *const var) const
 This is a short-cut to get the EndValue of 'var' in the nth solution.
int64 DurationValue (int n, IntervalVar *const var) const
 This is a short-cut to get the DurationValue of 'var' in the nth solution.
int64 PerformedValue (int n, IntervalVar *const var) const
 This is a short-cut to get the PerformedValue of 'var' in the nth solution.

Protected Member Functions

void PushSolution ()
 Push the current state as a new solution.
void PopSolution ()
 Remove and delete the last popped solution.
void check_index (int n) const

Protected Attributes

scoped_ptr< Assignmentprototype_
std::vector< Assignment * > solutions_
std::vector< Assignment * > recycle_solutions_
std::vector< int64 > times_
std::vector< int64 > branches_
std::vector< int64 > failures_
std::vector< int64 > objective_values_


Detailed Description

Solution Collectors.

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

Definition at line 3858 of file constraint_solver.h.


Constructor & Destructor Documentation

operations_research::SolutionCollector::SolutionCollector ( Solver *const   s,
const Assignment assignment 
)

Solution Collectors.

Base Class

Definition at line 2044 of file search.cc.

operations_research::SolutionCollector::SolutionCollector ( Solver *const   s  )  [explicit]

Definition at line 2047 of file search.cc.

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

Definition at line 2050 of file search.cc.


Member Function Documentation

void operations_research::SolutionCollector::Add ( IntVar *const   var  ) 

Add API.

Definition at line 2055 of file search.cc.

void operations_research::SolutionCollector::Add ( const std::vector< IntVar * > &  vars  ) 

Definition at line 2061 of file search.cc.

void operations_research::SolutionCollector::Add ( IntervalVar *const   var  ) 

Definition at line 2067 of file search.cc.

void operations_research::SolutionCollector::Add ( const std::vector< IntervalVar * > &  vars  ) 

Definition at line 2073 of file search.cc.

void operations_research::SolutionCollector::AddObjective ( IntVar *const   objective  ) 

Definition at line 2079 of file search.cc.

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

Beginning of the search.

Reimplemented from operations_research::SearchMonitor.

Definition at line 2085 of file search.cc.

int operations_research::SolutionCollector::solution_count (  )  const

Returns how many solutions were stored during the search.

Definition at line 2144 of file search.cc.

Assignment * operations_research::SolutionCollector::solution ( int  n  )  const

Returns the nth solution.

Definition at line 2139 of file search.cc.

int64 operations_research::SolutionCollector::wall_time ( int  n  )  const

Returns the wall time in ms for the nth solution.

Definition at line 2148 of file search.cc.

int64 operations_research::SolutionCollector::branches ( int  n  )  const

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

Definition at line 2153 of file search.cc.

int64 operations_research::SolutionCollector::failures ( int  n  )  const

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

Definition at line 2158 of file search.cc.

int64 operations_research::SolutionCollector::objective_value ( int  n  )  const

Returns the objective value of the nth solution.

Definition at line 2163 of file search.cc.

int64 operations_research::SolutionCollector::Value ( int  n,
IntVar *const   var 
) const

This is a short-cut to get the Value of 'var' in the nth solution.

Definition at line 2168 of file search.cc.

int64 operations_research::SolutionCollector::StartValue ( int  n,
IntervalVar *const   var 
) const

This is a short-cut to get the StartValue of 'var' in the nth solution.

Definition at line 2173 of file search.cc.

int64 operations_research::SolutionCollector::EndValue ( int  n,
IntervalVar *const   var 
) const

This is a short-cut to get the EndValue of 'var' in the nth solution.

Definition at line 2183 of file search.cc.

int64 operations_research::SolutionCollector::DurationValue ( int  n,
IntervalVar *const   var 
) const

This is a short-cut to get the DurationValue of 'var' in the nth solution.

Definition at line 2178 of file search.cc.

int64 operations_research::SolutionCollector::PerformedValue ( int  n,
IntervalVar *const   var 
) const

This is a short-cut to get the PerformedValue of 'var' in the nth solution.

Definition at line 2188 of file search.cc.

void operations_research::SolutionCollector::PushSolution (  )  [protected]

Push the current state as a new solution.

Definition at line 2096 of file search.cc.

void operations_research::SolutionCollector::PopSolution (  )  [protected]

Remove and delete the last popped solution.

Definition at line 2120 of file search.cc.

void operations_research::SolutionCollector::check_index ( int  n  )  const [protected]

Definition at line 2134 of file search.cc.


Member Data Documentation

Definition at line 3915 of file constraint_solver.h.

Definition at line 3916 of file constraint_solver.h.

Definition at line 3917 of file constraint_solver.h.

std::vector<int64> operations_research::SolutionCollector::times_ [protected]

Definition at line 3918 of file constraint_solver.h.

std::vector<int64> operations_research::SolutionCollector::branches_ [protected]

Definition at line 3919 of file constraint_solver.h.

std::vector<int64> operations_research::SolutionCollector::failures_ [protected]

Definition at line 3920 of file constraint_solver.h.

Definition at line 3921 of file constraint_solver.h.


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