## Hi Gabriel,

If you get a model that is much larger than you thought it should be, then look at it! It is easy to by adding

Option limrow=1000, limcol=1000;

(or some other large number) before the loop and solve. The listing will then show which variables and equations you actually have in the model and if you do not think they should be there, then you are missing some $-conditions to exclude them. Since you only need to look at the first model, add an abort statement after the solve and you can debug more quickly.

A guess: you have equations and variables defined over index. If so, you need to use $r(index) or just r in the definition (not in the declaration).

Good luck

Arne

\

Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, email: adrud@arki.dk

From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Gabriel

Sent: Tuesday, July 14, 2015 11:54 PM

To: gamsworld@googlegroups.com

Subject: Problem with Loop solving on differentes elements of a set

Hi everyone,

IÂ´m writing after been searching within google for many hours without any success. The problem that I have with GAMS is that IÂ´m solving a model using a loop t for a set of L differents goods. The model is the same but the parameters and the initials value changes. The problem is that bigger is the database (Im loading it from a *.xls file before calibration), GAMS get extremly slow. I suspect that GAMS is not solving the model isolating every good but putting all together. Any contribution will be extremely helpfull. IÂ´m sharing the solve statement so you can get a better idea:

set headers /modelstat, solvestat, objval /;

parameter rep(index, headers) solution report summary ;

option limrow=0, limcol=0, solprint=silent, solveopt=replace ;

loop(index,

r(index) = yes ;

Solve PEM using MCP ;

rep(index,‘modelstat’) = pem.modelstat ;

rep(index,‘solvestat’) = pem.solvestat ;

rep(index,‘objval’) = pem.objval ;

r(index) = no ;

);

— LOOPS index = 010229 ===> Here seems to indicate that it is only working on one sigle good

— 374,400 rows 374,400 columns 1,247,846 non-zeroes ===> Here seems to indicate the opposite

— 1,944,161 nl-code 727,846 nl-non-zeroes

— version5_0_MCP.gms(304) 121 Mb

— Executing PATH: elapsed 0:01:00.489

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.