generators/netgen/main.cc
changeset 10 d7ce0311ece2
equal deleted inserted replaced
-1:000000000000 0:6f47f3eb9161
       
     1 #include <lemon/arg_parser.h>
       
     2 #include "main.h"
       
     3 
       
     4 int main(int argc, char **argv)
       
     5 {
       
     6   int seed=1;
       
     7   int problem=0;
       
     8   int parms[PROBLEM_PARMS];
       
     9   
       
    10   lemon::ArgParser ap(argc,argv);
       
    11   ap.refOption("seed","Random seed (default: 1)",seed)
       
    12     .refOption("problem","Problem type (default: 0)",problem)
       
    13     .refOption("nodes","Number of nodes (default: 10)",NODES)
       
    14     .refOption("sources","Source nodes (default: 3)",SOURCES)
       
    15     .refOption("sinks","Sink nodes (default: 3)",SINKS)
       
    16     .refOption("density","Number of arcs (default: 30)",DENSITY)
       
    17     .refOption("mincost","Minimum arc cost (default: 10)",MINCOST)
       
    18     .refOption("maxcost","Maximum arc cost (default: 99)",MAXCOST)
       
    19     .refOption("supply","Total supply (default: 1000)",SUPPLY)
       
    20     .refOption("tsources","Transshipment sources (default: 0)",TSOURCES)
       
    21     .refOption("tsinks","Transshipment sinks (default: 0)",TSINKS)
       
    22     .refOption("hicost",
       
    23                "Percent of skeleton arcs given maximum cost (default: 0)",
       
    24                HICOST)
       
    25     .refOption("capacitated","Percent of arcs to be capacitated (default: 100)",
       
    26                CAPACITATED)
       
    27     .refOption("mincap","Minimum arc capacity (default: 100)",MINCAP)
       
    28     .refOption("maxcap","Maximum arc capacity (default: 1000)",MAXCAP);
       
    29 
       
    30   NODES=10;
       
    31   SOURCES=3;
       
    32   SINKS=3;
       
    33   DENSITY=30;
       
    34   MINCOST=10;
       
    35   MAXCOST=99;
       
    36   SUPPLY=1000;
       
    37   TSOURCES=0;
       
    38   TSINKS=0;
       
    39   HICOST=0;
       
    40   CAPACITATED=100;
       
    41   MINCAP=100;
       
    42   MAXCAP=1000;
       
    43 
       
    44   ap.run();
       
    45   
       
    46   long lparms[PROBLEM_PARMS];
       
    47   for(int i=0;i<PROBLEM_PARMS;i++) lparms[i]=parms[i];
       
    48 
       
    49   return orig_main(seed,problem,lparms);  
       
    50 }
       
    51