BookmarkSubscribeRSS Feed
Ceciestunnomtemporaire
Fluorite | Level 6

Hello,

 

I'm using the optnet procedure with the shortpath statement. The output is the shortest path between every pair of nodes I have in input. I have a lot of nodes in my data, so sometimes the number of nodes it takes to get from A to B can be quite big and take a lot of time to run. 

 

Right now, after the procedure is done running, I get the number of nodes used in each pair of points and I remove it if it is too high (over 50 or 100 for example), because I still have some manipulations to do.

 

Since this step can be long as well, I would like to know if there is an option or a way that will not output the pair if the number of nodes there is between them is too high. I'm using SAS 9.4.

 

Thanks.

2 REPLIES 2
PGStats
Opal | Level 21

proc optnet (or the network solver in OPTMODEL) can only find ALL paths, ALL SHORTEST (length=1) paths or ALL LONGEST (too long) paths, nothing in between. A cap on path length would indeed be something useful.

PG
Ceciestunnomtemporaire
Fluorite | Level 6

Thank you for your time.

 

I found an interesting option that I did not see before, called "data_nodes_sub=". You use a table with the nodes, source and sink as columns with 0 or 1 as values. It helped me a lot.

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
  • 2 replies
  • 1017 views
  • 1 like
  • 2 in conversation