Solve statement: $148 - Dimension different

Problems with syntax of GAMS
Post Reply
hermann.westerholt
User
User
Posts: 13
Joined: 2 months ago

Solve statement: $148 - Dimension different

Post by hermann.westerholt » 1 month ago

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 25 times

User avatar
Renger
Posts: 111
Joined: 1 year ago

Re: Solve statement: $148 - Dimension different

Post by Renger » 1 month ago

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

hermann.westerholt
User
User
Posts: 13
Joined: 2 months ago

Re: Solve statement: $148 - Dimension different

Post by hermann.westerholt » 1 month ago

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