[gecode-users] graph constraints and hamiltonian path

Christian Schulte cschulte at kth.se
Thu May 19 23:21:47 CEST 2011


Hmmm. Just thinking: how about adding an additional node that is assigned to
lead back to the start node and then find a Hamiltonian circuit for this?
That should work, shouldn't it? Or am I missing something.

Christian

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


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of serge lemouton
Sent: Thursday, May 19, 2011 9:32 PM
To: users at gecode.org
Subject: [gecode-users] graph constraints and hamiltonian path

Hello,

Question about graph constraints:
I would like to modify the the TSP example in order to find the solutions
where the travelling salesman should not return to its starting point.
In other terms, is it possible to use the "circuit" constraint to find an
hamiltonian path instead of a circuit ?
Does it require to modify the code or is it better to create another
subclass of the graph class ?

Thanks for any advice,

Serge Lemouton
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list