Search found 8 matches

by anaaza
1 month ago
Forum: Syntax
Topic: Concatenate in GAMS
Replies: 2
Views: 291

Re: Concatenate in GAMS

Hi Michael,

Thank you for the didactic explanation. I learned new concepts that I had never heard before.
I tried it on my model and it works perfectly.

Cheers,

Ana
by anaaza
1 month ago
Forum: Syntax
Topic: Concatenate in GAMS
Replies: 2
Views: 291

Concatenate in GAMS

Hi, I am importing two different tables into GAMS: RotStandOut(SiteIndexS,SiteIndexP,SiteINdexB,Rot_Perc,Ages,Items) PixTable(Stands,Pixels,SiteIndexS,SiteIndexP,SiteIndexB,Rot_Perc,Items) Both tables have common sets (SiteIndexS,SiteIndexP,SiteINdexB,Rot_Perc). I need to group those sets together c...
by anaaza
8 months ago
Forum: Syntax
Topic: How to create an index in GAMS
Replies: 1
Views: 423

How to create an index in GAMS

Hi, Considering that I have two parameters: Parameter1(a,b,c,"age") Parameter2(a,b,c,"SiteIndex") How can I create: Parameter3(a,b,c,"age.SiteIndex")? I mean, what I'm wondering is if there is a way of putting together both parameters creating a "unique" index, which I will use to extract value from...
by anaaza
1 year ago
Forum: Syntax
Topic: Running GAMS in phases
Replies: 4
Views: 2605

Re: Running GAMS in phases

Thank you all for your replies.
After reading both suggestions and consulting GAMS documentation, I think brucemccarl's suggestion would fit my needs the best. The only problem is that I have an old version of GAMS (24.1) and apparently the save and restart does not work there. Am I right?
by anaaza
1 year ago
Forum: Syntax
Topic: Running GAMS in phases
Replies: 4
Views: 2605

Running GAMS in phases

Hi, I am building an economic model in GAMS, which, differently from the famous "transport" model does not call for optimization using lp or others. Usually, I just press f9 and GAMS runs it. However, I have reached a phase where I will: 1) export some tables to R (I am using an Excel file as interm...
by anaaza
1 year ago
Forum: Syntax
Topic: Is it possible to calculate an integral in GAMS?
Replies: 2
Views: 804

Is it possible to calculate an integral in GAMS?

Hi, I need to calculate the volume of a tree by integrating the "taper" function below. I did this code in R, and it works well, but now that I am trying to code it in GAMS I cannot find a way of doing that. How do we calculate integrals in GAMS? Any suggestions? --------------- midh <- 13.5 midd <-...
by anaaza
1 year ago
Forum: Syntax
Topic: Position of an element in a table
Replies: 2
Views: 820

Re: Position of an element in a table

Hi, Thanks for your reply. Well, my initial idea was to find the position of the highest NPV and use this number to search for another parameter value correspondent to the same position, but in another table. However, the code you provided gave me an insight into another way of doing so, which is mo...
by anaaza
1 year ago
Forum: Syntax
Topic: Position of an element in a table
Replies: 2
Views: 820

Position of an element in a table

Hi, Considering the table below, how can I find out the position (1st, 2nd element...) of the highest NPV for each Stand? (for Stand 6 it would return 3rd, for Stand 7 it would return 2nd). I tried the ord() function but it works only with one-dimensional sets, which is not the case since I am tryin...