# Integer Optimization: performance help

**URL:** <https://discourse.julialang.org/t/integer-optimization-performance-help/67524>\
**Category:** Optimization (Mathematical)\
**Tags:** performance\
**Created:** [September 1, 2021, 6:52pm UTC](https://discourse.julialang.org/t/integer-optimization-performance-help/67524 "2021-09-01T18:52:27Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [September 1, 2021, 9:20pm UTC](https://discourse.julialang.org/t/integer-optimization-performance-help/67524/4 "2021-09-01T21:20:29Z")

</div>

I don’t really understand what your nonanticipativity constraints are doing, or why they are quadratics.

You could consider doing this `binary * binary` to linear reformulation:

> [@Specifying datatype in JuMP expressions and constraints to save memory](https://discourse.julialang.org/t/specifying-datatype-in-jump-expressions-and-constraints-to-save-memory/66515/12):
>
> You may be able to reformulate as a linear program, or at least a linearly-constrained one. This may not help the memory by added even more objects, but it may help the solver. Since r\_i\_j and y\_i\_k are binary variables, their product can be replaced with an additional variable and four sparse inequalities. This is the McCormick envelope, but enforcing binary variables means it is an exact reformulation (e.g. cf. [McCormick envelopes - optimization](https://optimization.mccormick.northwestern.edu/index.php/McCormick_envelopes)). Setting x = ry, with r and y binary variabl…

---

_[View the full topic](https://discourse.julialang.org/t/integer-optimization-performance-help/67524)._
