Search found 295 matches

by abhosekar
3 years ago
Forum: Syntax
Topic: Fixing binary variable
Replies: 8
Views: 19997

Re: Fixing binary variable

It is unclear why fixing a binary variable is needed.
A constraint such as n(i, j, t) =g= V(i, j, t) can ensure that when V(i, j, t) is 1, n(i, j, t) is 1.
by abhosekar
3 years ago
Forum: Syntax
Topic: Changing Index of Variables
Replies: 4
Views: 9087

Re: Changing Index of Variables

It is difficult to answer this question without knowing about the rest of your model (how you would like to see the fuel of a particular plant change). In general, one would model binary variables to represent the type of fuel j used in plant i in the year j, and then use these binary variables in t...
by abhosekar
3 years ago
Forum: Modeling
Topic: GLSP implementation
Replies: 1
Views: 1988

Re: GLSP implementation

When I try to run your model, I see the solution shifted to right from everywhere starting from s=1. i.e. k=1, s=1 is 0 and k=1, s=2 is 50. Therefore, this is probably an inconsistency in your definition but the solution you are getting matches with the one shown in the second table. Also, for k=3, ...
by abhosekar
3 years ago
Forum: Modeling
Topic: Constraints - Problem
Replies: 1
Views: 1702

Re: Constraints - Problem

Take a look at the following: You can either use higher dimensional parameter. Syntax is provided in GAMS documentation https://www.gams.com/latest/docs/UG_DataEntry.html#UG_DataEntry_ParameterDataForHigherDimensions Or Higher dimensional tables. https://www.gams.com/latest/docs/UG_DataEntry.html#UG...
by abhosekar
3 years ago
Forum: Modeling
Topic: Modeling inventory constrainst
Replies: 2
Views: 2645

Re: Modeling inventory constrainst

I assume you want to fix the initial inventory to a value. You can do this by H.fx(i, p, '1', s) = 0; Moreover, you may not even need two separate constraints if the only difference is initial inventory. You can model the first constraint as follows: H(i, p, t-1, s)$(ord(t) ne 1) + ..... This way th...