BookmarkSubscribeRSS Feed
nvidia39
Calcite | Level 5

Hi  

 

I have been trying to run a network flow and get integer values for the flows.

 

Objective is to use generalized network as nodes L1, L2 has to be visited only once. However, I am unable to get integer values for the formulation. For some reason, interior point algorithm is triggered and not network simplex optimizer. I am not sure if I have used the right way to specify the lower and upper bounds. Please let me know if I am missing something.

/*

_from_  = from node, _to_ = to node, _cost_ = cost to objective function, _mult_ = multiplier, _ lo_ = lower_bound , _up_ = upper_bound

*/

 

proc netflow 
arcdata = garcs 
nodedata = gnodes
conout = gnetout
source=A1
sink=COLLECT;
capacity _up_;
lo _lo_;
mult _mult_;
cost _cost_;
run;

 

data gnodes;
infile datalines dlm="|";
input _node_ :$25. _sd_ :8.;
datalines;
A1|1
COLLECT|-3

;
run;

/*

_from_  = from node, _to_ = to node, _cost_ = cost to objective function, _mult_ = multiplier, _ lo_ = lower_bound , _up_ = upper_bound

*/

 

data garcs;
infile datalines dlm="|";
input _from_ :$25. _to_ :$25. _cost_ :8. _mult_ :8. _lo_ :8. _up_ :8.;
datalines;
A1|L1T0|19|1|0|1
A1|L2T0|1|1|0|1
L1T0|L1T0P|0|2|0|1
L2T0|L2T0P|0|2|0|1
L1T0P|L1SUPER|0|1|0|1
L1T0P|L2T1|7|1|0|1
L2T0P|L2SUPER|0|1|0|1
L2T0P|L1T1|4|1|0|1
L1T1|L1T1P|0|2|0|1
L2T1|L2T1P|0|2|0|1
L1T1P|L1SUPER|0|1|0|1
L2T1P|L2SUPER|0|1|0|1
L1T1P|A1SINK|116|1|0|1
L2T1P|A1SINK|95|1|0|1
L1SUPER|COLLECT|0|1|0|1
L2SUPER|COLLECT|0|1|0|1
A1SINK|COLLECT|0|1|0|1
;
run;
3 REPLIES 3
RobPratt
SAS Super FREQ

Generalized network flow problems do not have the integrality property, so there might not be an optimal solution that takes only integer values.  Also, PROC NETFLOW is a legacy procedure that is no longer documented.  The SAS/OR 14.1 documentation provides an example that illustrates how to solve a generalized network flow problem with PROC OPTMODEL:

http://support.sas.com/documentation/cdl/en/ormplpug/68158/HTML/default/viewer.htm#ormplpug_netflow_...

nvidia39
Calcite | Level 5
Thank you so much for your response.

Another quick question, which SAS procedure is used for pure network flow?
Could you please share an example of the same?
RobPratt
SAS Super FREQ

SAS/OR: PROC OPTNET or the network solver in PROC OPTMODEL

SAS Optimization on SAS Viya: PROC OPTNETWORK or the network solver in PROC OPTMODEL

 

All those linked docs have lots of examples.

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 717 views
  • 0 likes
  • 2 in conversation