# Optimizing a quadratic binary function on CPLEX/JuMP

**URL:** <https://discourse.julialang.org/t/optimizing-a-quadratic-binary-function-on-cplex-jump/53800>\
**Category:** Optimization (Mathematical)\
**Created:** [January 22, 2021, 7:16pm UTC](https://discourse.julialang.org/t/optimizing-a-quadratic-binary-function-on-cplex-jump/53800 "2021-01-22T19:16:53Z")\
**Posts on this page:** 1\
**Showing post:** 11

<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:** [January 23, 2021, 9:23pm UTC](https://discourse.julialang.org/t/optimizing-a-quadratic-binary-function-on-cplex-jump/53800/11 "2021-01-23T21:23:21Z")

</div>

There might be a couple of things going on here:

1. We are retaining the previous MIP starts, rather than clearing them on subsequent solves: [https://github.com/jump-dev/CPLEX.jl/issues/352](https://github.com/jump-dev/CPLEX.jl/issues/352). I don’t know what, if anything, fixing this will do.
2. Warm-starts are a hint to the solver. They _may_ choose to use them if they think it will help. It certainly looks like in this case the solver receives them at the start of the log, but ignores them during the branch-and-bound. I don’t know why. You would have to follow up with CPLEX support for more details.

p.s. As a quick way, you can set the start value from a previous solution as follows:

```julia
vars = all_variables(model)
set_start_value.(vars, value.(vars))

```

---

_[View the full topic](https://discourse.julialang.org/t/optimizing-a-quadratic-binary-function-on-cplex-jump/53800)._
