Causes of excessive memory use and repair

Top  Previous  Next

There are four big reasons a program may use too much memory.  These are

 

Considering unnecessary cases

Keeping unnecessary items

Solving a huge problem

Inadequate computer capacity

 

I discuss the first two below and can only remark on the latter two that sometimes the problem must be simplified and sometimes one just needs to invest in bigger equipment.  However, before doing either, consider using the techniques discussed above to insure the memory use is truly legitimate.

Also before beginning I wish to note that the material below is not only useful for the repair of specific models.  Namely, by employing the memory reducing practices discussed herein in standard GAMS modeling, one can improve the effectiveness of any GAMS programs to which these techniques are applied.  For example, the section on avoiding unnecessary cases will reveal conventions that should be used in all GAMS programming yielding memory use reductions without the need for memory usage investigations.

 

Avoiding considering unnecessary cases

Clearing memory of unnecessary items