Thursday, October 4, 2012

Large nonlinear model

GAMS users build large GAMS models! Here is an example of a global trade model I am helping to build. I ran it for 5 years in one swoop:

equations 627,235
variables 662,290
generation time 6 seconds
solution time 3856 seconds
total time 1:04 (hh:mm)

We can also run it year by year:

equations period 1 125,435
variables period 1 132,458
generation time period 1 1.3 seconds
solution time period 1 2 seconds
solution time period 2 59 seconds
solution time period 3 119 seconds
solution time period 4 102 seconds
solution time period 5 20 seconds
total time 0:05 (hh:mm)

This way is much faster.

This is an example where we benefit that the modeling language supports constructs like loops etc.

No comments:

Post a Comment