Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

TSP Class Reference
[Scripts for problems]

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 Spacecopy (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

TSP::TSP ( const SizeOptions opt  )  [inline]

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]

Copy during cloning.

Implements Gecode::Space.

Definition at line 278 of file tsp.cc.

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

Problem TSP::p [protected]

Problem instance to be solved.

Reimplemented from Gecode::Space.

Definition at line 222 of file tsp.cc.

IntVarArray TSP::succ [protected]

Successor edges.

Definition at line 224 of file tsp.cc.

IntVar TSP::cost [protected]

Total cost of travel.

Definition at line 226 of file tsp.cc.


The documentation for this class was generated from the following file: