Hello everybody,
being relatively new to GAMS I am stuck with a issue concerning an MCP model. I have successfully modeled an oligopolistic market structure with m producers of a certain good. I have defined a producer specific marginal cost curve and a linear demand curve as well as a capacity constraint for each producer. Using Karush Kuhn Tucker conditions (first derivative of the profit function) the model calculates the nash equilibrium so that each player maximizes his own profit. So far so good.
What I want to do now is to increase the number of markets (=>different countries) where the producers can sell their good. So I introduced a new set to define new markets. But now I have a problem: each producer has to choose not only one value (= his individual production quantity), but a set of values (= his individual production quantity in country i=1,2,3,....,n). So The decision variable q (quantity) does not depend on ONE set, but on two sets.
As far as I have seen the MCP solver is not able to solve a problem with a decision variable that depends on more than one set. Can you still give me a hint how I could still solve the problem with more than one market?
Best regards,
Felix
Attached: the code as it is so far:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Sets
m manufacturers /m1*m2/
i country /i1/
j counter set for demand function table /q_ref, p_ref, epsilon/
;
Alias (m,n);
Parameters
*c(m) is the gradient factor of the linear mc-function
c(m) gradient of marginal cost function of manufacturer m [ MC(q(m))= c(m)*q(m) ]
/m1 1
m2 1
/
cap(m) maximum output of manufacturer m
/m1 1
m2 1
/
Table d(i,j)
q_ref p_ref epsilon
i1 0.5 0.5 -1
*i2 0.5 0.5 -1
;
Parameter
*The prohibitive price a(i) is calculated using the formulas
*p=a+b*q and
*epsilon (=price elasticity) = (dq/q)/(dp/p) = dq/dp * q/p
*as well as a reference point [q_ref|p_ref] with a corresponding elasticity epsilon
*So the value a(i), which stands for the point where the price-demand-function
*crosses the price-axis, is not used directly. This is just another approach of
*defining the price-demand-curve. After the calculation the parameters a(i) are
*used because a(i) is easier to read than the expression with elasticity.
*The same applies for b(i).
a(i) prohibitive price
b(i) gradient of price-demand curve
;
a(i) = d(i,'p_ref') * (1-1/d(i,'epsilon'));
b(i) = d(i,'p_ref')/(d(i,'q_ref')*d(i,'epsilon'));
Positive Variables
q(m) output quantity of manufacturer m (decision variable)
z(m) profit of manufacturer m
z_tot profit
p(i) clearing price
lambda(m) dual variable (capacity constraint)
;
Equations
kkt(m) set q(m) to maximize profit of all m in country i1
capconstr(m) maximum output of manufacturer m
;
kkt(m).. - a('i1') - b('i1') * sum(n,q(n)) - b('i1')*q(m) + 0.5*(2*c(m)*q(m)) + lambda(m) =e= 0;
capconstr(m).. cap(m) - sum(i,q(m)) =e= 0;
Model Nash_Cournot /kkt.q,
capconstr.lambda
/;
Solve Nash_Cournot using mcp;
p.l(i) = a(i) - sum(m,q.l(m));
z.l(m) = sum(i,q.l(m)*p.l(i) - (0.5*c(m)*q.l(m)**2 ));
z_tot.l = sum ((m), z.l(m));
Display q.l, p.l, z.l, z_tot.l, lambda.l;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.