Generated on Tue Apr 18 10:23:00 2017 for Gecode by doxygen 1.6.3

Golf Class Reference
[Example scripts (models)]

Example: Golf tournament More...

List of all members.

Public Types

enum  { MODEL_PLAIN, MODEL_SYMMETRY }
 

Model variants.

More...
enum  { PROP_SET, PROP_INT, PROP_MIXED }
 

Propagation.

More...

Public Member Functions

 Golf (const GolfOptions &opt)
 Actual model.
virtual void print (std::ostream &os) const
 Print solution.
 Golf (bool share, Golf &s)
 Constructor for copying s.
virtual Spacecopy (bool share)
 Copy during cloning.

Public Attributes

int g
 Number of groups in a week.
int s
 Number of players in a group.
int w
 Number of weeks.
SetVarArray groups
 The sets representing the groups.

Detailed Description

Example: Golf tournament

Schedule a golf tournament. This is problem 010 from csplib.

Note that "Modeling and Programming with Gecode" uses this example as a case study.

Definition at line 84 of file golf.cpp.


Member Enumeration Documentation

anonymous enum

Model variants.

Enumerator:
MODEL_PLAIN 

A simple model.

MODEL_SYMMETRY 

Model with symmetry breaking.

Definition at line 87 of file golf.cpp.

anonymous enum

Propagation.

Enumerator:
PROP_SET 

Propagation of pair play amount using set variables.

PROP_INT 

Propagation of pair play amount using int variables and distinct.

PROP_MIXED 

Propagation of pair play amount using both set and int variables.

Definition at line 92 of file golf.cpp.


Constructor & Destructor Documentation

Golf::Golf ( const GolfOptions opt  )  [inline]

Actual model.

Definition at line 105 of file golf.cpp.

Golf::Golf ( bool  share,
Golf s 
) [inline]

Constructor for copying s.

Definition at line 217 of file golf.cpp.


Member Function Documentation

virtual void Golf::print ( std::ostream &  os  )  const [inline, virtual]

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 207 of file golf.cpp.

virtual Space* Golf::copy ( bool  share  )  [inline, virtual]

Copy during cloning.

Definition at line 222 of file golf.cpp.


Member Data Documentation

int Golf::g

Number of groups in a week.

Definition at line 97 of file golf.cpp.

int Golf::s

Number of players in a group.

Definition at line 98 of file golf.cpp.

int Golf::w

Number of weeks.

Definition at line 99 of file golf.cpp.

The sets representing the groups.

Definition at line 102 of file golf.cpp.


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