CarSequencing Class Reference
Example scripts (models)

Example: Car sequencing More...

## Public Types

enum | { BRANCH_INORDER , BRANCH_MIDDLE }
| Branching variants. More...
enum | { PROP_REGULAR , PROP_CUSTOM }
| Propagation variants. More...

## Public Member Functions

| CarSequencing (const CarOptions &opt)
| Initial model.
virtual void | constrain (const Space &_best)
| Return cost.
virtual void | print (std::ostream &os) const
| Print solution.
| CarSequencing (CarSequencing &cs)
| Constructor for cloning s.
virtual Space * | copy (void)
| Copy during cloning.
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
| ScriptBase (const Options &opt)
| Constructor.
| ScriptBase (ScriptBase &e)
| Constructor used for cloning.
virtual void | compare (const Space &home, std::ostream &os) const
| Compare with s.
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace >
| IgnoreStepOption (const Options &)
| Constructor.
| IgnoreStepOption (BaseSpace &e)
| Constructor used for cloning.

## Protected Attributes

const int | problem
| Problem number.
const int | ncars
| Number of cars.
const int | noptions
| Number of options.
const int | nclasses
| Number of classes.
const int | maxstall
| Maximum number of stalls.
const int | stallval
| Stall number.
const int | endval
| End number.
IntVar | nstall
| Number of stalls (cost to minimize).
IntVar | nend
| Number of end markers.
IntVarArray | s
| Sequence of cars produced.

## Related Symbols

(Note that these are not member symbols.)
int | main (int argc, char *argv[])
| Main-function.

## Additional Inherited Members

Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs)
| Choose output stream according to sn.
static void | run (const Options &opt, Script *s=NULL)

## Detailed Description

Example: Car sequencing

See problem 1 at http://www.csplib.org/.

This model uses extra stall-slots instead of violations, as proposed in "Combining Forces to Solve the Car Sequencing Problem", Perron and Shaw, CPAIOR 2004.

Definition at line 208 of file car-sequencing.cpp.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Branching variants.

Enumerator
BRANCH_INORDER | Branch from left to right.
BRANCH_MIDDLE | Branch from middle out.

Definition at line 211 of file car-sequencing.cpp.

## anonymous enum

anonymous enum

Propagation variants.

Enumerator
PROP_REGULAR | Use regular constraints.
PROP_CUSTOM | Use custom constraint.

Definition at line 216 of file car-sequencing.cpp.

## Constructor & Destructor Documentation

## CarSequencing() [1/2]

CarSequencing::CarSequencing | ( | const CarOptions & | opt | ) |

inline

Initial model.

Definition at line 243 of file car-sequencing.cpp.

## CarSequencing() [2/2]

CarSequencing::CarSequencing | ( | CarSequencing & | cs | ) |

inline

Constructor for cloning s.

Definition at line 397 of file car-sequencing.cpp.

## Member Function Documentation

## constrain()

virtual void CarSequencing::constrain | ( | const Space & | _best | ) |

inline virtual

Return cost.

Definition at line 367 of file car-sequencing.cpp.

## print()

virtual void CarSequencing::print | ( | std::ostream & | os | ) | const

inline virtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.

Definition at line 374 of file car-sequencing.cpp.

## copy()

virtual Space * CarSequencing::copy | ( | void |  | ) |

inline virtual

Copy during cloning.

Definition at line 413 of file car-sequencing.cpp.

## Friends And Related Symbol Documentation

## main()

int main | ( | int | argc,
|  | char * | argv[] )

related

Main-function.

Definition at line 422 of file car-sequencing.cpp.

## Member Data Documentation

## problem

const int CarSequencing::problem

protected

Problem number.

Definition at line 222 of file car-sequencing.cpp.

## ncars

const int CarSequencing::ncars

protected

Number of cars.

Definition at line 224 of file car-sequencing.cpp.

## noptions

const int CarSequencing::noptions

protected

Number of options.

Definition at line 226 of file car-sequencing.cpp.

## nclasses

const int CarSequencing::nclasses

protected

Number of classes.

Definition at line 228 of file car-sequencing.cpp.

## maxstall

const int CarSequencing::maxstall

protected

Maximum number of stalls.

Definition at line 230 of file car-sequencing.cpp.

## stallval

const int CarSequencing::stallval

protected

Stall number.

Definition at line 232 of file car-sequencing.cpp.

## endval

const int CarSequencing::endval

protected

End number.

Definition at line 234 of file car-sequencing.cpp.

## nstall

IntVar CarSequencing::nstall

protected

Number of stalls (cost to minimize).

Definition at line 236 of file car-sequencing.cpp.

## nend

IntVar CarSequencing::nend

protected

Number of end markers.

Definition at line 238 of file car-sequencing.cpp.

## s

IntVarArray CarSequencing::s

protected

Sequence of cars produced.

Definition at line 240 of file car-sequencing.cpp.

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

- examples/car-sequencing.cpp