
Example: Travelling salesman problem (TSP) More...
Public Member Functions | |
| TSP (const SizeOptions &opt) | |
| Actual model. | |
| virtual IntVar | cost (void) const |
| Return solution cost. | |
| TSP (bool share, TSP &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (bool share) |
| Copy during cloning. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
Protected Attributes | |
| Problem | p |
| Problem instance to be solved. | |
| IntVarArray | succ |
| Successor edges. | |
| IntVar | total |
| Total cost of travel. | |
Related Functions | |
(Note that these are not member functions.) | |
| int | main (int argc, char *argv[]) |
| Main-function. | |
Example: Travelling salesman problem (TSP)
Simple travelling salesman problem instances. Just meant as a test for circuit.
| TSP::TSP | ( | const SizeOptions & | opt | ) | [inline] |
| virtual void TSP::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) | [related] |
IntVarArray TSP::succ [protected] |
IntVar TSP::total [protected] |