I have one question regarding the syntax that could output the GAMS/CPLEX model creation time. I have a huge but relatively simple model (0.7 million constrs/vars) in which the CPLEX solver time was only 4 seconds, while the actual elapsed time was above 10 minutes.
I’m not sure if there is a good way or coding standard that makes GAMS create the model faster, but I’m wondering at least if there is any syntax that could accurately capture the model creation time in GAMS/CPLEX API.
Thanks a lot Adam!! That is a great information. According to the profile, I noticed that GAMS spent around 20 seconds building the equations, which is OK. However, GAMS took around 300 seconds to read all the inputs and process them. Then, the CPLEX solver only took 4 seconds to solve it. I’m wondering if there is a general rule of thumb in writing efficient input processing code for GAMS. The most input processing we used was to read CSV files and fill in parameter values with several conditions.
Adam already shared a link to some hints on how to formulate a model efficiently. If this did not help, I suggest you share your code and data, such that other forum user can analyze and provide help.
If this cannot be shared publicly (e.g. due to confidentiality), feel free to reach out to supportt@gams.com