Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

Golf Class Reference
[Scripts for problems]

Inherits Example.

List of all members.


Detailed Description

Example: Golf tournament

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

Definition at line 74 of file golf.cc.


Parameters for golf tournaments

static const Tournament t []
 Tournaments.
static const unsigned int n_examples = sizeof(t) / sizeof(Tournament)
 Number of tournaments.

Public Types

enum  { MODEL_PLAIN, MODEL_SYMMETRY }
 Model variants. More...
enum  { PROP_PLAIN, PROP_DECOMPOSE }

Public Member Functions

SetVargroup (int w, int g)
 Return group number g in week w.
 Golf (const SizeOptions &opt)
 Actual model.
virtual void print (std::ostream &os)
 Print solution.
 Golf (bool share, Golf &s)
 Constructor for copying s.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void getVars (Gecode::Reflection::VarMap &vm, bool registerOnly)
 Make variables available for visualisation.

Public Attributes

int groups
 Number of groups in a week.
int playersInGroup
 Number of players in a group.
int weeks
 Number of weeks.
int players
 Overall number of players.
SetVarArray groupsS
 The sets representing the groups.

Member Enumeration Documentation

anonymous enum

Model variants.

Enumerator:
MODEL_PLAIN  A simple model.
MODEL_SYMMETRY  Model with symmetry breaking.

Definition at line 77 of file golf.cc.

anonymous enum

Enumerator:
PROP_PLAIN  Propagation using intersection propagators.
PROP_DECOMPOSE  Propagation using union and complement propagators.

Definition at line 81 of file golf.cc.


Constructor & Destructor Documentation

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

Actual model.

Definition at line 99 of file golf.cc.

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

Constructor for copying s.

Definition at line 254 of file golf.cc.


Member Function Documentation

SetVar& Golf::group ( int  w,
int  g 
) [inline]

Return group number g in week w.

Definition at line 94 of file golf.cc.

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

Print solution.

Reimplemented from Example.

Definition at line 229 of file golf.cc.

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

Copy during cloning.

Implements Gecode::Space.

Definition at line 261 of file golf.cc.

virtual void Golf::getVars ( Gecode::Reflection::VarMap vm,
bool  registerOnly 
) [inline, virtual]

Make variables available for visualisation.

Reimplemented from Gecode::Space.

Definition at line 267 of file golf.cc.


Friends And Related Function Documentation

const Tournament t[] [related]

Initial value:

  { {8,4,9},
    {5,3,7},
    {4,3,2}
  }
Tournaments.

Definition at line 57 of file golf.cc.

const unsigned int n_examples = sizeof(t) / sizeof(Tournament) [related]

Number of tournaments.

Definition at line 63 of file golf.cc.


Member Data Documentation

Number of groups in a week.

Definition at line 85 of file golf.cc.

Number of players in a group.

Definition at line 86 of file golf.cc.

Number of weeks.

Definition at line 87 of file golf.cc.

Overall number of players.

Definition at line 88 of file golf.cc.

The sets representing the groups.

Definition at line 91 of file golf.cc.


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