Search found 8 matches
- 1 year ago
- Forum: Modeling
- Topic: Solving without Min or Max
- Replies: 3
- Views: 3307
Re: Solving without Min or Max
Hi You could make it an optimization problem by adding following: variable OBJ objective equation dummy Dummy objective; dummy.. OBJ =E= 1; Then solve the model maximizing OBJ. GAMS will find OBJ being equal to 1 solves the problem while at the same time solving the other equations. I hope this hel...
- 3 years ago
- Forum: Modeling
- Topic: Reasons for equation not being executed
- Replies: 4
- Views: 2657
Re: Reasons for equation not being executed
I think there's a difference between equations not being listed in the .lst and not being executed. Can you check any limrow option. Option limrow = ? is used to decided how many of your equations are listed per block. You can also check your solution to ascertain which equations are and not executed.
- 4 years ago
- Forum: Modeling
- Topic: a scenario run yields different results when run singly and in a loop of others
- Replies: 2
- Views: 31014
- 4 years ago
- Forum: Modeling
- Topic: a scenario run yields different results when run singly and in a loop of others
- Replies: 2
- Views: 31014
a scenario run yields different results when run singly and in a loop of others
Hi there wondering if somebody can help me understand why a model scenario gives different results when ran singly and when run in a loop with other scenarios. For example, when I run it singly, my set up is as follow: Loop(scenario$(ord(scenario) lt 3 and ord(scenario) eq 2), if(ord(scenario) eq 1,...
- 4 years ago
- Forum: Modeling
- Topic: Finding average
- Replies: 1
- Views: 2726
Re: Finding average
I managed with the following but would like to know if there's other means as I need to find median as well
aveX = sum([i,j], X(i,j)) / (card(i)*card(j));
aveY = sum([i,j,k], Y(i,j,k)) / (card(i)*card(j)*card(k));
aveX = sum([i,j], X(i,j)) / (card(i)*card(j));
aveY = sum([i,j,k], Y(i,j,k)) / (card(i)*card(j)*card(k));
- 4 years ago
- Forum: Modeling
- Topic: Finding average
- Replies: 1
- Views: 2726
Finding average
I would appreciate if anyone can help me. I'm struggling to write equation to compute average of a set that has more than one dimensions. E.g how do I find average of
X(i,j)
Y(i,j,k)
Thanks
X(i,j)
Y(i,j,k)
Thanks
- 4 years ago
- Forum: Modeling
- Topic: Multiple Conditions in one Equation
- Replies: 4
- Views: 4199
Re: Multiple Conditions in one Equation
then I would try this:
Code: Select all
Neweq.. AI("1")$(BI("1") = CI("1") and CI("1") = DI("1") ) =E= BI("1")
- 4 years ago
- Forum: Modeling
- Topic: Multiple Conditions in one Equation
- Replies: 4
- Views: 4199
Re: Multiple Conditions in one Equation
1. If GAMS allows using multiple mathematical operators in an equation, yes but if not, no. 2. This is the general syntax for defining equation in GAMS: eqn_name(index_list)[$logical_condition(s)].. expression eqn_type expression; 3. Do you only need to ensure equality of these multiple entities? An...