Domain Errors

Hello
I have a code that had several errors. I fixed most of them by defining initial conditions to fix the division by zero errors and replacing some ** operators with power functions.
Now, I have domain errors that I could not fix. Please help.
parameters.gms (3.36 KB)

GAMS is very very explicit: "**** Exec Error at line 67: rPower: FUNC DOMAIN: xy, x=0,y<0". Your line 67 looks as follows: 67 eq7 … PH2 =e= 0.5*(RHaPH2O)((exp((1.635Ifc/A)/(signpower(Tfc,1.334)))(RHa*PH2O/Pa)(-1))-1); There is just one term with ** in there. Looking at the initial value of RHA, PH2O, and Pa only Pa is set to 0, so we have 0**-1 which GAMS does not like. Set values for Pha and PH2O and continue in the manner to eliminate all function and gradient evaluation errors. You can also try to run with a solver that does not need a starting point, e.g. BARON (https://www.gams.com/latest/docs/S_BARON.html#BARON_NO_STARTING_POINT_IS_REQUIRED). You need to set “option sys12=1;” to let GAMS pass the model on to the solver that can’t be evaluated at the input point. BTW, BARON declares the model unbounded.

-Michael

parameters.gms (3.43 KB)

Thank you ver much Michael for your help. I did what you suggested but now I have fatal errors with the solver. Please see the attached file.

Hmm, GAMS has many solvers. You need to be specific. Best if you attach your log file. I have attached the log of the BARON solver. As I said before, it declares the model unbounded, but that’s an okay outcome in optimization (optimal, infeasible, or unbounded are the three possible outcomes of an optimization problem). Not every solver will be happy with a model where the expressions can be in a way that they can’t be evaluated. Perhaps, you read up on the challenges of NLP solving: https://www.gams.com/latest/docs/S_CONOPT.html#CONOPT_FUNCTION_EVALUATION_ERRORS

-Michael
parameters.log (3.88 KB)

Thank you very much bussieck for your help. I used the BARON solver and the problem was solved.