# Second order cone constraint in JuMP 0.19 with JuMP solver

**URL:** <https://discourse.julialang.org/t/second-order-cone-constraint-in-jump-0-19-with-jump-solver/37214>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump, mosek\
**Created:** [April 8, 2020, 4:48am UTC](https://discourse.julialang.org/t/second-order-cone-constraint-in-jump-0-19-with-jump-solver/37214 "2020-04-08T04:48:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chengda\_Ji](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chengda_ji/32/13932_2.png) [@Chengda\_Ji](https://discourse.julialang.org/u/Chengda_Ji)\
**Post date:** [April 8, 2020, 4:48am UTC](https://discourse.julialang.org/t/second-order-cone-constraint-in-jump-0-19-with-jump-solver/37214/1 "2020-04-08T04:48:25Z")

</div>

Hi all,

When trying to implement the SOCP in JuMP and Mosek, the Mosek solver stalls and SLOW\_PROGRESS JuMP status show up. After checking the results, I notice that it is not feasible, and the upper bounds are depressed.  
Post: [https://discourse.julialang.org/t/second-order-cone-constraint-in-jump-0-19-with-gurobi-solver/21813/4?u=chengda\_ji](https://discourse.julialang.org/t/second-order-cone-constraint-in-jump-0-19-with-gurobi-solver/21813/4) has successfully addressed this problem by adding upper\_bounds when defining the variable.

Unfortunately, in my case, the upper bounds are coupled by the decision variable, as showed in the code below.

```julia
@variable(m, x[1:5, 1])
@variable(m, 0<=y[1:5, 1]<=1)
for i=1:4
@constraint(x[i]==y[i]+sum(x[j,1] for j in i+1:5))
@constraint(m, [0.5*10, 10, x[Bus,1],y[Bus,1]] in RotatedSecondOrderCone());
end

```

Really appericate it if anyone can help me with that.

---

<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:** [April 8, 2020, 12:18pm UTC](https://discourse.julialang.org/t/second-order-cone-constraint-in-jump-0-19-with-jump-solver/37214/2 "2020-04-08T12:18:08Z")

</div>

I can’t run your example because `Bus` is not defined. I’m guessing you want it to be `x[i, 1], y[i, 1]` instead.
