# Solver time

**URL:** https://discourse.julialang.org/t/solver-time/42114
**Category:** Optimization (Mathematical)
**Created:** [June 26, 2020, 4:37pm UTC](https://discourse.julialang.org/t/solver-time/42114 "2020-06-26T16:37:40Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![lausilvag](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lausilvag/32/9778_2.png) [@lausilvag](https://discourse.julialang.org/u/lausilvag)
#### Post date: [June 26, 2020, 4:37pm UTC](https://discourse.julialang.org/t/solver-time/42114/1 "2020-06-26T16:37:40Z")

</div>

Hi!  
I have the following problem

```
t3 = time()
Z_OP = Model(with_optimizer(CPLEX.Optimizer))
t4 = time()
if RE ==2
    @variable(Z_OP, 0 <= x[l,m] <= 1 )
else
    @variable(Z_OP, x[l,m], Bin)
end
t5 = time()
for i = 1:size(A,1)
    @constraint(Z_OP, (A*x)[i,1] .== 1)           
end
t6 = time()
@objective(Z_OP, Min, sum(B*x))
t7 = time()
optimize!(Z_OP)

```

when I run the model, t6-t5 is very large if I compare it with t7-t6.

For 220 constraints and 24310 variables:  
t6-t5 = 105.4s  
t7-t6 = 0.304s

I have no idea what that time (t6-t5) refers to or why it takes longer in that step. Anybody can help me, please!!!  
🙂

---

_[View the full topic](https://discourse.julialang.org/t/solver-time/42114)._
