Following
we can write a simple diagonalization / relaxation algorithm in GAMS that computes the oligopolistic market equilibrium of the problem described here: http://yetanothermathprogrammingconsultant.blogspot.com/2015/03/oligopolistic-producer-behavior-or-why.html.
In this algorithm we solve a sub-problem where we maximize profits (varying the output) for each firm while we keep the output of the other firms constant in the sub-problem (i.e. we take them from the previous iteration of the algorithm). The sub-problem is now a straightforward NLP. It looks like:
We run this model in a loop until it converges: the quantities produced don’t change anymore:
We see we can reproduce the results from the paper:
---- 104 PARAMETER trace firm1 firm2 firm3 firm4 firm5 diff iter0 10.000 10.000 10.000 10.000 10.000 |
It is always nice to see that we can reproduce some results.
Notes:
- Note: to speed up the iterations we can set solprint and solvelink:
- Patrick Harker has been appointed as the next president of the Fed in Philadelphia [link].
- The trace output illustrates the linear convergence of this algorithm: the difference is halved by each iteration.
- This algorithm is also known as the PIES-q algorithm [link].
No comments:
Post a Comment