To help you it would be good to know how exactly your code fails (share log, lst and files to reproduce). If I adopt your code snippet to model from the model library, everything works as expected.
Thanks for your comment. I was trying to solve the attached example using GAMS/Kestrel via GAMS studio 28.1.0.
When I solve the model log file is as follows:
--- Job GAMS..Kestrel.gms Start 08/20/19 10:29:58 28.1.0 r5b48834 WEX-WEI x86 64bit/MS Windows
--- GAMS Parameters defined
Input C:\Users\A.Omidi\Documents\GAMSStudio\workspace\GAMS..Kestrel.gms
PageSize 0
ScrDir C:\Users\A.Omidi\Documents\GAMSStudio\workspace\225a\
SysDir C:\GAMS\win64\28.1\
LogOption 3
ErrMsg 1
ErrorLog 99
IDE 1
LstTitleLeftAligned 1
GAMS 28.1.0 Copyright (C) 1987-2019 GAMS Development. All rights reserved
Licensee: GAMS Development Corporation, USA G871201/0000CA-ANY
Free Demo, +1 202-342-0180, support@gams.com, www.gams.com DC0000
--- Starting compilation
--- GAMS..Kestrel.gms(43) 3 Mb
--- Starting execution: elapsed 0:00:00.068
--- GAMS..Kestrel.gms(38) 4 Mb
*** Status: Normal completion
--- Job GAMS..Kestrel.gms Stop 08/20/19 10:29:58 elapsed 0:00:00.101
It seems that the model is solved but, I can not access to the solution or solver log file.
Would you please, say that how can I fix it?