Importance of **** ERRORS/WARNINGS IN EQUATION EQX ...

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Importance of **** ERRORS/WARNINGS IN EQUATION EQX ...

Post by Archiver »


Dear all,

When solving a Mixed Complementarity Problem with PATH solver I get some error/warnings in my report summary as follows:

**** REPORT SUMMARY : 0 NONOPT
0 INFEASIBLE
0 UNBOUNDED
0 REDEFINED
97 ERRORS ( ****)

The thing is: Gams gives me a solution that seems optimal to me (also see second solution on the log file attached) :

** EXIT - solution found.

Residual. . . . . . . . . . . . 5.428446e-010
Postsolved residual: 5.4284e-010

Moreover the model gives me current values for the variables that seem to satisfy my set of hypothesis/constraints even those implied in the error equations.

The errors are linked to some variables of my equations (CES technology) which tend to zero or infinity because of their sensibility to exponentiation. For example:

**** ERRORS/WARNINGS IN EQUATION EQPXCROP(FR,2009)
2 error(s): vcPower: FUNC DOMAIN: x**c, x < 0 (RETURNED 0)


Then my questions:

- Is this a PATH or a GAMS error reporting?
- What is the behaviour of GAMS when encountering such mistake?
- Is my solution opitmal ?
- Is there a way to avoid these errors (scaling maybe?)

Thank you very much!!

Jonathan

--
Attachments
gamslogfile.txt
(17.35 KiB) Downloaded 347 times
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Importance of **** ERRORS/WARNINGS IN EQUATION EQX ...

Post by Archiver »

Jonathan,

The behavior you describe is illustrated (minimally, in some sense) in the model below:

variable x / L 2 /;
equation f;
f.. x**0.5 =e= 0.5;
model m / f.x /;
solve m using mcp;

PATH uses a variant of Newton's method for MCPs. For the smooth system above, that simplifies to using a line-search damped Newton method. If you sketch the function f and start Newton at x_0 = 2, you can see the Newton point is negative. PATH does a trial evaluation there but since the function x**0.5 is not defined for x 0. This error is reported in the .lst file. The end result is the correct solution, but it involved looking at some trial points where the function was not defined.

In this simple case, you can avoid this by putting a lower bound on x, say x >= 1e-5. In more complicated cases, you may be raising some complicated expression to the power of 0.5, and how to bound this expression may not be so obvious.

PATH will not return a solution point at which the function is not defined. Warnings about domain violations are just about trial points, which PATH will not accept as iterates.

-Steve

On Wed, May 27, 2015 at 8:57 AM, Jonathan wrote:

Dear all,

When solving a Mixed Complementarity Problem with PATH solver I get some error/warnings in my report summary as follows:

**** REPORT SUMMARY : 0 NONOPT
0 INFEASIBLE
0 UNBOUNDED
0 REDEFINED
97 ERRORS ( ****)

The thing is: Gams gives me a solution that seems optimal to me (also see second solution on the log file attached) :

** EXIT - solution found.

Residual. . . . . . . . . . . . 5.428446e-010
Postsolved residual: 5.4284e-010

Moreover the model gives me current values for the variables that seem to satisfy my set of hypothesis/constraints even those implied in the error equations.

The errors are linked to some variables of my equations (CES technology) which tend to zero or infinity because of their sensibility to exponentiation. For example:

**** ERRORS/WARNINGS IN EQUATION EQPXCROP(FR,2009)
2 error(s): vcPower: FUNC DOMAIN: x**c, x < 0 (RETURNED 0)


Then my questions:

- Is this a PATH or a GAMS error reporting?
- What is the behaviour of GAMS when encountering such mistake?
- Is my solution opitmal ?
- Is there a way to avoid these errors (scaling maybe?)

Thank you very much!!

Jonathan

--
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.
For more options, visit https://groups.google.com/d/optout.




--
Steven Dirkse, Ph.D.
GAMS Development Corp., Washington DC
Voice: (202)342-0180 Fax: (202)342-0181
sdirkse@gams.com
http://www.gams.com
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Importance of **** ERRORS/WARNINGS IN EQUATION EQX ...

Post by Archiver »


Thank you Steve for the quick and yet very clear answer!

Jonathan

Le mercredi 27 mai 2015 21:37:08 UTC+2, Steven Dirkse a écrit :

Jonathan,

The behavior you describe is illustrated (minimally, in some sense) in the model below:

variable x / L 2 /;
equation f;
f.. x**0.5 =e= 0.5;
model m / f.x /;
solve m using mcp;

PATH uses a variant of Newton's method for MCPs. For the smooth system above, that simplifies to using a line-search damped Newton method. If you sketch the function f and start Newton at x_0 = 2, you can see the Newton point is negative. PATH does a trial evaluation there but since the function x**0.5 is not defined for x 0. This error is reported in the .lst file. The end result is the correct solution, but it involved looking at some trial points where the function was not defined.

In this simple case, you can avoid this by putting a lower bound on x, say x >= 1e-5. In more complicated cases, you may be raising some complicated expression to the power of 0.5, and how to bound this expression may not be so obvious.

PATH will not return a solution point at which the function is not defined. Warnings about domain violations are just about trial points, which PATH will not accept as iterates.

-Steve

On Wed, May 27, 2015 at 8:57 AM, Jonathan wrote:

Dear all,

When solving a Mixed Complementarity Problem with PATH solver I get some error/warnings in my report summary as follows:

**** REPORT SUMMARY : 0 NONOPT
0 INFEASIBLE
0 UNBOUNDED
0 REDEFINED
97 ERRORS ( ****)

The thing is: Gams gives me a solution that seems optimal to me (also see second solution on the log file attached) :

** EXIT - solution found.

Residual. . . . . . . . . . . . 5.428446e-010
Postsolved residual: 5.4284e-010

Moreover the model gives me current values for the variables that seem to satisfy my set of hypothesis/constraints even those implied in the error equations.

The errors are linked to some variables of my equations (CES technology) which tend to zero or infinity because of their sensibility to exponentiation. For example:

**** ERRORS/WARNINGS IN EQUATION EQPXCROP(FR,2009)
2 error(s): vcPower: FUNC DOMAIN: x**c, x < 0 (RETURNED 0)


Then my questions:

- Is this a PATH or a GAMS error reporting?
- What is the behaviour of GAMS when encountering such mistake?
- Is my solution opitmal ?
- Is there a way to avoid these errors (scaling maybe?)

Thank you very much!!

Jonathan

--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.




--
Steven Dirkse, Ph.D.
GAMS Development Corp., Washington DC
Voice: (202)342-0180 Fax: (202)342-0181
sdi...@gams.com
http://www.gams.com

--
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.
For more options, visit https://groups.google.com/d/optout.
akom361
User
User
Posts: 1
Joined: 1 year ago

Re: Importance of **** ERRORS/WARNINGS IN EQUATION EQX ...

Post by akom361 »

Dear All,

I have similar problem as Jonathan dealing with the vcpower error/warning in the CES equations, as follow:
**** ERRORS/WARNINGS IN EQUATION e_xd(FCROPS,DOM)
8 error(s): vcPower: FUNC DOMAIN: x**c, x < 0 (RETURNED 0)

I already tried to add lower bound as explained and following the example given by Steve.
I add the following code right after the variable declaration:
xd.lo("FCROPS","DOM")=0.00001;

However, once I add that lower bound code, I come across with another errors, as follow:

**** Unmatched variable not free or fixed
XD(FCROPS,DOM)

**** Counts do not match
Single equations in unmatched =E= blocks 13311
Unmatched single free variables 13310
I simply do not understand, why adding lower bound reduced the endogenous variables?
Could anyone help me with this issue? Many thanks in advance.

-Ahmad-
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: Importance of **** ERRORS/WARNINGS IN EQUATION EQX ...

Post by abhosekar »

Ahmad,

Are FCROPS and DOM set elements or they are set names? When you write in quotes, it implies they are set elements. If you have to set the lower bound for all xd, you would do
xd.lo(fcrops, dom) = 0.0001;

If you want to set lower bound for one of the elements say (fcrops1, dom1), you would use quotes

xd.lo("fcrops1", "dom1") = 0.0001;

Hopt this helps.

- Atharv
Post Reply