Search found 50 matches
- 4 years ago
- Forum: Syntax
- Topic: commercial diameter - declare
- Replies: 4
- Views: 3777
Re: commercial diameter - declare
Hi Alexanre, Not sure if I understand your question correctly, but maybe need something like this: dr(n,nd)$(dcal(n,nd) gt 150 and dcal(n,nd) le 200) = 200; etc. Beware of the "ge" (greater or equal than) and "le" (less or equal than). Depending on what you want you also might ne...
- 4 years ago
- Forum: Syntax
- Topic: How to execute many "programs" at one time?
- Replies: 10
- Views: 8044
Re: How to execute many "programs" at one time?
Hi,
You can use in your bat-file the complete path to gams, e.g.:
"C:\Program Files\GAMS\win64\25.1\gams" C:\GAMSfile.gms
And it will open GAMSfile.gms
I think you can also use "gams C:\GAMSfile.gms" when you make a windows environment variable of GAMS
GFA
You can use in your bat-file the complete path to gams, e.g.:
"C:\Program Files\GAMS\win64\25.1\gams" C:\GAMSfile.gms
And it will open GAMSfile.gms
I think you can also use "gams C:\GAMSfile.gms" when you make a windows environment variable of GAMS
GFA
- 4 years ago
- Forum: Modeling
- Topic: Double Exponent in Objective Function
- Replies: 5
- Views: 3711
Re: Double Exponent in Objective Function
Hi pelorn, I tried to reproduce your error but somehow in my example they are the same? set t /1*5/; parameter CEMUTOTPER(t); CEMUTOTPER(t) = 5; parameter Test; parameter Test2; Test = (power((sum(t, CEMUTOTPER(t))),2))**0.5; Test2 = sum(t, CEMUTOTPER(t)) display Test, Test2; ---- 10 PARAMETER Test ...
- 4 years ago
- Forum: Modeling
- Topic: Division by zero
- Replies: 9
- Views: 5404
Re: Division by zero
I think it is also possible to state the path GDXXRW should send the log-file to (for example log=c:\GAMSmodel\log.txt) You could also use a "$stop" after the GDXXRW statement, then you don't need to wait for all other GAMS code to be run. Note that the GAMS-code you turned off is deleting...
- 4 years ago
- Forum: Modeling
- Topic: Division by zero
- Replies: 9
- Views: 5404
Re: Division by zero
GDXXRW should write the data to the GDX-file "data_ts.gdx", is the data for i_windOn/i_windNo/i_windOf in there? If not, you can let GDXXRW write a log-file which might give clues why the data is not read in properly: par=i_windOn rng=windOn!a6:bd8767 rdim=1 cdim=2 log=i_windOn.txt See als...
- 4 years ago
- Forum: Modeling
- Topic: Division by zero
- Replies: 9
- Views: 5404
Re: Division by zero
Maybe you include some files with $include? Then the line numbering is different because you have to add the number of lines of the included files.
But just look in the listing file, there it will print the GAMS code including the $include files and the numbering will be correct.
But just look in the listing file, there it will print the GAMS code including the $include files and the numbering will be correct.
- 4 years ago
- Forum: Syntax
- Topic: Bad dimension error when using gdxxrw
- Replies: 3
- Views: 3217
Re: Bad dimension error when using gdxxrw
Hi Sarah,
You don't need semicolons after "$"-statements.
Here GAMS gives the error: "ZIMSAM2 Bad dimension: 1;"
Drop the semicolon in "cdim=1;" and it should work fine.
Auke
You don't need semicolons after "$"-statements.
Here GAMS gives the error: "ZIMSAM2 Bad dimension: 1;"
Drop the semicolon in "cdim=1;" and it should work fine.
Auke
- 5 years ago
- Forum: Modeling
- Topic: Solving MIP with CPLEX. Gap 0%?
- Replies: 1
- Views: 2822
Solving MIP with CPLEX. Gap 0%?
Dear GAMS-users, I'm trying to solve a MIP-model using CPLEX, however somehow the model becomes very slow (see attachment). What I don't understand is why it keeps saying "GAP 0%" while not returning an optimal solution. Does anyone have a clue why the model could be slow? I set the follow...
- 5 years ago
- Forum: Modeling
- Topic: Linearization problem with three decision variables
- Replies: 1
- Views: 2583
Linearization problem with three decision variables
Dear GAMS-users, I'm trying to formulate a linear problem with three decision variables, however somehow I am not getting it to work properly. For example we have a production problem with three decision variables: - Quality of production inputs (Quality 1,2,3, etc.) - binary variable - Production t...
- 5 years ago
- Forum: Modeling
- Topic: Transportation problem
- Replies: 1
- Views: 2529
Transportation problem
Hi, I'm struggling with this problem which seems easy, but somehow I'm not getting it to work properly. Lets say we have a production process which converts inputs into outputs which are being transported to several regions. My model (see attachment for a toy example which gives the same results) ma...