Page 1 of 1

Error message

Posted: Wed Jun 16, 2021 12:26 am
by kingdavid123
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 165 times

Re: Error message

Posted: Thu Jun 24, 2021 5:00 pm
by abhosekar
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