# Recommended way of solving multiple similar problems with JuMP

**URL:** <https://discourse.julialang.org/t/recommended-way-of-solving-multiple-similar-problems-with-jump/22055>\
**Category:** Optimization (Mathematical)\
**Created:** [March 19, 2019, 2:08pm UTC](https://discourse.julialang.org/t/recommended-way-of-solving-multiple-similar-problems-with-jump/22055 "2019-03-19T14:08:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Rollen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sebastian_rollen/32/7498_2.png) [@Sebastian\_Rollen](https://discourse.julialang.org/u/Sebastian_Rollen)\
**Post date:** [March 19, 2019, 2:08pm UTC](https://discourse.julialang.org/t/recommended-way-of-solving-multiple-similar-problems-with-jump/22055/1 "2019-03-19T14:08:43Z")

</div>

Hi,

I have an application where I have to solve a quadratic problem multiple times, with the only thing changing between problems being the RHS of a constraint. Currently I do this by setting up the problem with the RHS as a JuMP variable, and then looping through the applicable RHS values and `fix`ing the variable as described [here](http://www.juliaopt.org/JuMP.jl/v0.19.0/constraints/#Constraint-modifications-1) in the documentation.

This works fine when I use a local solver, but I’d like to send the problem to Gurobi using their Remote Services. I’ve set everything up, and it works, but the bottle-neck now seems to be having to send the problem and solution back and forth over the network many hundreds of times. Is there a way of setting up a JuMP environment so that I can try to solve all of these sub-problems at once with one `optimize` call? Or alternatively, what’s the recommended practice for solving many similar problems with only one changing constraint at once?

Thanks in advance for any help

---

<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:** [March 19, 2019, 2:20pm UTC](https://discourse.julialang.org/t/recommended-way-of-solving-multiple-similar-problems-with-jump/22055/2 "2019-03-19T14:20:32Z")

</div>

The recommended way is in a loop using `JuMP.fix` as you are doing.

Gurobi’s cloud services aren’t really intended for this use-case. You could try asking them on their forum [Redirecting to Google Groups](https://groups.google.com/forum/#!forum/gurobi)
