
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. More... | |
| virtual void | constrain (const Space &_best) |
| Return cost. More... | |
| virtual void | print (std::ostream &os) const |
| Print solution. More... | |
| CarSequencing (bool share, CarSequencing &cs) | |
| Constructor for cloning s. More... | |
| virtual Space * | copy (bool share) |
| Copy during cloning. More... | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| ScriptBase (const Options &opt) | |
| Constructor. More... | |
| ScriptBase (bool share, ScriptBase &e) | |
| Constructor used for cloning. More... | |
| virtual void | compare (const Space &home, std::ostream &os) const |
| Compare with s. More... | |
Protected Attributes | |
| const int | problem |
| Problem number. More... | |
| const int | ncars |
| Number of cars. More... | |
| const int | noptions |
| Number of options. More... | |
| const int | nclasses |
| Number of classes. More... | |
| const int | maxstall |
| Maximum number of stalls. More... | |
| const int | stallval |
| Stall number. More... | |
| const int | endval |
| End number. More... | |
| IntVar | nstall |
| Number of stalls (cost to minimize) More... | |
| IntVar | nend |
| Number of end markers. More... | |
| IntVarArray | s |
| Sequence of cars produced. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| int | main (int argc, char *argv[]) |
| Main-function. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| static std::ostream & | select_ostream (const char *name, std::ofstream &ofs) |
| Choose output stream according to name. More... | |
| template<class Script , template< class > class Engine, class Options > | |
| static void | run (const Options &opt, Script *s=NULL) |
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 212 of file car-sequencing.cpp.
|
inline |
Initial model.
Definition at line 247 of file car-sequencing.cpp.
|
inline |
Constructor for cloning s.
Definition at line 401 of file car-sequencing.cpp.
|
inlinevirtual |
Return cost.
Definition at line 371 of file car-sequencing.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 378 of file car-sequencing.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 417 of file car-sequencing.cpp.
|
related |
Main-function.
Definition at line 426 of file car-sequencing.cpp.
|
protected |
Problem number.
Definition at line 226 of file car-sequencing.cpp.
|
protected |
Number of cars.
Definition at line 228 of file car-sequencing.cpp.
|
protected |
Number of options.
Definition at line 230 of file car-sequencing.cpp.
|
protected |
Number of classes.
Definition at line 232 of file car-sequencing.cpp.
|
protected |
Maximum number of stalls.
Definition at line 234 of file car-sequencing.cpp.
|
protected |
Stall number.
Definition at line 236 of file car-sequencing.cpp.
|
protected |
End number.
Definition at line 238 of file car-sequencing.cpp.
|
protected |
Number of stalls (cost to minimize)
Definition at line 240 of file car-sequencing.cpp.
|
protected |
Number of end markers.
Definition at line 242 of file car-sequencing.cpp.
|
protected |
Sequence of cars produced.
Definition at line 244 of file car-sequencing.cpp.