1

I have a model that I am sure the body of the model won't take like to get build up and once I call JuMp.optimize it takes very long to stop. Although I set 1000 limits.

model = Model(optimizer_with_attributes(
    CPLEX.Optimizer,
    "CPX_PARAM_TILIM" => 1000,
   "CPX_PARAM_EPGAP" => 1e-1)) # relative gap
set_optimizer_attribute(model, CPLEX.PassNames(), true)

It's now more than three hours and still no stopping. What is the possible issue and how to fix? I repeated and checked all things three time to make sure that there is no bug somewhere, and have no other idea to try. Any help would be appreciated!

Rainbow
  • 171
  • 9

1 Answers1

2

Try setting CPXPARAM_TimeLimit instead:

https://www.ibm.com/docs/en/icos/22.1.1?topic=parameters-optimizer-time-limit-in-seconds

CPX_PARAM_TILIM was deprecated a few versions ago.

It's now more than three hours and still no stopping.

Do you have the log? What is CPLEX doing for all that time?

If that doesn't work, then no suggestions. You could contact IBM for support, but this is likely an issue in CPLEX, not in JuMP or CPLEX.jl.

Oscar Dowson
  • 2,395
  • 1
  • 5
  • 13
  • thanks for the suggest. Do you know if models stops how to know if it stops due to time limits or due to real lower solution time? – Rainbow May 11 '23 at 09:31
  • 2
    You can check the Solution Status Codes. For instance 1 means CPX_STAT_OPTIMAL and 11 means CPX_STAT_ABORT_TIME_LIM – Alex Fleischer May 11 '23 at 12:43
  • 2
    To get the status in Julia try `termination_status(model)`. To see the list of available statuses execute in the console: `MOI.TerminationStatusCode` (both commands assume that `using JuMP` has been executed) – Przemyslaw Szufel May 11 '23 at 15:41