377 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
41
views
Tracking Per-Iteration Values of a Constraint in Pyomo Using GAMS:IPOPT
I am using Pyomo with the GAMS:IPOPT solver, and I want to track the changing value of a constraint at each iteration during the solver process. The constraint is defined as follows:
model....
0
votes
1
answer
28
views
Re-use variable for the following year GAMS
I have a script in Gtree with GAMS on the carry-over effect on groundwater. I initialised the groundwater depth in the year 2000, and then I need to use the end-of-the-year groundwater depth as a ...
0
votes
2
answers
38
views
How do I solve the lack of excel sheets creation in GAMS?
I use GAMS with gtree to get an output file of my model, however, one excel sheet is created while the other is not created.
This is my output code;
$libinclude xldump Water_balance_summary Output\...
0
votes
2
answers
59
views
How can I add elements to an existing Set in GAMSPy?
I'm working with the GAMSPy Python API and using Set objects to define sets in a GAMS model. I can define a set like this:
from gamspy import Container, Set
m = Container()
regions = Set(m, name=&...
0
votes
1
answer
66
views
GAMS shell solver functionality is not available. - Pyomo error when using GAMS
I had never seen this problem, this is a Windows computer with GAMS is installed with a proper license. The "gams" command is found from the command shell (since the GAMS path is added to ...
0
votes
0
answers
36
views
How to define special sets to workaround network flow?
I am working on a special network flow problem, trying to implement in GAMS, something like a (N∗N) grid, and I am having difficulties to define some of its sets. The problem is stated as follows:
...
1
vote
1
answer
40
views
Use of subsets in conditional statements in GAMS
I have a set lall (location) that includes theoretical node names l1,l2,l4,l6,l11,l13 as defined as followed. lall.csv is just a one column csv file with l1,l2,l4,l6,l11,l13
set lall "all ...
0
votes
1
answer
167
views
How to correctly loop in GAMS models with dynamics in equations?
I'm trying to understand what's the proper way to make a recursive-dynamic model in GAMS.
For this I've made a toy example of 2 linear equations (aka cobweb model). Now it starts at random point P(t=1)...
0
votes
1
answer
49
views
Resolving Several Errors for a Line of Code in GAMS software
I have several errors in the following line:
e3_d(b).. sum( (t)$(ord(t) >= 1) and (ord(t) <= t-N_chp_on_max+N_chp_on_max), alpha(b, t) ) =l= N_chp_on_max;
Two errors (',' expected) and (Unknown ...
0
votes
1
answer
26
views
Save "Text Document", "LOG", "SAS Output", etc. from GAMS in a specific folder
Is it possible to save "Text Document", "LOG", "SAS Output" and "LXI File" in a specific folder when executing a .gms file with GDX creation?
0
votes
1
answer
34
views
GAMS Dimension different - The symbol is referenced with more/less indices as declared
Sets
i /1*20/
alias(i,j);
Parameters
pi(i) "Profit of item i"
W "Width of the container"
H "Height of the ...
1
vote
0
answers
44
views
Is it possible to include an equation with a condition that depends on a variable in another equation?
I have a question regarding GAMS basics. Is it possible to include an equation with a condition that depends on a variable in another equation? Specifically, I am trying to include an equation for ...
0
votes
2
answers
449
views
Reading .gdx files without GAMS software
How can I read data from a .gdx file without having GAMS software installed on my computer? I have Jupyter Notebook and Python, and would like to load that data into a Python script.
I've tried to use ...
-1
votes
1
answer
50
views
Why does my gams code throw errors and doesn't return what I want?
My GAMS code throws errors, but I can't figure out why. Can you please help?
SETS
i beds /1,2,3,4,5,6,7,8,9,10/
w weaving machines /W1,W2,W3,W4/
h handle machines /H1,H2,H3,H4/
e ...
1
vote
1
answer
50
views
How can I fix error on finding max value in matrix MIP?
I stuck on finding max value each column by writing constraint in MIP. Unfortunately, the error was
Error 59 Endogenous prod smin smax require model type
Error 256 equation eq2.. VAR prod smin smax
...