1

I am using the IBM ILOG CPLEX Optimization Studio (version 12.6.3) to solve a large optimization problem. Since the problem is so big, CPLEX takes a very long time, so I want to limit the runtime. What is the correct syntax to limit this?

Thanks!

Note: I am not using another language to run the CPLEX model, I am running directly from IBM ILOG CPLEX Otimization Studio

Marijn
  • 21
  • 1
  • 3
  • A [related post](http://stackoverflow.com/questions/25021603/ampl-does-the-results-after-using-the-option-timelimit-for-cplex-meet-all-the) recommends this syntax for a 5s timelimit: `option cplex_options 'timelimit=5'` – Axel Kemper Apr 10 '17 at 14:18
  • If you are working inside CPLEX Studio, it is often easier to do this kind of stuff via a 'settings' file. Add a settings file to your project, and add a reference to that settings file to your run configuration so it gets used. If you open and edit that settings file (should have extension .ops) inside cplex studio, you should get access to dozens (hundreds?) of parameters and settins. The time limit stuff is on 'Mathematical programming' -> General – TimChippingtonDerrick Apr 10 '17 at 20:45
  • Thank you, this solved my problem! – Marijn Apr 11 '17 at 21:39

2 Answers2

1
execute timeTermination {
    cplex.tilim = 40*60;   // set time model stop (second)
    }
Khái Duy
  • 59
  • 12
0

The time can also be reduced if you want to get at least one feasible solution by: in setting --> General --> Mathematical programming --> FeasOpt. You will find the default value of 1.0E-6 that you can reduce as appropriate.