## Error 2- Identifier Expected

Problems with syntax of GAMS
Zohreh
User
Posts: 9
Joined: 7 months ago

### Re: Error 2- Identifier Expected

Thank you very much for your complete response.
We actually celebrate Nowrouz, which is the first day of Spring.
Anyway, Happy Christmas!
I wish you the bests.

Zohreh
User
Posts: 9
Joined: 7 months ago

### Re: Error 2- Identifier Expected

Dear Dr. Bussieck,
The model works well, but I have one problem.
In equation
1/Te*log((W*Te/D)+1) =L= M-N
the models considers the left hand side up to 2 digits and it causes some numerical examples get the wrong answer.
I have attached the Excel File, including four numerical examples. In the second and fourth ones, GAMS considers the rounded value of the above mentioned equation's left hand side up to 2 digits.
I would highly appreciate it if you help me solve this issue.
Best regards.
input - Copy.xlsx

dirkse
Moderator
Posts: 126
Joined: 3 years ago
Location: Fairfax, VA

### Re: Error 2- Identifier Expected

Zohreh,

GAMS does its calculations in double-precision arithmetic - there is no calculating "up to 2 digits" or anything like that. However, the listing file displays values in rounded form. Also, solvers do their calculations with tolerances, so an equation like LHS <= RHS is not satisfied exactly, but only within a tolerance (e.g. 1e-5 or similar). These facts, or perhaps others, may be relevant to tracking down any inconsistencies between your results and your expectations, but it's not likely to be any rounded calculations in GAMS itself.

I could perhaps say more if you could be more explicit about the problem. For example, what result in GAMS do you see that you don't expect? What do you expect to see instead? Why?

-Steve

Zohreh
User
Posts: 9
Joined: 7 months ago

### Re: Error 2- Identifier Expected

Dear Dr. Dirkse,
I have 2 cases: Tw<=(M-N) and Tw>=(M-N).
If Tw<(M-N), the result would be the minimum of m1, m2, and m3 (m4, m5, m6, m7, and m8 are definitely infeasible).
If Tw>(M-N), the result would be the minimum of m4, m5, m6, m7, and m8 (m1, m2, and m3 are definitely infeasible).
If Tw=(M-N), the result would be the minimum of m1 to m8 (of course the ones which are feasible).
In the Excel file, for Sc1 and Sc2, Tw=0.059991 and M-N= 0.07, since Tw<(M-N), I expected the result be the minimum of m1, m2, and m3. But, GAMS finds feasible solutions for m1, m2, m3, and m5 (it considers Tw=(M-N)).
Thank you very much for your attention.
input - Copy.xlsx