Search found 50 matches
- 2 years ago
- Forum: Syntax
- Topic: Uncontrolled Set entered as constant error 149 issue
- Replies: 1
- Views: 1502
Re: Uncontrolled Set entered as constant error 149 issue
Hi Setha, You need to use set-indices in your equationnames too. For example: c1(i).. <equation> And in your objective funtion the left-handside doesn't have index i, but the righhand-side does. Perhaps you want to sum over i in your righthand-side? See also: https://www.gams.com/35/docs/UG_Equation...
- 2 years ago
- Forum: Syntax
- Topic: Output su excel
- Replies: 2
- Views: 4974
Re: Output su excel
Hi RZoro95, In your GDXXRW-call you are refering to a parameter "x": execute "gdxxrw PortfolioComp.gdx o=PorioComp.xls par =x rng=foglio1!a1 cdim=1 rdim=1 " However, in your model "x" is declared a a variable, hence the error. To solve this, change par to var: execute &...
- 2 years ago
- Forum: Modeling
- Topic: Problem with data
- Replies: 1
- Views: 1599
Re: Problem with data
Hi Rzoro95, Two options I can think of: 1) make a new sheet and add the data of all the sheets into one two-dimensional table. Then you only need to read-in one table. 2) read in data per sheet into seperate parameters (e.g. parameters foglio1(i) ... foglio8(i)) and add them together in GAMS in a tw...
- 2 years ago
- Forum: Modeling
- Topic: Two-Dimensional Set to One-Dimensional Parameter
- Replies: 1
- Views: 1843
Re: Two-Dimensional Set to One-Dimensional Parameter
Hi Lucky,
Try:
Output:
Regards,
GFA
Try:
Code: Select all
option count < test;
Code: Select all
---- 14 PARAMETER count
day1 2.000, day2 1.000, day3 2.000
GFA
- 2 years ago
- Forum: Modeling
- Topic: I have a problem modeling this function
- Replies: 1
- Views: 2441
Re: I have a problem modeling this function
Hi lcarreon,
How do you know your problem could be solved with LP? I see a square in your objective function meaning it is not a linear function.
And I think we are missing some information about the problem. What is subscript t and b?
Cheers,
GFA
How do you know your problem could be solved with LP? I see a square in your objective function meaning it is not a linear function.
And I think we are missing some information about the problem. What is subscript t and b?
Cheers,
GFA
- 2 years ago
- Forum: Syntax
- Topic: Issue on assignment data in GAMS
- Replies: 2
- Views: 2121
Re: Issue on assignment data in GAMS
Dear Rodrigue, That is because not all "af"-"Ag" combinations have data. For example: "AV" and "Resext" (elements of "af") only have data with the element "Bcen2" in SAM-parameter, but "Bcen2" is not in "Ag" subset so it...
- 2 years ago
- Forum: Modeling
- Topic: Omitting dimensions
- Replies: 3
- Views: 2920
Re: Omitting dimensions
Hi hein,
Have a look here and especially at example 4: https://www.gams.com/latest/docs/UG_GDX.html
You might want to use something like: "$load setNo1<Parameter2.dim1" etc. to load the setelements from GDX.
Regards,
GFA
Have a look here and especially at example 4: https://www.gams.com/latest/docs/UG_GDX.html
You might want to use something like: "$load setNo1<Parameter2.dim1" etc. to load the setelements from GDX.
Regards,
GFA
- 2 years ago
- Forum: Syntax
- Topic: How to code in a neat way?
- Replies: 1
- Views: 1947
Re: How to code in a neat way?
Hi,
One way would be to write it like this:
Cheers,
GFA
One way would be to write it like this:
Code: Select all
Coef (J,T) = Coef (J,"2000")*(0.95**(ORD(T)-1));
GFA
- 2 years ago
- Forum: Modeling
- Topic: Incorrect solution in code running
- Replies: 4
- Views: 3744
Re: Incorrect solution in code running
Hi sandrina,
Try using starting values for your variables, this usually helps the solve. See: https://www.gams.com/latest/docs/UG_Variables.html
Hope this helps.
GFA
Try using starting values for your variables, this usually helps the solve. See: https://www.gams.com/latest/docs/UG_Variables.html
Hope this helps.
GFA
- 2 years ago
- Forum: Modeling
- Topic: Incorrect solution in code running
- Replies: 4
- Views: 3744
Re: Incorrect solution in code running
Hi Sandrina,
It is hard to give any advice since the information you provided is quite limited.
One thing you could try is to make your model as small as possible, or make a simple toy example. This usually makes it easier to analyse the model's behaviour.
Regards,
GFA
It is hard to give any advice since the information you provided is quite limited.
One thing you could try is to make your model as small as possible, or make a simple toy example. This usually makes it easier to analyse the model's behaviour.
Regards,
GFA