Changeset 7:79d9c9f6c446 in lemon-benchmark
- Timestamp:
- 03/17/11 18:28:37 (14 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- generators/netgen
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
generators/netgen/CMakeLists.txt
r6 r7 9 9 10 10 ADD_EXECUTABLE(netgen 11 11 main.cc netgen.c index.c random.c 12 12 ) 13 13 14 14 SET_TARGET_PROPERTIES(netgen PROPERTIES COMPILE_DEFINITIONS "DIMACS") 15 16 TARGET_LINK_LIBRARIES(netgen 17 lemon 18 ) -
generators/netgen/netgen.c
r6 r7 86 86 #include "netgen.h" 87 87 88 #define PROBLEM_PARMS 13 /* aliases for generation parameters */ 89 #define NODES parms[0] /* number of nodes */ 90 #define SOURCES parms[1] /* number of sources (including transshipment) */ 91 #define SINKS parms[2] /* number of sinks (including transshipment) */ 92 #define DENSITY parms[3] /* number of (requested) arcs */ 93 #define MINCOST parms[4] /* minimum cost of arcs */ 94 #define MAXCOST parms[5] /* maximum cost of arcs */ 95 #define SUPPLY parms[6] /* total supply */ 96 #define TSOURCES parms[7] /* transshipment sources */ 97 #define TSINKS parms[8] /* transshipment sinks */ 98 #define HICOST parms[9] /* percent of skeleton arcs given maximum cost */ 99 #define CAPACITATED parms[10] /* percent of arcs to be capacitated */ 100 #define MINCAP parms[11] /* minimum capacity for capacitated arcs */ 101 #define MAXCAP parms[12] /* maximum capacity for capacitated arcs */ 102 88 #include "main.h" 103 89 104 90 /*** Private interfaces */ … … 486 472 } 487 473 488 int main() 489 { 490 long seed; 491 long problem; 492 long parms[PROBLEM_PARMS]; 474 int orig_main(long seed,long problem,long *parms) 475 { 493 476 long arcs; 494 477 int i; 495 478 496 479 /*** Read problem parameters and generate networks */ 497 498 while (1) { 499 READ(seed); 500 if (seed <= 0) exit(0); 501 READ(problem); 502 if (problem <= 0) exit(0); 503 for (i = 0; i < PROBLEM_PARMS; i++) 504 READ(parms[i]); 480 { 505 481 printf("c NETGEN flow network generator (C version)\n"); 506 482 printf("c Problem %2ld input parameters\n", problem);
Note: See TracChangeset
for help on using the changeset viewer.