# SOC constraint using Gurobi

**URL:** https://discourse.julialang.org/t/soc-constraint-using-gurobi/3438
**Category:** Optimization (Mathematical)
**Created:** [April 30, 2017, 1:13am UTC](https://discourse.julialang.org/t/soc-constraint-using-gurobi/3438 "2017-04-30T01:13:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ahassansan](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ahassansan](https://discourse.julialang.org/u/ahassansan)
#### Post date: [April 30, 2017, 1:13am UTC](https://discourse.julialang.org/t/soc-constraint-using-gurobi/3438/1 "2017-04-30T01:13:40Z")

</div>

what is the proper syntax to add second order cone constraints? I am using Gurobi solver with JuMP.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [April 30, 2017, 1:15am UTC](https://discourse.julialang.org/t/soc-constraint-using-gurobi/3438/2 "2017-04-30T01:15:01Z")

</div>

Which part of the JuMP documentation is unclear?

---

<div class="post-metadata">

### Author: ![ahassansan](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ahassansan](https://discourse.julialang.org/u/ahassansan)
#### Post date: [April 30, 2017, 7:34pm UTC](https://discourse.julialang.org/t/soc-constraint-using-gurobi/3438/3 "2017-04-30T19:34:28Z")

</div>

Is there any special command for SOC constraints or I can just use @constraint? I am getting an error ERROR: LoadError: /(::Int64,::JuMP.Variable) is not defined. Are you trying to build a nonlinear problem? Make sure you use @NLconstraint/@NLobjective.

---

<div class="post-metadata">

### Author: ![miles.lubin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miles.lubin/32/279_2.png) [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)
#### Post date: [April 30, 2017, 7:38pm UTC](https://discourse.julialang.org/t/soc-constraint-using-gurobi/3438/4 "2017-04-30T19:38:59Z")

</div>

[http://www.juliaopt.org/JuMP.jl/0.16/refmodel.html#second-order-cone-constraints](http://www.juliaopt.org/JuMP.jl/0.16/refmodel.html#second-order-cone-constraints)
