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