Search found 12 matches
- 2 years ago
- Forum: Modeling
- Topic: Stackelberg non linear problem
- Replies: 2
- Views: 2465
Re: Stackelberg non linear problem
Hi Steve Many thanks for your reply, it was very useful. I used the suggestion to implement MPEC. I'm not sure if it would work as bilevel, as the model is quite large... I tried the Harker model and it wouldn't work. But the MPEC does work! Here is the code. April8.gms For 2019, the solution does n...
- 2 years ago
- Forum: Modeling
- Topic: Stackelberg non linear problem
- Replies: 2
- Views: 2465
Stackelberg non linear problem
Hi peeps So i want to programme a Stackelberg model with the following complementary conditions: image.png It is a non-linear maximisation problem so I thought I should use 'nlp' to solve the model. Whilst the nlp programme runs without an error, it does not seem to have taken into account the compl...
- 2 years ago
- Forum: Syntax
- Topic: Unknown identifier entered as set
- Replies: 2
- Views: 2760
Re: Unknown identifier entered as set
Hi achristensen thanks so much for your reply, it was very helpful. I initially tried mu("Russia") since this seemed like the most straightforward approach and it got rid of the error messages. But it didn't work with the model statement i think because my dimensions were still a bit messe...
- 2 years ago
- Forum: Syntax
- Topic: Unknown identifier entered as set
- Replies: 2
- Views: 2760
Unknown identifier entered as set
i am having trouble writing out the following KKT condition Screenshot 2022-04-06 at 15.48.03.png If i type the following code in it works (provisionally) fine: Screenshot 2022-04-06 at 15.54.03.png but ideally, i would not like to have a separate variable mu_Russia. I would like to define mu over t...
- 2 years ago
- Forum: Syntax
- Topic: syntax for KKT conditions
- Replies: 1
- Views: 1691
Re: syntax for KKT conditions
Every player has a set of mines and one dual variable for supply. Therefore i don't think i can simply write
Rus_KKT_2(Rus_mines, players1)
since this would create equilbirum conditions that relate russia mines to US and Australian dual variables which wouldn't make much sense.
Rus_KKT_2(Rus_mines, players1)
since this would create equilbirum conditions that relate russia mines to US and Australian dual variables which wouldn't make much sense.
- 2 years ago
- Forum: Syntax
- Topic: syntax for KKT conditions
- Replies: 1
- Views: 1691
syntax for KKT conditions
Hi i am struggling with writing out the KKT conditions for my model This is what i want I'm trying to write Screenshot 2022-04-04 at 01.21.17.png my best attempt is the following: Rus_KKT_2(Rus_mines).. s_coefs(Rus_mines,"alpha")+ lambda(Rus_mines)-xi(Russia) =g= 0; Which gives these error...
- 2 years ago
- Forum: Modeling
- Topic: Rerunning the model with different data
- Replies: 2
- Views: 1573
Re: Rerunning the model with different data
Thank you so much. That is very helpful. I would never have thought of doing it that way.
- 2 years ago
- Forum: Modeling
- Topic: Rerunning the model with different data
- Replies: 2
- Views: 1573
Rerunning the model with different data
Hi I am modelling international coal markets. I want to see how my model changes when i change demand a bit. I currently have the slope and intercept data fro my demand curves (South Asia, Americas, Europe and China all get their own demand curves). Then i want to re run the programme with slightly ...
- 2 years ago
- Forum: Syntax
- Topic: Uncontrolled set entered as constant
- Replies: 2
- Views: 3541
Re: Uncontrolled set entered as constant
yes that works very well- thanks
Re: Error 66
Hi!
yes that works a treat. ill know to check the .lst next time. thanks a lot
yes that works a treat. ill know to check the .lst next time. thanks a lot