New Contributor
Posts: 4

# 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;

Super User
Posts: 13,337

## 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.

SAS Super FREQ
Posts: 497

## Re: Max Flow Problem

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

New Contributor
Posts: 4

## 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.
Posts: 5,482

## Re: Max Flow Problem

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

PG
New Contributor
Posts: 4

## 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.

Posts: 5,482

## 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 Employee
Posts: 552

## 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
• 344 views
• 0 likes
• 5 in conversation