Calcite | Level 5

## Max Flow Problem

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
Super User

## Re: Max Flow Problem

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.

Rhodochrosite | Level 12

## Re: Max Flow Problem

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

Calcite | Level 5

## Re: Max Flow Problem

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.
Opal | Level 21

## Re: Max Flow Problem

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

PG
Calcite | Level 5

## Re: Max Flow Problem

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.

Opal | Level 21

## Re: Max Flow Problem

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
SAS Super FREQ

## Re: Max Flow Problem

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.

Discussion stats
• 7 replies
• 1320 views
• 0 likes
• 5 in conversation