Pinned topic Question based on TSP
I have a question based on the model of TSP which described in the OPL model library named Traveling Salesman Problem.
If I add two dummy cities for the salesman, namely start and end, to represent the initial and final status of the salesman.
How I can achieve this using OPL?
ol 270002SRX719 PostsACCEPTED ANSWER
Re: Question based on TSP2012-06-13T15:37:53Z in response to WangZhengxuHello,
if you want to start from a city called start, and to end in a city called end, a simple way is simply adding a constraint x<end,start>==1 to force the end to be connected to the start.
WangZhengxu 270005D32K5 Posts
RithulKrishnan 2700069RMX1 PostACCEPTED ANSWER
Re: Question based on TSP2013-05-11T19:38:59Z in response to WangZhengxu
I'm learning cplex and need to code the traditional integer programming formulation for the traveling salesman problem. I am struggling with the code using Cplex for MATLAB, I keep getting errors and do not know how to correct them, can you please help me with the code?