Search found 11 matches

by gamsadmin
7 months ago
Forum: Syntax
Topic: Infeasible solution for Hydro Optimization Problem
Replies: 1
Views: 211

Re: Infeasible solution for Hydro Optimization Problem

Hi If you check your output, you will see that two of the energylim equations are limited. You limit the total production by P4capacity, so there be at least enough capacity to produce energy(g). However, There is no feasible solution because the maximum capacity is less than the demand Cheers Renge...
by gamsadmin
7 months ago
Forum: Modeling
Topic: Private ''help'' for academic purposes :-)
Replies: 2
Views: 307

Re: Private ''help'' for academic purposes :-)

Sure, if you write me some papers so that I will receive the Nobel price in a few years.
Cheers
Renger
by gamsadmin
7 months ago
Forum: Modeling
Topic: Traffic constraint
Replies: 1
Views: 176

Re: Traffic constraint

by gamsadmin
7 months ago
Forum: Tools
Topic: Reading Data from Excel , except some Cells
Replies: 6
Views: 443

Re: Reading Data from Excel , except some Cells

Hi
For this you can use gdxxrw (there is a comprehensive documentation with lots of examples: https://www.gams.com/latest/docs/T_GDXXRW.html ). If there is no value in the spread sheet, this is no problem.
Cheers
Renger
by gamsadmin
1 year ago
Forum: API
Topic: Solvers error when calling from MatLab
Replies: 7
Views: 1779

Re: Solvers error when calling from MatLab

Hi It would be more useful if you attach the model you are trying to solve then letting us go through 500 lines looking for an error message. And: you could also have done what Fred and I suggested: run a simple gams file with option subsystems And show the output in your post to see if Couenne is i...
by gamsadmin
1 year ago
Forum: Syntax
Topic: relational operators within GAMS
Replies: 6
Views: 1665

Re: relational operators within GAMS

You could use a mapping set P /P01 * P08/ Jn /Jn01 * Jn10/ Jm /Jm01 * Jm10/ mapN_M(Jn,Jm) /#Jn:#Jm/; display mapN_M; parameters p1(P,Jm) p2(P,Jn); p2(P,Jn) = uniform(0,10); loop((jn,jm)$mapN_M(jn,jm), p1(P,jm) = p2(P,jn); ); display p1, p2; For information on the mapping, see [url]https://www.gams.c...
by gamsadmin
1 year ago
Forum: Syntax
Topic: Change Working Directory of GAMS
Replies: 1
Views: 1120

Re: Change Working Directory of GAMS

Hi Barsssk You could use a setlocal or setglobal parameter at the beginning of your file. For example, if you want to have all your files in the directory results, which is below your model directory, I add: $setglobal results .\results\ * Send to results directory execute_unload "%results%myresults...
by gamsadmin
2 years ago
Forum: Syntax
Topic: unable to read and write Excel spreadsheet data in GAMS
Replies: 3
Views: 975

Re: unable to read and write Excel spreadsheet data in GAMS

Hi

Add "Trace = 3" at the end, and you will see if your import of data works well. If there are errors for all imported variables, your gdx file will not be created.

Cheers
Renger
by gamsadmin
2 years ago
Forum: Syntax
Topic: string operations in GAMS
Replies: 2
Views: 1152

Re: string operations in GAMS

Hi Laurent One way would be a batch file in a command window and the use of control variables. You would have something like this in your "run.bat" (something you could easily generate with a python or R script) call gams mymodel --scenario=BAU --regions=NORTH --years=2030 call gams mymodel --scenar...
by gamsadmin
2 years ago
Forum: Syntax
Topic: Execute, load excel file and read parameters´value
Replies: 1
Views: 817

Re: Execute, load excel file and read parameters´value

Hi
Add Trace = 3 at the end of your gdxxrw command and you will see if there are errors when importing the data.
I only see that you define Stk(yr,i,se) but in the table the order seems to be i,yr,se (or se,yr,i).
Cheers
Renger