|
Equation existence using conditionals |
Top Previous Next |
|
(transbad.gms vs transfix.gms) Equations such as
slDEMANDEQ(MARKET).. SUM(PLANT, SHIP(PLANT, MARKET))=G=DEMAND(MARKET);
may not really be relevant for all possible elements of the MARKET set and their uncontrolled generation involves GAMS needing to deal with more equations thus using more memory. I might only define equations when there is nonzero demand. Program execution memory use and model size would be reduced by
inDEMANDEQ(MARKET)$demand(market).. SUM(PLANT, SHIP(PLANT, MARKET)) =G= DEMAND(MARKET); |