Search found 10 matches

by teo21r
1 year ago
Forum: Modeling
Topic: Identifying infeasible runs
Replies: 1
Views: 1210

Identifying infeasible runs

Hello, I am running a GAMS model once for each observation/firm in my dataset. The total number of observations is 121 (set i /1*121/). I get a locally infeasible solution (i.e., Model Status 5 Locally Infeasible). The picture below shows the summary report I get for the variable that defines the ob...
by teo21r
1 year ago
Forum: Modeling
Topic: How to create a random subset with/without replacement and run model multiple times
Replies: 4
Views: 1907

Re: How to create a random subset with/without replacement and run model multiple times

Hi Michael, Thank you for your prompt reply. The code you proposed, and more specifically the "option clear=p1" and "p1(i+adr) = yes" lines, results in the following errors, respectively: Error 579...Cannot clear a set used as domain or used in lag/ord operations Error 188... Ass...
by teo21r
1 year ago
Forum: Modeling
Topic: How to create a random subset with/without replacement and run model multiple times
Replies: 4
Views: 1907

How to create a random subset with/without replacement and run model multiple times

Hello, I have a model like the one shown below. In its current form, the model yields the same solution in each iteration. How can I modify the loop statement to solve the model n times (n=10 in my example) where in each iteration set p1 contains 50 observations but instead of being the first 50 one...
by teo21r
2 years ago
Forum: Modeling
Topic: How can a three-way equality constraint be defined in GAMS?
Replies: 3
Views: 2438

Re: How can a three-way equality constraint be defined in GAMS?

Atharv and Steve,

Thank you for your quick reply. Your answers were very helpful!

Best,
Teo
by teo21r
2 years ago
Forum: Modeling
Topic: How can a three-way equality constraint be defined in GAMS?
Replies: 3
Views: 2438

How can a three-way equality constraint be defined in GAMS?

Hey there, I have a model that includes (among other constraints) constraints v1-v3 below: v1(i,inp)$p1(i).. x(inp,i)=G=sum(p1,lambda1(i,p1)*x(inp,p1)); v2(i,inp)$p1(i).. x(inp,i))=G=sum(p1,lambda2(i,p1)*x(inp,p1)); v3(i,inp)$p1(i).. x(inp,i)=G=sum(p1,lambda3(i,p1)*x(inp,p1)); I'd like to include in...
by teo21r
3 years ago
Forum: Syntax
Topic: Sum over all observations except the observation under investigation
Replies: 2
Views: 3073

Sum over all observations except the observation under investigation

Dear all, The following code provides a partial example of a code that is run separately for each of the 3 observations in set i. SETS i /1*3/ . ALIAS (ii, i) ; out(i,outp).. sum(ii,lm(i,ii)*y(outp,ii))=E=y(outp,i)*(1+beta1(i)); model uno /out ,.../; solve uno using nlp maximizing z; In the GAMS .ls...
by teo21r
3 years ago
Forum: Syntax
Topic: Running a gams model N times for a random subset of the initial set
Replies: 2
Views: 2841

Re: Running a gams model N times for a random subset of the initial set

Michael,

Thank you, I really appreciate your help.

Theo
by teo21r
3 years ago
Forum: Syntax
Topic: Running a gams model N times for a random subset of the initial set
Replies: 2
Views: 2841

Running a gams model N times for a random subset of the initial set

Hello everyone, How can I create N random subsets from my initial set of observations and run my Gams model for each of these subsets? To better explain what I want to do I provide the following example: SETS i /1*100/ j 'outputs and inputs' /y, x1, x2/ outp(j) /y/ inp(j) /x1,x2/ $CALL GDXXRW.EXE fi...