Search found 61 matches

by Renger
1 day ago
Forum: Modeling
Topic: Uncertainty modelling
Replies: 2
Views: 21

Re: Uncertainty modelling

Hi Pryanka You didn't define the parameter alpha in your model Something like this should appear before you use the parameter alpha: parameter alpha 'my alpha parameter' /0.2/; Your constraint igdt_constraint(t)..sum(t,lambda_g*Pg(t)) + sum(t,data(t,'lambda_e')*Pe_b(t))-sum(t,data(t,'lambda_e')*Pe_s...
by Renger
1 week ago
Forum: Syntax
Topic: Table as index
Replies: 1
Views: 93

Re: Table as index

Hi Is this you are looking for? I just assumed that the row index of the table starts with 1 instead of 0. set j /1,2/, i /1,2,3/; alias(i,k,l); table t(j,i) 1 2 3 1 1.000 3.000 2.000 2 1.000 1.000 1.000 ; * Define a set that consists of all combinations of j and i set tb(j,i) /#j.#i/; display tb; p...
by Renger
1 week ago
Forum: Solvers
Topic: Gams to excel
Replies: 1
Views: 70

Re: Gams to excel

Hi

There is no way, as far as I know, to send your model to the Excel solver. The only thing you can do is send the data from Gams to Excel by using gdxxrw.

Cheers
Renger
by Renger
1 week ago
Forum: Syntax
Topic: gams programming problem
Replies: 2
Views: 139

Re: gams programming problem

Hi You should loop over num1 and then over subs to get your code running. dspt should then be defined as dspt(num1): parameter dspt distillation point ; loop(num1, loop(subs, if(Data(num1,subs)=0 and Data(num1,subs+1)=0 , dspt(num1)=ord(subs) ; elseif(Data(num1,subs)=0 and Data(num1,subs+1)>0)and or...
by Renger
1 month ago
Forum: Syntax
Topic: Domain filtering
Replies: 3
Views: 209

Re: Domain filtering

Hi Yamaz

See my reply in this post from last week: viewtopic.php?f=2&t=10156#p23277

Cheers
Renger
by Renger
1 month ago
Forum: Syntax
Topic: Error 170 Domain violation for element
Replies: 1
Views: 138

Re: Error 170 Domain violation for element

Hi
Just write k-1 without the quotation marks. Note that you have to start at the second element of k, so you can add a $-restriction on the function:
function(i,j,k)$(ord(k) > 1) .. x(i,j,k-1) - x(i,j,k) =l= s(i,j,k)
Cheers
Renger
by Renger
1 month ago
Forum: Modeling
Topic: A change in endogenous variables in general equilibrium
Replies: 4
Views: 306

Re: A change in endogenous variables in general equilibrium

Hi Veronna No, this is not the way: you can easily change parameters in the model and rerun the model. If you fix a variable, you, in fact, drop the equation from the model, and this is not what you want (you want that even with the fixed variable, the complementary equation should be fine). If you ...
by Renger
1 month ago
Forum: Modeling
Topic: A change in endogenous variables in general equilibrium
Replies: 4
Views: 306

Re: A change in endogenous variables in general equilibrium

Hi You are on the right track. First, run the benchmark that replicates your data (usually, all prices are equal to 1). This is also a good test to see if you have errors in the model). Then do a counterfactual and compare the results. parameter results(*,i) Results for the sectors * PD0 is the benc...
by Renger
1 month ago
Forum: Syntax
Topic: Error 70 The dimensions of the equ.var pair do not conform
Replies: 2
Views: 173

Re: Error 70 The dimensions of the equ.var pair do not conform

Hi Veronna It looks like you "coupled" the equations with the wrong variables because the dimension of the variable doesn't match the dimension of the equation. You should, therefore, check the dimension of the variable-equation pair. You could let the solver match all the variables to the equations...
by Renger
1 month ago
Forum: Modeling
Topic: Recalculating parameters based on model solution
Replies: 1
Views: 157

Re: Recalculating parameters based on model solution

Hi This can be done in a loop (or a while loop, if you have a specific convergence criterium) Assuming that parameter a is a model parameter and AVAR is the solution of the model parameter apar; variable AVAR; set iterations iter /1*100/ loop(iter, solve yourmodel; apar = AVAR.L; ); Cheers Renger