Search found 214 matches
- 2 years ago
- Forum: Modeling
- Topic: constraint variables in set
- Replies: 2
- Views: 1527
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: 1584
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: 2431
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: 2152
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: 2252
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: 6604
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: 2391
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: 2622
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: 4292
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...
- 2 years ago
- Forum: Solvers
- Topic: MOSEK: Problem becomes infeasible when I change the objective function
- Replies: 4
- Views: 3759
Re: MOSEK: Problem becomes infeasible when I change the objective function
Hello,
If you suspect that there is a bug in GAMS you should contact GAMS support with a minimal reproducible example. Be clear about what you consider wrong, and what you expect instead, and how to reproduce the wrong behavior. Send .log and .lst files illustrating the wrong behavior.
-Steve
If you suspect that there is a bug in GAMS you should contact GAMS support with a minimal reproducible example. Be clear about what you consider wrong, and what you expect instead, and how to reproduce the wrong behavior. Send .log and .lst files illustrating the wrong behavior.
-Steve