# Need help to write a conic constraint

**URL:** <https://discourse.julialang.org/t/need-help-to-write-a-conic-constraint/19181>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 2, 2019, 8:04am UTC](https://discourse.julialang.org/t/need-help-to-write-a-conic-constraint/19181 "2019-01-02T08:04:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asavasci](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@asavasci](https://discourse.julialang.org/u/asavasci)\
**Post date:** [January 2, 2019, 8:04am UTC](https://discourse.julialang.org/t/need-help-to-write-a-conic-constraint/19181/1 "2019-01-02T08:04:12Z")

</div>

Hello Everyone, I am getting error when I try to code the conic constraint  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/3/831e3e04b37dad80bc3ef0d03a7543810ddfb95d.png)

as  
@constraint(m, soc[t=1:T, i=1:N], norm( [2\*p[t,i], [g[t,i]-u[t,i]]) \<= g[t,i]+u[t,i] )  
the error message :  
JuMP does not support mixing quadratic and conic constraints

Then, I attempted to code this constraint as  
@NLconstraint(m, soc[t=1:T, i=1:N], norm( [2\*p[t,i], [g[t,i]-u[t,i]]) \<= g[t,i]+u[t,i] )  
the error message:  
UndefVarError: cfunction not defined

Note: I’m using Mosek solver and JuMP version 0.18.
