I am trying to make a subset and find out the sum of elements in the
subset. However, I am getting error $125 pl help if you can. my code
as below-:
Set
I ‘number of products’ / 1*3 /
F(I) ‘products of firm 2’ /2, 3/;
alias (I,J);
Table Data(I, *) ‘Marginal cost Data’
C
1 2
2 2
3 2 ;
Parameter C(I) ‘Marginal Cost of each firms’ ;
C(I)= Data(I,‘C’);
Positive variables q(I) ‘production vector’
M(F) ‘production vector for firm 2’ ;
Variables P ‘price’ ;
Equations
dNegprofit(I) ‘differentiation of negative profit, d(-profit)/
dq: dTC - p - q(I)*dp’
Defp ‘Demand function’
TQ(I) ‘total quantity for firm 2’;
dnegprofit(I)…
C(I) - P + q(I) =g= 0 ;
Defp…P =e= 10-Sum(J, q(J));
TQ(F)… M(F) =e= Sum(F, q(F)); (The error results in this statement)
Model Cournot /dnegprofit.q, defp.p, TQ/;
Solve cournot using mcp ;
–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—
\