Search found 11 matches

by RZoro95
9 months ago
Forum: Modeling
Topic: resolving a pareto function
Replies: 2
Views: 6891

resolving a pareto function

Hi all, I should solve the following equation on GAMS, making the lamba (λ) vary between 0 and 1, does anyone have an idea of how the code should be written? max z(λ) = λα*(SC^U- SC)- [(1-λ) *β *(R^U-R) (11) To obtain a set of solutions on the Pareto frontier the proposed formulation is solved by co...
by RZoro95
10 months ago
Forum: Modeling
Topic: use of subset
Replies: 4
Views: 6181

Re: use of subset

Zorro, I encourage you to look at the GAMS model library: anywhere is probably useful, but start with the trnsport and dice models if you don't have other ideas. You will observe that using multiply-indexed variables is the normal practice. There is nothing unprofessional about this. It is very muc...
by RZoro95
10 months ago
Forum: Syntax
Topic: how to use a single subscript variable
Replies: 4
Views: 8775

Re: how to use a single subscript variable

Hi, I don't know what you mean by this But now, having to write it professionally Almost all GAMS model have multiple indexes, this is as professional as it gets. There are ways to ""flatten" the index space, but that looks very ugly, so before suggesting ways to do this, I would lik...
by RZoro95
10 months ago
Forum: Modeling
Topic: use of subset
Replies: 4
Views: 6181

Re: use of subset

perhaps I misused the term and was misunderstood. I need to use only one index because I'm writing a paper and my teacher insisted that we have to use only one index. And now I have to change the whole model
by RZoro95
10 months ago
Forum: Syntax
Topic: how to use a single subscript variable
Replies: 4
Views: 8775

Re: how to use a single subscript variable

perhaps I misused the term and was misunderstood. I need to use only one index because I'm writing a paper and my teacher insisted that we have to use only one index. And now I have to change the whole model
by RZoro95
10 months ago
Forum: Syntax
Topic: how to use a single subscript variable
Replies: 4
Views: 8775

how to use a single subscript variable

Hi, I have a modeling problem on GAMS and I don't know how to proceed. In practice I should use a variable that takes into account 2 sets, but using only one subscript. In practice I have 64 companies (shares), and 8 sectors (8 companies per sector 8x8=64). Initially, to run the model, I used a doub...
by RZoro95
10 months ago
Forum: Modeling
Topic: use of subset
Replies: 4
Views: 6181

use of subset

Hi, I have a modeling problem on GAMS and I don't know how to proceed. In practice I should use a variable that takes into account 2 sets, but using only one subscript. In practice I have 64 companies (shares), and 8 sectors (8 companies per sector 8x8=64). Initially, to run the model, I used a doub...
by RZoro95
2 years ago
Forum: Syntax
Topic: Output su excel
Replies: 2
Views: 6342

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 ...
by RZoro95
2 years ago
Forum: Modeling
Topic: Problem with a constraint
Replies: 0
Views: 11567

Problem with a constraint

GAMS.PNG Hi everyone, I have a problem with placing a constraint in a portfolio optimization problem. In practice I will explain the model: I have a set i of assets and a set s of sectors, the variable x (s, i) represents the quantity of assets i belonging to sector s. Then I have a parameter matri...
by RZoro95
2 years ago
Forum: Syntax
Topic: Output su excel
Replies: 2
Views: 6342

Output su excel

Hi everyone, I have a problem with the output of a result on an excel sheet. In practice I have x (s, i) as a result of the model and I would like me to output them on excel sheet only that I can't. The reason is that they are two indices? I am attaching a photo of the lst result of what to bring to...