Hello gamsworld,

I’m trying to solve a constrained nonlinear system (10,000 variables and 10,000 equations, which are at worst quadratic), but have an issue with scaling. I’ve gotten a rough initial guess for my variables and want to use that for variable/equation scaling as well. The problem is that one set of parameters in the model has values that range from 1E-11 to 1E+20. Those parameters multiply variables that may range from 1E-12 to 1E0, so it doesn’t seem possible to ignore some of the parameters (e.g., set the small ones to zero).

In trying to enforce scales, I get this error:

**** Illegal value(s) in Variable r.scale reset to 1.0

scale must be greater than 1.0e-20

Is there a way to change the allowed range of variable scales?

Or has anyone had success at solving a similarly poorly scaled CNS?

I’ve tried solving the problem without scaling as a CNS using

model P1 / all /;

option cns=conopt;

solve P1 using cns;

as well as a NLP (with dummy objective function, z=1)

option nlp=ipopt;

solve P1 max z using nlp;

with no success.

Each solver I try on the problem without scaling returns that the model is either poorly scaled or infeasible.

Any help would be greatly appreciated!

Alex

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

\

## Hi Alex

GAMS has internal check to make sure that you do not define â€˜crazyâ€™ scale factors and this limit has been set to 1.e-20. It is highly unusual to have such small scale factors, and for most users it would be a real error.

Since there is this limit you can try to adjust the values you have selected so the smallest is 1.e-20 â€“ it may be small enough. Use something like r.scale = max(expression, 1.e-20);

If this is not sufficient I think you will have to do the scaling yourself. This means that you will have to define some new variables by multiplying your original variables with some appropriate scale factors so that the new variable is expected to be around 1, and you may have to multiply both left and right hand sides of your constraints with some scale factors so the terms in the constraint is around 1.

You should be aware that both solvers and GAMS have some filters which usually means that very small values (in the GAMS-scaled model) will be set to zero. The tolerance in GAMS is as far as I remember around 1.e-20.

Good luck

Arne

\

Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk

From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Alex Marvin

Sent: Wednesday, May 01, 2013 12:34 AM

To: gamsworld@googlegroups.com

Subject: Variable scaling OR efficient CNS models with poorly scaled parameters

Hello gamsworld,

I’m trying to solve a constrained nonlinear system (10,000 variables and 10,000 equations, which are at worst quadratic), but have an issue with scaling. I’ve gotten a rough initial guess for my variables and want to use that for variable/equation scaling as well. The problem is that one set of parameters in the model has values that range from 1E-11 to 1E+20. Those parameters multiply variables that may range from 1E-12 to 1E0, so it doesn’t seem possible to ignore some of the parameters (e.g., set the small ones to zero).

In trying to enforce scales, I get this error:

**** Illegal value(s) in Variable r.scale reset to 1.0

scale must be greater than 1.0e-20

Is there a way to change the allowed range of variable scales?

Or has anyone had success at solving a similarly poorly scaled CNS?

I’ve tried solving the problem without scaling as a CNS using

model P1 / all /;

option cns=conopt;

solve P1 using cns;

as well as a NLP (with dummy objective function, z=1)

option nlp=ipopt;

solve P1 max z using nlp;

with no success.

Each solver I try on the problem without scaling returns that the model is either poorly scaled or infeasible.

Any help would be greatly appreciated!

Alex

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

\