Solve statement: $148 - Dimension different

Problems with syntax of GAMS
Post Reply
hermann.westerholt

Solve statement: $148 - Dimension different

Post by hermann.westerholt »

Hi,

my current model contains no visible errors, but my objective variable in the solve statement is flagged as being "referenced with more/less indices as declared" ($148). I have even tried including its domain in the solve statement ("minimizing C(w)" instead of "minimizing C"), but to no avail. I am absolutely clueless as to why this error is occurring and have attached the files in question. As always, any help is highly appreciated.

Best regards,
Hermann
Archive.zip
(3.45 KiB) Downloaded 294 times
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Solve statement: $148 - Dimension different

Post by Renger »

Hi Hermann

You are trying to minimize a multi-valued variable (C(w)). The minimand should be single-valued (e.g. CT =E= sum(w, C(w)); solve yourmodel minimizing CT.

Hope this helps
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
hermann.westerholt

Re: Solve statement: $148 - Dimension different

Post by hermann.westerholt »

Dear Renger,

thank you once again for your great help. I promise that next time, I will take a closer look at the documentation before posting here.

Best,
Hermann
Post Reply