Search found 12 matches

by gamsadmin
2 months ago
Forum: Syntax
Topic: Benchmark checked with iterlim=0 but GAMS does not find solution with iterlim>0
Replies: 7
Views: 361

Re: Benchmark checked with iterlim=0 but GAMS does not find solution with iterlim>0

Hi JM It seems your SAM is not perfectly balanced. 1E-4 shows that there are balance problems. The solver tries to find a solution with the maximum infeasibility below the tolerance level (something like 1E-7), so it can't find a solution because the imbalances are too big and a few imbalances can't...
by gamsadmin
1 year ago
Forum: Syntax
Topic: Infeasible solution for Hydro Optimization Problem
Replies: 1
Views: 317

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
1 year ago
Forum: Modeling
Topic: Private ''help'' for academic purposes :-)
Replies: 2
Views: 421

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
1 year ago
Forum: Modeling
Topic: Traffic constraint
Replies: 1
Views: 265

Re: Traffic constraint

by gamsadmin
1 year ago
Forum: Tools
Topic: Reading Data from Excel , except some Cells
Replies: 6
Views: 664

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: 2168

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: 1993

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: 1509

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: 1104

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: 6
Views: 1636

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...