Search found 6 matches

by vigoleo
5 years ago
Forum: Syntax
Topic: Indexing range when importing from Excel
Replies: 2
Views: 3909

Re: Indexing range when importing from Excel

Since you run gdxxrw at compile time ($call) using a calculated scalar makes little sense (because the calculation happens at run time, so after the compile phase). You could store the 92 in a compile time variable: $set art_lastrow 92 $call gdxxrw.exe Test.xlsx set=art rng=CO!A7:A%art_lastrow% You...
by vigoleo
5 years ago
Forum: Syntax
Topic: Indexing range when importing from Excel
Replies: 2
Views: 3909

Indexing range when importing from Excel

Hello everyone, does anyone know if there is the possibility to index the value of a range when importing from excel with GDXXRW? For example: $call gdxxrw.exe Test.xlsx set=art rng=CO!A7:A92 I would like to store that "92" in a variable, so that i could just modify an initial (ie) scalar ...
by vigoleo
5 years ago
Forum: Syntax
Topic: Cannot Import Data from Excel
Replies: 2
Views: 4587

Re: Cannot Import Data from Excel

Hi In your excel sheet, your data is organized as follows: P1 P2 P3 TIMES [H] QTY DOMINIO 0 1 0 1.983333333 210 pp1 0 1 0 1.983333333 182 pp2 1 0 0 1.983333333 628 pp3 1 0 0 1.983333333 838 pp4 Gams expects the indices in the first columns and/or rows, so you have to move DOMINIO to the first colum...
by vigoleo
5 years ago
Forum: Syntax
Topic: Cannot Import Data from Excel
Replies: 2
Views: 4587

Cannot Import Data from Excel

Hello everyone, I am a very beginner of GAMS. I have just completed my first model in gams, but I was not able to test it on the real dataset because I was not able to import data. So this is the code I'm working with: Set pp "New production" / pp1, pp2, pp3, pp4, pp5, pp6, pp7, pp8, pp9, ...
by vigoleo
5 years ago
Forum: Modeling
Topic: Production Batch Constraint
Replies: 3
Views: 6441

Re: Production Batch Constraint

Hello Leonardo, if the solver reports "integer infeasible" then there is no feasible solution for the data you have provided. However, the model being infeasible does not mean the problem you want to solve is infeasible. You might have just modelled the reality too restrictive. One way to...
by vigoleo
5 years ago
Forum: Modeling
Topic: Production Batch Constraint
Replies: 3
Views: 6441

Production Batch Constraint

Hi all, my name is Leonardo from Italy. I'm a gams beginner. Reading the online doucmentation I have came up with this model I would like to employ to optimize the production planning process of my company. I'm attaching here a sample of the model ( data has been taken randomly ): Sets art "Con...