Search found 373 matches

by Fred
4 years ago
Forum: Syntax
Topic: Missing -ve sign during equation formulation in .lst file
Replies: 7
Views: 6159

Re: Missing -ve sign during equation formulation in .lst file

Hi, I cannot reproduce your findings. The equation listing shows ---- OBJECTIVE =E= OBJECTIVE.. PRODCOST - PRODCOST_BY_INTERVAL(7) - PRODCOST_BY_INTERVAL(1) - [...] - PRODCOST_BY_INTERVAL(167) - PRODCOST_BY_INTERVAL(168) =E= 0 ; (LHS = 0) Are you sure that the lst excerpt Trial2_lst.txt from your in...
by Fred
4 years ago
Forum: Modeling
Topic: Linking Macro and Micro Periods (Sets)
Replies: 1
Views: 1481

Re: Linking Macro and Micro Periods (Sets)

Hi Eric,

You might want to read about multi-dimensional sets (https://www.gams.com/latest/docs/UG_Set ... sionalSets) to figure out how to implement a mapping between your sets t and s.

I hope this helps!

Fred
by Fred
4 years ago
Forum: Modeling
Topic: Solve aborted, Execerror = 141
Replies: 1
Views: 1884

Re: Solve aborted, Execerror = 141

Hi,

Did you look at the lst file? It usually provides meaningful error messages (search for ****).
It might help, if you share your code, so other forum users can reproduce the issue.

Best,
Fred
by Fred
4 years ago
Forum: Syntax
Topic: Missing -ve sign during equation formulation in .lst file
Replies: 7
Views: 6159

Re: Missing -ve sign during equation formulation in .lst file

Hi,

Could you share the GDX files such that one could actually run the gms file to reproduce this?

Best,
Fred
by Fred
4 years ago
Forum: Syntax
Topic: GAMS error- Too much data on this line- rest ignored
Replies: 1
Views: 1744

Re: GAMS error- Too much data on this line- rest ignored

Hi, You are not using proper GAMS syntax. You miss the indices and also it seems that you do not need $ondelim. The following code snippet illustrates how your data should be formatted (with or withour $ondelim) parameter x(i)/ 1 2, 2 2.003, 3 2.006, 4 2.009 /; parameter xx(i)/ $ondelim 1,2 2,2.003 ...
by Fred
4 years ago
Forum: Modeling
Topic: If/then logic with variables
Replies: 1
Views: 2758

Re: If/then logic with variables

Hi, Basically your approaches all try to state that if pen<0 then pen=0 . That doesn't work.This has not so much to do with GAMS but is rather a general question on how to model logical conditions (see for example this thread: https://forum.gamsworld.org/viewtopic.php?f=2&t=10931&p=25589&...
by Fred
4 years ago
Forum: Syntax
Topic: Conic constraint in GAMS
Replies: 4
Views: 4795

Re: Conic constraint in GAMS

Hi, with recent versions you should get a message like this from Mosek: The constraint 'eq8'(3) is not convex. Q should be negative semidefinite for a constraint with finite lower bound. (*1294*) Setting non-negative lower bounds on x1 and s1 resolves the problem. free variable x1, x2, x3; x1.lo = 0...
by Fred
4 years ago
Forum: Announcements
Topic: issues running GAMS with MacOS Catalina
Replies: 4
Views: 5366

Re: issues running GAMS with MacOS Catalina

Hi Alireza, You could install GAMS 29 beta which has been released earlier this week and should just work with Catalina: https://www.gams.com/29/ For older versions, please install the Mac version of GAMS and follow one of the workarounds described in the previous posts of this thread. I hope this h...
by Fred
4 years ago
Forum: Syntax
Topic: Ignore input data for elements not defined
Replies: 1
Views: 3813

Re: Ignore input data for elements not defined

Hi, With a GDX data layer, you have lots of flexibility when it comes to loading the data into GAMS. Besides the filtered read you get with $load, you can for example turn on domain checking when items are loaded with $loadDC or merge data into an already defined symbol with $loadM, etc. For more de...
by Fred
4 years ago
Forum: Syntax
Topic: Beginner Question: Using csv as an input
Replies: 17
Views: 13013

Re: Beginner Question: Using csv as an input

Hi, I ran the following and it works: $onecho > shockC.csv ,sp1,sp2 2019,51.59000962,221.2765056 2020,297.1442391,198.4488019 2021,30.89360312,106.7259835 $offecho SETS yr year /2019*2039/ scn scenario /sp1,sp2/ Table shockC(yr,scn) 'shock path' $ondelim $include shockC.csv $offdelim ; display shock...