# Question regarding TIME\_LIMIT status

**URL:** <https://discourse.julialang.org/t/question-regarding-time-limit-status/42258>\
**Category:** Optimization (Mathematical)\
**Created:** [June 29, 2020, 4:15pm UTC](https://discourse.julialang.org/t/question-regarding-time-limit-status/42258 "2020-06-29T16:15:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arkanver](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@arkanver](https://discourse.julialang.org/u/arkanver)\
**Post date:** [June 29, 2020, 4:15pm UTC](https://discourse.julialang.org/t/question-regarding-time-limit-status/42258/1 "2020-06-29T16:15:51Z")

</div>

Hi,

I am trying to solve some optimization problems using JuMP + CPLEX. Since some problems take a long time I define a time limit of 3600 seconds for my model :

> model = Model(CPLEX.Optimizer)  
> set\_optimizer\_attribute(model, “CPX\_PARAM\_TILIM”, 3600)

During the resolution it seems quite clear that there are dual solutions. Here is an extract of the solver’s output :

> Iteration log . . .  
> Iteration: 1 Dual objective = 17.000000  
> Iteration: 279 Dual objective = 103.439732  
> Iteration: 611 Dual objective = 123.893585  
> Iteration: 942 Dual objective = 136.268979  
> Iteration: 1305 Dual objective = 141.619549

I am interested in these dual objective values, however I cannot query them. As soon as the time limit is reached, I get the following :

> ERROR: AssertionError: MOI.get(model, MOI.TerminationStatus()) == MOI.INFEASIBLE

This happens on the line where I call optimize! . I expected to get a status such as MOI.TIME\_LIMIT and still be able to query information about the model. Am I doing something wrong, or is there a problem with JuMP / CPLEX.jl ?

I am on Julia 1.3.1, JuMP 0.21.2, and CPLEX.jl 0.6.5, thank you for reading.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [June 29, 2020, 5:34pm UTC](https://discourse.julialang.org/t/question-regarding-time-limit-status/42258/2 "2020-06-29T17:34:12Z")

</div>

This was fixed in a recent commit. I will prepare a new release, but you can test that it works with

```nohighlight
] add CPLEX#master

```

---

<div class="post-metadata">

**Author:** ![arkanver](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@arkanver](https://discourse.julialang.org/u/arkanver)\
**Post date:** [June 29, 2020, 7:09pm UTC](https://discourse.julialang.org/t/question-regarding-time-limit-status/42258/3 "2020-06-29T19:09:21Z")

</div>

Thank you very much ! I’ll be trying that right away.
