The IRM code can be download here, along with a few instances.
The README is provided below.
Some scripts could produce automatic compilation, execution and
statistics, see this
cutting stock screenshot or this
arc-routing screenshot.
More instances in the format of the program are available for Arc
Routing and Cutting Stock.
1. COMPILATION AND EXECUTION:
A. Compilation:
"make arp" or "make cutstock" constructs the executable hereafter called PROGNAME (eg, "arp"
or "cutstock"). Both targets use the target "coreIRM" that compiles the main IRM files. The
pre-processor directive MILISECS (see compile option -DMILISECS_MAX=...) indicates the maximum
number of miliseconds allowed for each instance.
B. Execution:
./PROGNAME INSTANCE [LOG_STREAM]
LOG_STREAM is a file to write some logs. Use "/dev/null" for LOG_STREAM to *SUPPRESS* any
uninteresting debug information!
If CPLEX is correctly installed (see Sect. 3 "CPLEX LICENCE INFO" below for licence
information), launch some examples by typing, for example:
A)
./arp instances/allGdb.txt /dev/null
B)
./cutstock cutstockInstances/vbRandCSTR10All.dat /dev/null
C) to record the information in the "output" folder, you can use:
./oneInstCS CSINSTANCE -> solve a Cutting-Stock (CS) instance file and report averages
./allInst CSINSTANCEFOLDER -> apply above script on all CS instance in a folder
C. Parameters and preprocessor directives
- SCALED_INSTANCE in src/arp.cpp, -> if defined, the instance under consideration is
src/cutstock.cpp scaled up (multiply weights by 1000 and add noise)
- LISTOFPROFITS in src/arp.cpp -> keep several lists of states, one for each feasible
profit (and a given start/end vertex)
- NO_DP_KP_BND in src/arp.cpp -> no dynamical programming is applied for knapsack
when searching the upper bound to prune states
in pMaxResidual(...) in Alg. 4.
The objective is to be very safe against C>1000000
- MILISECS_MAX in src/irm.cpp -> the time out of the algorithm in miliseconds, often
(and src/arp.cpp) provided via -D at compilation
2. FILES
The source files are in the ./src folder (with main() in src/main.cpp).
A. GENERIC FILES:
- src/main.cpp - the main file calling routines from all others
- src/irm.cpp,h - the IRM algorithm
- src/colGenerator.cpp,h - IRM uses Cplex, and the engine for adding constraints
(columns) is provided in this files
- src/general.cpp,h - general routines (timing, global defines)
- src/globals.cpp,h - the global variables
B. PROBLEM SPECIFIC FILES
- src/subprob.h - header to be included when a new problem is coded,
ie, see this file for details on the two functions
required by IRM: loadData(..) and irmSubproblem(..)
- src/arp.cpp - Arc-Routing code for the two above routines
- src/cutstock.cpp - Elastic Curring-Stock code for the two above routines
The Elastic func. is defined here (EXT_F, EXT_MAX)
3. CPLEX LICENCE INFORMATION
The licence file "access.ilm" needs to be found at /usr/ilog/ilm/access.ilm
It the location of this file is different, modify ILOG_LICENSE_FILE environment variable.
Type this in the shell if "access.ilm" is in the current working folder:
#export ILOG_LICENSE_FILE=./access.ilm