BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
luboxing
Obsidian | Level 7

Greeating!

 

I am wondering how to specify the problem of the traveling salesman problem (TSP) with different starting and ending nodes. I am able to replicate the proc optnetwork example below described in the SAS manual:

 

proc optnetwork
   direction = directed
   logLevel  = moderate
   links     = mycas.LinkSetIn
   outNodes  = mycas.NodeSetOut;
   tsp
      out    = mycas.TSPTour;
run;

But the example only applies to a TSP problem where the salesman goes back to the same node he started from. The problem I want to solve relaxes that requirement -- he only need to go to every node without returning to the starting point.

 

Any help would be highly appreciated!

Bo

 

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
RobPratt
SAS Super FREQ
The standard approach to this variant is to introduce a dummy node with zero-cost edges to the other nodes, as shown in the “A Better Lower Bound from TSP” section here: https://support.sas.com/resources/papers/proceedings14/SAS101-2014.pdf

In the resulting tour, the two neighbors of the dummy node are the starting and ending nodes.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 687 views
  • 1 like
  • 3 in conversation