[gecode-users] TSP example

Christian Schulte cschulte at kth.se
Sun Apr 10 13:15:46 CEST 2011


This breaks a symmetry (a classic technique in CP) by ordering the first and
second node on the route: the circle could either start forward or backwards
but that does not matter. It might reduce the search space.

 

Christian

--

Christian Schulte, KTH, web.it.kth.se/~cschulte/

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Jonathan Skovhus Andersen
Sent: Sunday, April 10, 2011 9:42 AM
To: users at gecode.org
Subject: [gecode-users] TSP example

 

Hi,

 

I don't understand what this snippet of code from the TSP example does - can
anyone explain?   

 

// Just assume that the circle starts forwards

    {

      IntVar p0(*this, 0, n-1);

      element(*this, succ, p0, 0);

      rel(*this, p0, IRT_LE, succ[0]);

    }

 

It doesn't seem to affect my results if I remove it.

 

Regards,

Jonathan Skovhus Andersen.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20110410/2358cd68/attachment.htm>


More information about the users mailing list