# Debugging optimization problem in jump

**URL:** <https://discourse.julialang.org/t/debugging-optimization-problem-in-jump/17798>\
**Category:** Optimization (Mathematical)\
**Created:** [November 21, 2018, 1:12am UTC](https://discourse.julialang.org/t/debugging-optimization-problem-in-jump/17798 "2018-11-21T01:12:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rasoul](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@Rasoul](https://discourse.julialang.org/u/Rasoul)\
**Post date:** [November 21, 2018, 1:12am UTC](https://discourse.julialang.org/t/debugging-optimization-problem-in-jump/17798/1 "2018-11-21T01:12:00Z")

</div>

Hi everybody,

I want to debug my code in julia that solves an optimization problem. I used to debug optimization problem in Matlab by assigning, the corresponding solution obtained by another approach, to variables. “assign” and “check constraint” commands in Matlab can make the debugging process smooth. I am wondering if there are similar commands in julia that can do the same. I will appreciate it if you let me know how can I do the debugging process in julia by assigning, the corresponding solution obtained by another approach, to variables.

All the best,  
Rasoul

---

<div class="post-metadata">

**Author:** ![leethargo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leethargo/32/6004_2.png) [@leethargo](https://discourse.julialang.org/u/leethargo)\
**Post date:** [November 21, 2018, 7:53am UTC](https://discourse.julialang.org/t/debugging-optimization-problem-in-jump/17798/2 "2018-11-21T07:53:00Z")

</div>

Assuming you are using JuMP to formulate the model, as far as I know, this is not supported at the modeling level.

But note that you can give initial values to variables in the model. Iterative NLP solvers would use these as initial values for first iterations. Some MIP solvers use these to add a valid solution to the solution pool, or (in case the solution is only partial) for a neighborhood search heuristic.

Maybe the solver you are using supports some analysis like you describe?

---

<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:** [November 21, 2018, 1:35pm UTC](https://discourse.julialang.org/t/debugging-optimization-problem-in-jump/17798/3 "2018-11-21T13:35:32Z")

</div>

No, it’s not currently supported. See [https://github.com/JuliaOpt/JuMP.jl/issues/693](https://github.com/JuliaOpt/JuMP.jl/issues/693) for additional discussion.
