Revised equilibrium example

Top  Previous  Next

The economic equilibrium model was of the form

 

Demand Price:P    > Pd = 6 - 0.3*Qd
Supply Price:P    < Ps = 1 + 0.2*Qs
Quantity Equilibrium:Qs   > Qd
Non negativityP, Qs, Qd  > 0

 

and is a single commodity model.  Introduction of multiple commodities means that we need a subscript for commodities and consideration of cross commodity terms in the functions.  Such a formulation where c depicts commodity can be presented as

eq005

where

Pcis the price of commodity c
Qdcis the quantity demanded of commodity c
Pdcis the price from the inverse demand curve for commodity c
Qscis the quantity supplied of commodity c
Pscis the price from the inverse supply curve for commodity c
ccis an alternative index to the commodities and is equivalent to c
Idcis the inverse demand curve intercept for c
Sdc,ccis the inverse demand curve slope for the effect of buying one unit of commodity cc on the demand price of commodity c.  When c=cc this is an own commodity effect and when c≠cc then this is a cross commodity effect.
Iscis the inverse supply curve intercept for c
Ssc,ccis the inverse supply curve slope for the effect of supplying one unit of commodity cc on the supply price of commodity c.  When c=cc this is an own commodity effect and when c≠cc then this is a cross commodity effect.

 

An algebraic based GAMS formulation of this is (econequilalg.gms)

 

Set commodities /corn,wheat/;

Set curvetype /Supply,demand/;

Table intercepts(curvetype,commodities)

                  corn   wheat

         demand    4       8

         supply    1       2;

table slopes(curvetype,commodities,commodities)

                   corn  wheat

     demand.corn   -.3    -.1

     demand.wheat  -.07   -.4

     supply.corn    .5     .1

     supply.wheat   .1     .3     ;

POSITIVE VARIABLES  P(commodities)

                    Qd(commodities)

                    Qs(commodities)  ;

EQUATIONS     PDemand(commodities)

              PSupply(commodities)

              Equilibrium(commodities)  ;

alias (cc,commodities);

Pdemand(commodities)..

    P(commodities)=g=

       intercepts("demand",commodities)

       +sum(cc,slopes("demand",commodities,cc)*Qd(cc));

Psupply(commodities)..

    intercepts("supply",commodities)

   +sum(cc,slopes("supply",commodities,cc)* Qs(cc))

    =g= P(commodities);

Equilibrium(commodities)..

     Qs(commodities)=g=  Qd(commodities);

MODEL PROBLEM /Pdemand.Qd, Psupply.Qs,Equilibrium.P/;

SOLVE PROBLEM USING MCP;