Re: "Indexing" variables
Posted: Sun Nov 15, 2020 11:30 pm
It is not clear what you are trying to do. It is also difficult to point out the error without looking at .gms file. I am not sure if the line you have mentioned in the question is the code or pseudo code.
Assuming it is your code,
Few things to look at:
1. How do you define set k, l? Do both k and l have '1' and '2' elements in it or is the domain of variable s is being violated?
2. The equal sign in gams is =e=
3. The statement should end with a semicolon
4. If you are not using set l in the equation, then you need not define equation as D(l). Writing D.. should suffice.
Please take a look at https://www.gams.com/latest/docs/UG_MAI ... l_Examples for tutorials.
- Atharv
Assuming it is your code,
Few things to look at:
1. How do you define set k, l? Do both k and l have '1' and '2' elements in it or is the domain of variable s is being violated?
2. The equal sign in gams is =e=
3. The statement should end with a semicolon
4. If you are not using set l in the equation, then you need not define equation as D(l). Writing D.. should suffice.
Please take a look at https://www.gams.com/latest/docs/UG_MAI ... l_Examples for tutorials.
- Atharv