Search found 12 matches

by chessosskar
2 years ago
Forum: Modeling
Topic: Stackelberg non linear problem
Replies: 2
Views: 2463

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...
by chessosskar
2 years ago
Forum: Modeling
Topic: Stackelberg non linear problem
Replies: 2
Views: 2463

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...
by chessosskar
2 years ago
Forum: Syntax
Topic: Unknown identifier entered as set
Replies: 2
Views: 2756

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...
by chessosskar
2 years ago
Forum: Syntax
Topic: Unknown identifier entered as set
Replies: 2
Views: 2756

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...
by chessosskar
2 years ago
Forum: Syntax
Topic: syntax for KKT conditions
Replies: 1
Views: 1688

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.
by chessosskar
2 years ago
Forum: Syntax
Topic: syntax for KKT conditions
Replies: 1
Views: 1688

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...
by chessosskar
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.
by chessosskar
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 ...
by chessosskar
2 years ago
Forum: Syntax
Topic: Uncontrolled set entered as constant
Replies: 2
Views: 3508

Re: Uncontrolled set entered as constant

yes that works very well- thanks
by chessosskar
2 years ago
Forum: Syntax
Topic: Error 66
Replies: 2
Views: 3014

Re: Error 66

Hi!
yes that works a treat. ill know to check the .lst next time. thanks a lot