Search found 215 matches
- 2 years ago
- Forum: Solvers
- Topic: Error 148, even on the objective function
- Replies: 2
- Views: 2773
Re: Error 148, even on the objective function
Ebru, I notice you are using xls2gms. This is not the recommended way to read spreadsheet data into GAMS. In the docs at https://www.gams.com/latest/docs/T_XLS2GMS.html you will see this statement: The Windows GAMS distribution contains several tools to exchange data with MS-Excel: GDX2XLS, GDXXRW, ...
- 2 years ago
- Forum: Modeling
- Topic: constraint variables in set
- Replies: 2
- Views: 1532
Re: constraint variables in set
Nebu, I assume that the batteries are partitioned into clusters (i.e. each battery is in exactly one cluster). A little bit of GAMS code could check this and abort if false: this prevents a lot of head-scratching about infeasible models in case of data errors. You could just have a variable P(cluste...
- 2 years ago
- Forum: Modeling
- Topic: conditional constraint using alias
- Replies: 1
- Views: 1618
Re: conditional constraint using alias
Hello gams_learner58, The scheme you've chosen to represent your network seems to be a difficult one. I suggest you looks at the GAMS Tutorial: https://www.gams.com/latest/docs/UG_Tutorial.html This will explain many useful things about GAMS. As an added bonus, it includes a convenient and powerful ...
- 2 years ago
- Forum: Solvers
- Topic: CPLEX presolve would not turn off
- Replies: 1
- Views: 2632
Re: CPLEX presolve would not turn off
Ali,
Interesting question. If you attach the entire .log file from your run to a post that will allow people to search for clues to explain this behavior.
-Steve
Interesting question. If you attach the entire .log file from your run to a post that will allow people to search for clues to explain this behavior.
-Steve
- 2 years ago
- Forum: Syntax
- Topic: EMP syntax error: key expected: is the key min
- Replies: 2
- Views: 2186
Re: EMP syntax error: key expected: is the key min
Hi, The dualEqu keyword is something I would use to modify a single-agent optimization model whose objective is specified in the GAMS model statement. By default all equations in such a model are constraints on the agent (i.e. normal constraints) but dualEqu says that some equations move away from t...
- 2 years ago
- Forum: Modeling
- Topic: Finding 'Equilibria' using EMP equilibrium
- Replies: 2
- Views: 2770
Re: Finding 'Equilibria' using EMP equilibrium
Hello, As I understand it, you have 3 follower agents, each of whom solves their own optimization model, and one leader agent, also with an optimization model. You can do this in EMP: you formulate the model as a bilevel program. https://www.gams.com/37/docs/UG_EMP_Bilevel.html https://www.gams.com/...
- 2 years ago
- Forum: Syntax
- Topic: Negative exponential
- Replies: 11
- Views: 7206
Re: Negative exponential
Alexanre, You wrote: I have a condition that I need to test, if the transport occurs from the node (n) to the (np), or the opposite (np,n). One of this 2 situations will occurs. The other will be zero, or not occurs. If on of them occurs (Q>0), so, use the equation so ( min >"ir"> max ); i...
- 2 years ago
- Forum: Modeling
- Topic: How can a three-way equality constraint be defined in GAMS?
- Replies: 3
- Views: 2477
Re: How can a three-way equality constraint be defined in GAMS?
Teo, Your primary question was about how to write A == B == C. You are correct in supposing that the way to write this is to use two equations: f1.. A =E= B; f2.. B =E= C; I have some additional comments about how you might use auxiliary variables. Your formulations included several sums that you us...
- 2 years ago
- Forum: Syntax
- Topic: upper/lower bound vs restriction
- Replies: 1
- Views: 2706
Re: upper/lower bound vs restriction
Pitters, In most cases, the two items you mention (x.up = 50 or x =L= 50) are identical. For example, most LP solvers include a presolve step that converts singleton equations like x =L= 50 into the equivalent explicit upper bound. Usually it is best to just set the variable upper bound explicitly i...
- 2 years ago
- Forum: Syntax
- Topic: compile-time variable/Parameter
- Replies: 2
- Views: 4558
Re: compile-time variable/Parameter
Iman, A compile-time variable is a mechanism for text substitution. For example, your GAMS code can look like this: set I; $gdxin data_%CASENAME% $load I $gdxin blah blah blah solve m using nlp min z; execute_unlload 'results_%CASENAME%', blah, blah, blah; and you can run the GAMS model like this ga...