BookmarkSubscribeRSS Feed
dgb
Calcite | Level 5 dgb
Calcite | Level 5

Hello I am trying to solve a simple max flow problem. I have the following data input and the following code.  But somehow the result tab comes out as blank.  I am not sure where I am messing up.  Thanks!

 

data arcs;
input _from_ $ _to_ $ _capac_;
datalines;
N1 N2 6
N1 N3 2
N1 N4 5
N1 N7 5
N1 N9 2
N2 N5 2
N3 N5 1
N3 N6 1
N3 N9 1
N4 N6 2
N4 N8 3
N5 N6 3
N5 N7 1
N5 N9 3
N6 N5 1
N6 N8 5
N6 N9 3
N7 N9 3
N8 N9 2
;

proc netflow
intpoint
maxflow
excess = arcs
arcdata = arcs
source = N1 sink = N9
conout = gout3;
run;

7 REPLIES 7
ballardw
Super User

Does the log say anything about proc netflow not found?

You might want to run this code and share the result to show what is currently installed and available.

proc product_status; run;

 

The log will show which products are installed.

 

WarrenKuhfeld
Ammonite | Level 13

Some OR procs display all output (or at least much of their output) in the log.

dgb
Calcite | Level 5 dgb
Calcite | Level 5

Hi, I see that the max flow answer is  displayed in log(pasted below)

 
NOTE: Optimum reached.
NOTE: Maximal flow= 13 .
NOTE: Objective= 0.
 
However, how do I get SAS to display for instance the flow from one specific node to another? (ie: from node 1 to node 7?) 
 
Thanks. 
PGStats
Opal | Level 21

You must follow the run; statement with a quit; statement to create the gout3 dataset which contains the flows.

PG
dgb
Calcite | Level 5 dgb
Calcite | Level 5

thank you very much. that does help me generate teh result tab.  One quick question hwoever.  Where can i specify that I only want the flow numbers to be integers?  I see that in the result some of the flows are in fractions. 

PGStats
Opal | Level 21

I don't know of any SAS network problem solver that supports integer constraints. Look at MILP procedures.

 

You could post such questions to the SAS/OR forum to reach a more specialized crowd.

PG
RobPratt
SAS Super FREQ

The NETFLOW procedure is considered legacy and is no longer under active development.  Please see this documentation example that shows how to solve a maximum flow problem with PROC OPTMODEL, where you can easily declare the flow variables to be integer by using the INTEGER option in the VAR statement.

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
  • 7 replies
  • 1709 views
  • 0 likes
  • 5 in conversation