generators/netgen/netgen.c
changeset 7 79d9c9f6c446
parent 6 a3ef33a8694a
     1.1 --- a/generators/netgen/netgen.c	Fri Nov 26 19:23:47 2010 +0100
     1.2 +++ b/generators/netgen/netgen.c	Thu Mar 17 18:28:37 2011 +0100
     1.3 @@ -85,21 +85,7 @@
     1.4  #define ALLOCATE_NETWORK
     1.5  #include "netgen.h"
     1.6  
     1.7 -#define PROBLEM_PARMS 13		/* aliases for generation parameters */
     1.8 -#define NODES	    parms[0]		/* number of nodes */
     1.9 -#define SOURCES     parms[1]		/* number of sources (including transshipment) */
    1.10 -#define SINKS	    parms[2]		/* number of sinks (including transshipment) */
    1.11 -#define DENSITY     parms[3]		/* number of (requested) arcs */
    1.12 -#define MINCOST     parms[4]		/* minimum cost of arcs */
    1.13 -#define MAXCOST     parms[5]		/* maximum cost of arcs */
    1.14 -#define SUPPLY	    parms[6]		/* total supply */
    1.15 -#define TSOURCES    parms[7]		/* transshipment sources */
    1.16 -#define TSINKS	    parms[8]		/* transshipment sinks */
    1.17 -#define HICOST	    parms[9]		/* percent of skeleton arcs given maximum cost */
    1.18 -#define CAPACITATED parms[10]		/* percent of arcs to be capacitated */
    1.19 -#define MINCAP	    parms[11]		/* minimum capacity for capacitated arcs */
    1.20 -#define MAXCAP	    parms[12]		/* maximum capacity for capacitated arcs */
    1.21 -
    1.22 +#include "main.h"
    1.23  
    1.24  /*** Private interfaces */
    1.25  
    1.26 @@ -485,23 +471,13 @@
    1.27  			exit(0);						\
    1.28  		}
    1.29  
    1.30 -int main()
    1.31 +int orig_main(long seed,long problem,long *parms)
    1.32  {
    1.33 -  long seed;
    1.34 -  long problem;
    1.35 -  long parms[PROBLEM_PARMS];
    1.36    long arcs;
    1.37    int i;
    1.38  
    1.39  /*** Read problem parameters and generate networks */
    1.40 -
    1.41 -  while (1) {
    1.42 -    READ(seed);
    1.43 -    if (seed <= 0) exit(0);
    1.44 -    READ(problem);
    1.45 -    if (problem <= 0) exit(0);
    1.46 -    for (i = 0; i < PROBLEM_PARMS; i++)
    1.47 -      READ(parms[i]);
    1.48 +  {
    1.49      printf("c NETGEN flow network generator (C version)\n");
    1.50      printf("c  Problem %2ld input parameters\n", problem);
    1.51      printf("c  ---------------------------\n");