1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/generators/netgen/main.cc Thu Mar 17 18:28:37 2011 +0100
1.3 @@ -0,0 +1,51 @@
1.4 +#include <lemon/arg_parser.h>
1.5 +#include "main.h"
1.6 +
1.7 +int main(int argc, char **argv)
1.8 +{
1.9 + int seed=1;
1.10 + int problem=0;
1.11 + int parms[PROBLEM_PARMS];
1.12 +
1.13 + lemon::ArgParser ap(argc,argv);
1.14 + ap.refOption("seed","Random seed (default: 1)",seed)
1.15 + .refOption("problem","Problem type (default: 0)",problem)
1.16 + .refOption("nodes","Number of nodes (default: 10)",NODES)
1.17 + .refOption("sources","Source nodes (default: 3)",SOURCES)
1.18 + .refOption("sinks","Sink nodes (default: 3)",SINKS)
1.19 + .refOption("density","Number of arcs (default: 30)",DENSITY)
1.20 + .refOption("mincost","Minimum arc cost (default: 10)",MINCOST)
1.21 + .refOption("maxcost","Maximum arc cost (default: 99)",MAXCOST)
1.22 + .refOption("supply","Total supply (default: 1000)",SUPPLY)
1.23 + .refOption("tsources","Transshipment sources (default: 0)",TSOURCES)
1.24 + .refOption("tsinks","Transshipment sinks (default: 0)",TSINKS)
1.25 + .refOption("hicost",
1.26 + "Percent of skeleton arcs given maximum cost (default: 0)",
1.27 + HICOST)
1.28 + .refOption("capacitated","Percent of arcs to be capacitated (default: 100)",
1.29 + CAPACITATED)
1.30 + .refOption("mincap","Minimum arc capacity (default: 100)",MINCAP)
1.31 + .refOption("maxcap","Maximum arc capacity (default: 1000)",MAXCAP);
1.32 +
1.33 + NODES=10;
1.34 + SOURCES=3;
1.35 + SINKS=3;
1.36 + DENSITY=30;
1.37 + MINCOST=10;
1.38 + MAXCOST=99;
1.39 + SUPPLY=1000;
1.40 + TSOURCES=0;
1.41 + TSINKS=0;
1.42 + HICOST=0;
1.43 + CAPACITATED=100;
1.44 + MINCAP=100;
1.45 + MAXCAP=1000;
1.46 +
1.47 + ap.run();
1.48 +
1.49 + long lparms[PROBLEM_PARMS];
1.50 + for(int i=0;i<PROBLEM_PARMS;i++) lparms[i]=parms[i];
1.51 +
1.52 + return orig_main(seed,problem,lparms);
1.53 +}
1.54 +