# Convex DCP rules

**URL:** <https://discourse.julialang.org/t/convex-dcp-rules/50027>\
**Category:** General Usage\
**Created:** [November 12, 2020, 6:45am UTC](https://discourse.julialang.org/t/convex-dcp-rules/50027 "2020-11-12T06:45:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![faisal\_moh](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@faisal\_moh](https://discourse.julialang.org/u/faisal_moh)\
**Post date:** [November 12, 2020, 6:45am UTC](https://discourse.julialang.org/t/convex-dcp-rules/50027/1 "2020-11-12T06:45:26Z")

</div>

Hi,  
I’m new to Julia and reviewing the convex package.  
I provided the objective function of max(100a + 150b), constrained to b \<= 99 and 372a^2 + 55b^2 \<= 628. This is the simplified formulation of my actual objective function. Though the function and constraints are DCP, I was expecting it to flag a warning since it is not concave/convex, but no warnings were thrown. Am I misinterpreting something about the package and it’s overall problem DCP definition?

---

<div class="post-metadata">

**Author:** ![tomerarnon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomerarnon/32/3170_2.png) [@tomerarnon](https://discourse.julialang.org/u/tomerarnon)\
**Post date:** [November 12, 2020, 1:52pm UTC](https://discourse.julialang.org/t/convex-dcp-rules/50027/2 "2020-11-12T13:52:00Z")

</div>

Looks DCP to me. The objective is affine (which can take the role of either convex/concave depending on what is needed) and the constraint is convex. If you were trying to maximize a convex expression in the objective, this would not be DCP anymore, but since `max(affine) = min(-affine) => min(affine)`, it’s fine.
