This directory should contain all the files you need to compile 
the multicommodity flow program.  Here are some sketchy directions, if
you have problems let me know and I'll give you more explicit directions.

To compile type:
make mcf3

This will create a program mcf3.  Two possible problems: 

1) We require the libraries I77 F77 (fortran libraries).  You may not
have them or they may be someplace where it takes some work to get
them included.

2) If you care about running times, the current timing code works on 
a DECstation. and may not work on your machine.  I'm not sure whether
you care about running times for large problems.  If you do, let me know
and I can make sure that it works for your machine (The difficulty comes
from non-standard UNIX timing routines).


To run the code, type

mcf3 inputfile outputfile 

This takes the graph from inputfile finds a flow and writes it to
output file.  Along the way it writes timing and status information to
stdout.  You can redict it to a file if you want (note that this may
be necessary if you run it in the background).  Beware that the output
file can be quite large, as the output is a flow for each commodity on
each edge.  It also starts with information on commodity groups.  You
probably want to ignore this and look only at the Total flow parts and
the flows for each commodity.

Inputfile format:  I include a small sample file:
________________________________________________________________
p mcf 4 5 2
a 1 2 4
a 1 3 4
a 2 3 10
a 2 4 1
a 3 4 5
k 1 4 4
k 2 4 2
e 0.010000
________________________________________________________________

Explanation: the first line must contain "p mcf" followed by the
number of nodes, edges and commodities.  The nodes are assumed to be
numbered 1 to n.  The next lines start with a and represent the edges,
e.g. the first such line says that there is an edge from node 1 to
node 2 with capacity 4.  The lines starting with k represent
commodities, there are 2 commodities one from node 1 to 4 with a
demand of four units and one from node 2 to 4 with a demand of 2
units.  The last line tells the accuracy to which we wish to solve the
problem.  Thus we wish to solve this problem to within 1% accuracy.

The graph is directed.  The original code was designed for undirected graphs.
It was extensively tested on undirected graphs.  I later modified the
code for directed graphs, tested it and believe that it works, but
it was not tested as extensively as the undirected graph code was. 


One more caveat: Every problem has some small epsilon to which it
cannot be solved by this code.  If you try to solve to such an
epsilon, the algorithm may run forever. (I didn't bother to put a
conservative detection scheme in). The information printed to stdout
tells you how close to optimal you are, you may occassionally need to
stop the code and give up or try again.  The algorithm is randomized,
so sometimes trying again will solve the problem.  With epsilon at 1%,
I think it has worked everytime I tried and with epsilon at .1% it
works almost everytime.  For smaller epsilons, for some problems,
there is trouble.

-Cliff
