Search found 8 matches

by GFA
4 months ago
Forum: Modeling
Topic: Double Exponent in Objective Function
Replies: 5
Views: 286

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 ...
by GFA
4 months ago
Forum: Modeling
Topic: Division by zero
Replies: 9
Views: 416

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 all the ....
by GFA
4 months ago
Forum: Modeling
Topic: Division by zero
Replies: 9
Views: 416

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 also: https:/...
by GFA
4 months ago
Forum: Modeling
Topic: Division by zero
Replies: 9
Views: 416

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.
by GFA
4 months ago
Forum: Syntax
Topic: Bad dimension error when using gdxxrw
Replies: 3
Views: 347

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
by GFA
1 year ago
Forum: Modeling
Topic: Solving MIP with CPLEX. Gap 0%?
Replies: 1
Views: 691

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 following option...
by GFA
1 year ago
Forum: Modeling
Topic: Linearization problem with three decision variables
Replies: 1
Views: 454

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...
by GFA
1 year ago
Forum: Modeling
Topic: Transportation problem
Replies: 1
Views: 491

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...