Example: Travelling salesman problem (TSP) More...
Public Member Functions | |
TSP (const SizeOptions &opt) | |
Actual model. | |
virtual IntVar | cost (void) const |
Return solution cost. | |
TSP (TSP &s) | |
Constructor for cloning s. | |
virtual Space * | copy (void) |
Copy during cloning. | |
virtual void | print (std::ostream &os) const |
Print solution. | |
![]() | |
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. | |
Protected Attributes | |
Problem | p |
Problem instance to be solved. | |
IntVarArray | succ |
Successor edges. | |
IntVar | total |
Total cost of travel. | |
Related Symbols | |
(Note that these are not member symbols.) | |
int | main (int argc, char *argv[]) |
Main-function. | |
Additional Inherited Members | |
![]() | |
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
Choose output stream according to sn. | |
template<class Script , template< class > class Engine, class Options > | |
static void | run (const Options &opt, Script *s=NULL) |
Example: Travelling salesman problem (TSP)
Simple travelling salesman problem instances. Just meant as a test for circuit.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
|
protected |