# Time to find the first feasible integer solution with JuMP

**URL:** https://discourse.julialang.org/t/time-to-find-the-first-feasible-integer-solution-with-jump/106693
**Category:** Optimization (Mathematical)
**Tags:** jump, cplex
**Created:** [November 24, 2023, 8:49pm UTC](https://discourse.julialang.org/t/time-to-find-the-first-feasible-integer-solution-with-jump/106693 "2023-11-24T20:49:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![baprata](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baprata/32/204269_2.png) [@baprata](https://discourse.julialang.org/u/baprata)
#### Post date: [November 24, 2023, 8:49pm UTC](https://discourse.julialang.org/t/time-to-find-the-first-feasible-integer-solution-with-jump/106693/1 "2023-11-24T20:49:32Z")

</div>

I am solving a mixed-integer linear programming model with JuMP and CPLEX. How could I measure the time required to find the first feasible integer solution?

Best regards,

Bruno

---

<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: [November 24, 2023, 9:43pm UTC](https://discourse.julialang.org/t/time-to-find-the-first-feasible-integer-solution-with-jump/106693/2 "2023-11-24T21:43:08Z")

</div>

You could set the `CPXPARAM_MIP_Limits_Solutions` parameter to `1` and time that:

> **[MIP integer solution limit](https://www.ibm.com/docs/en/icos/12.9.0?topic=parameters-mip-integer-solution-limit)**
>
> Sets the number of MIP solutions to be found before stopping.

```julia
using JuMP, CPLEX
model = Model(CPLEX.Optimizer)
set_attribute(model, "CPXPARAM_MIP_Limits_Solutions", 1)

```

---

<div class="post-metadata">

### Author: ![baprata](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baprata/32/204269_2.png) [@baprata](https://discourse.julialang.org/u/baprata)
#### Post date: [November 24, 2023, 11:05pm UTC](https://discourse.julialang.org/t/time-to-find-the-first-feasible-integer-solution-with-jump/106693/3 "2023-11-24T23:05:10Z")

</div>

Dear Oscar,  
Thank you very much.  
Best,  
Bruno
