Search found 8 matches
- 3 years ago
- Forum: Modeling
- Topic: Generating KKT condition of a LP using a solver
- Replies: 3
- Views: 2871
Re: Generating KKT condition of a LP using a solver
Hi If you use h-1 in your constraint, you will run into problems in the first h, as any parameter or variable with h-1 as index is not part of the model or defined. This might have been the reason that you had different results, as e(h-1) is set to zero for the first equation. To get rid of this pr...
- 3 years ago
- Forum: Modeling
- Topic: Generating KKT condition of a LP using a solver
- Replies: 3
- Views: 2871
Generating KKT condition of a LP using a solver
Hello, I have a linear program which I solved using GAMS. Then I derived the corresponding KKT conditions for the LP and solved using MCP Path solver and the results are the same which is expected. However, when I add a constraint similar to the one mentioned below, I cannot get the same results usi...
- 3 years ago
- Forum: Modeling
- Topic: Warm starting an optimization solve
- Replies: 1
- Views: 35840
Warm starting an optimization solve
I have an LP problem that I am solving using cplex solver with no issues and the results are making sense. Then, I derived the KKT conditions for the LP problem and solved it using MCP solver. However, the solutions obtained are not the same, although it should be the same if the KKT conditions are ...
- 4 years ago
- Forum: Syntax
- Topic: Summing over specific range
- Replies: 4
- Views: 17961
Re: Summing over specific range
Hi Yould define a parameter as follows: alias(h,ah); parameter hnr(h) Hour ord; hnr(h) = ord(h); p(s,h,ah)$(ord(h) eq hnr(h)).. Cheers Renger I tried the proposed way but I think I didn't quite understand the way you proposed to solve this. Let's say, set h /1*10/; p(s,h) $(ord(h) eq 1).. p(s,h) $(...
- 4 years ago
- Forum: Syntax
- Topic: Summing over specific range
- Replies: 4
- Views: 17961
Summing over specific range
I want to define three equations for three-time steps. For the first hour, I can write the following: p(s,h) $(ord(h) eq 1).. The last hour will be the following: p(s,h) $(ord(h) eq card(h)).. I am trying to write equations for the hours in between something like this but can't get the syntax right....
- 4 years ago
- Forum: Syntax
- Topic: GAMS Sum over a subset
- Replies: 2
- Views: 17782
Re: GAMS Sum over a subset
Thank you!
- 4 years ago
- Forum: Syntax
- Topic: GAMS Sum over a subset
- Replies: 2
- Views: 17782
GAMS Sum over a subset
I have the following sets, variables, and parameters in a GAMS model.
Any help is much appreciated.
Any help is much appreciated.
- 4 years ago
- Forum: Syntax
- Topic: GAMS error- Too much data on this line- rest ignored
- Replies: 1
- Views: 1742
GAMS error- Too much data on this line- rest ignored
I am trying to load data from a csv file (attached) using the following command: set i /1*1001/ ; parameter x(i)/ $ondelim $include Data.csv $offdelim /; The file has only 1001 data points. However, I am getting the following message in GAMS: error 465 Too much data on this line - rest ignored. Any ...