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