2
$\begingroup$

Writing some GAMS code, getting some syntax errors:

enter image description here

Anyone recognize the problem?

$\endgroup$
2
  • $\begingroup$ Indexing by a set is x(j) and by a set element: x('jan'). Indexing by a variable is not allowed. You don't need to capitalize everything. $\endgroup$ Commented Nov 17, 2022 at 18:35
  • $\begingroup$ Code (text) should be quoted as text and not uploaded as images. $\endgroup$
    – Rob
    Commented Nov 17, 2022 at 19:22

1 Answer 1

3
$\begingroup$

On line 134, I suspect you meant X(J) instead of X(Y) and XX(J) instead of XX(Y). Also, it looks you have an inconsistency with months as strings JAN, ..., DEC versus integers $1, \dots, 12$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.