Skip to content

mfms-ncsu/CPX-ILP

Repository files navigation

CPLEX

wrapper program for CPLEX with examples, version 1.4, 2019/5/17

This software is licensed by a Gnu Public License. See https://www.gnu.org/licenses/gpl.html for details.

If you have questions, comments or bugs to report, please contact me at mfms@ncsu.edu

To build, do the following

  1. Try running ./build.sh
  2. If you are lucky, cplex_ilp will compile without error
  3. If not, add an option in the build.sh script to account for the directories where ilog concert and cplex are located; please inform us if you required this so that we can expand the number of platforms on which cplex_ilp will run; cplex_ilp will be installed in your home bin directory
  4. cplex_ilp or ./cplex_ilp should give you a long usage message
  5. Try one or more of the following
  • cplex_ilp -solution Examples/steiner_a0009.lpx (the -solution option prints out a solution)
  • cplex_ilp -solution Examples/steiner_a0009-relaxed.lpx (here, the solution is the lp-relaxation)
  • cplex_ilp -time=60 Examples/test4.pi.lpx (should time out after 60 seconds; let me know if you get an optimum solution)
  • cplex_ilp -time=30 -trace=2 Examples/test4.pi.lpx (shorter timeout with trace info)
  • cplex_ilp Examples/e64.b.lpx (interesting history: an earlier version of CPLEX took more than an hour on this while my integer dual solver nailed it quickly; now CPLEX does some preprocessing and solves it without branching)
  • cplex_ilp -nodes=100 Examples/steiner_a0027.lpx (stops after processing approximately 100 nodes; will be slightly more because some have been generated before the 100th one is processed; at least I think that's why)

Examples

See index file for more details.

Utility scripts

  • cplexClassScript CLASS_DIR OUTPUT_DIR SUFFIX [OPTIONS] runs cplex_ilp on all files in CLASS_DIR, an output file in OUTPUT_DIR. The output file has all of the output. The SUFFIX is attached to the name of the output file -- a - means no suffix. OPTIONS is a list of command-line options for cplex_ilp
  • cplexLBFromFile BENCHMARK_LIST OUTPUT_DIR [OPTIONS], where BENCHMARK_LIST is a file in which each line gives a file name and a known upper bound on the solution, runs cplex_ilp on all files in the BENCHMARK_LIST using the known upper bounds as a stopping criterion (if a matching lower bound is encountered)
  • param_experiment is a script that tries out a wide range of options on a fixed set of instances -- see the actual script for details