Inherits
Example.
List of all members.
Detailed Description
Example: Travelling Salesman Problem
Simple travelling salesman problem instances. Just meant as a test for circuit.
Definition at line 219 of file tsp.cc.
|
Public Member Functions |
| TSP (const SizeOptions &opt) |
| Actual model.
|
void | constrain (Space *s) |
| Add constraint for next better solution.
|
| TSP (bool share, TSP &s) |
| Constructor for cloning s.
|
virtual Space * | copy (bool share) |
| Copy during cloning.
|
virtual void | print (std::ostream &os) |
| Print solution.
|
Protected Attributes |
Problem | p |
| Problem instance to be solved.
|
IntVarArray | succ |
| Successor edges.
|
IntVar | cost |
| Total cost of travel.
|
Constructor & Destructor Documentation
Actual model.
Definition at line 229 of file tsp.cc.
TSP::TSP |
( |
bool |
share, |
|
|
TSP & |
s | |
|
) |
| | [inline] |
Constructor for cloning s.
Definition at line 272 of file tsp.cc.
Member Function Documentation
void TSP::constrain |
( |
Space * |
s |
) |
[inline] |
Add constraint for next better solution.
Definition at line 268 of file tsp.cc.
virtual Space* TSP::copy |
( |
bool |
share |
) |
[inline, virtual] |
virtual void TSP::print |
( |
std::ostream & |
os |
) |
[inline, virtual] |
Print solution.
Reimplemented from Example.
Definition at line 283 of file tsp.cc.
Member Data Documentation
Successor edges.
Definition at line 224 of file tsp.cc.
Total cost of travel.
Definition at line 226 of file tsp.cc.
The documentation for this class was generated from the following file: