# Variable and Equation scaling in JuMP

**URL:** <https://discourse.julialang.org/t/variable-and-equation-scaling-in-jump/5700>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, optim, juliapro\
**Created:** [September 3, 2017, 6:50pm UTC](https://discourse.julialang.org/t/variable-and-equation-scaling-in-jump/5700 "2017-09-03T18:50:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharabh\_Shukla](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@Sharabh\_Shukla](https://discourse.julialang.org/u/Sharabh_Shukla)\
**Post date:** [September 3, 2017, 6:50pm UTC](https://discourse.julialang.org/t/variable-and-equation-scaling-in-jump/5700/1 "2017-09-03T18:50:48Z")

</div>

HI everybody,

I am writing a SOCP(Second Order Conic Program) in Julia, moving from GAMS. I was wondering how to get variable scaling in JuMP, I need it since in my model some of the variables and equations are badly scaled. This might be creating problems with convergence.

Any help and suggestions are appreciated.

---

<div class="post-metadata">

**Author:** ![Sharabh\_Shukla](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@Sharabh\_Shukla](https://discourse.julialang.org/u/Sharabh_Shukla)\
**Post date:** [September 6, 2017, 5:24pm UTC](https://discourse.julialang.org/t/variable-and-equation-scaling-in-jump/5700/2 "2017-09-06T17:24:27Z")

</div>

Do I have to manually do it, attaching scaling factors to each of the variables and equations that are badly scaled? I was expecting some elegant way of handling like, how GAMS does.

Please let me if someone knows a good way of handling this.

---

<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 6, 2017, 9:18pm UTC](https://discourse.julialang.org/t/variable-and-equation-scaling-in-jump/5700/3 "2017-09-06T21:18:14Z")

</div>

JuMP’s goal is to communicate what you write down to the solver without doing reformulations.

So yes, you will have to do the re-scaling manually.

Oscar

---

<div class="post-metadata">

**Author:** ![Sharabh\_Shukla](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@Sharabh\_Shukla](https://discourse.julialang.org/u/Sharabh_Shukla)\
**Post date:** [November 11, 2017, 2:45am UTC](https://discourse.julialang.org/t/variable-and-equation-scaling-in-jump/5700/4 "2017-11-11T02:45:25Z")

</div>

Thanks, @odow. I was able to do it easily, no issues.!! Got my reults
