You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This representation obviously does not scale well with 1000s of items, so we can refactor it in GAMS like so:
19
19
@@ -23,7 +23,7 @@ Z =e= sum(i, x(i) * v(i) )
23
23
24
24
and
25
25
26
-
```gams
26
+
```
27
27
sum(i, x(i) * w(i) ) =l= 100
28
28
```
29
29
@@ -47,9 +47,7 @@ This great [intro](https://derek.stride.host/posts/comprehensive-introduction-to
47
47
48
48
Because we could parse this tree as `(x + y) + z` or `x + ( y + z)` we need to explicitly tell the parser that we prefer the left option (in the `grammar.js` this is done with `prec.left()` wrapped around the rule)
49
49
50
-
In GAMS you can assign a set like `x = 1`, a subset of the set `x(i) = 1` or an attribute `x.lo(i) = 1`.
51
-
52
-
We can set up these rules like so:
50
+
In GAMS you can assign a set like `x = 1`, a subset of the set `x(i) = 1` or an attribute `x.lo(i) = 1`. We can set up these rules like so:
0 commit comments