Error message

Problems with modeling
Post Reply
kingdavid123
User
User
Posts: 1
Joined: 1 month ago

Error message

Post by kingdavid123 » 1 month ago

Hi team,
I have an error message: Dimension different the symbol is referenced with more or less indices. I really need help on this. Thank you in advance for your support. Attached is a copy of my file.
Target MOTAD.gms
(1.96 KiB) Downloaded 23 times

abhosekar
Moderator
Moderator
Posts: 192
Joined: 10 months ago

Re: Error message

Post by abhosekar » 1 month ago

bunch of issues. You are missing semicolon on line 70.
in probcons(t) you are summing over t but t is already under control. Looks to me like you only need probcons. (i.e., without t). Is the constraint for all t? If not, the constraint should not be indexed with t.
on line 13, you should define parameter y(r) and not just y and everywhere you need it, you should refer to it as y(r).
This also means you need to define constr(r) instead of constr.

You really need to think about your formulation and make sure your code is doing what you expect it to. Do not add indices to summation to get rid of syntax errors. For example, in the constraint constr, do you need sum over r and j or just j? Is the constraint defined for all r? If no, which y are you referring to on the right hand side?

- Atharv

Post Reply