ALIASING -Whether it increase no of constraints by assigning 2 scenarios to one constraint

Problems with modeling
Post Reply
abrahamjp
User
User
Posts: 3
Joined: 6 years ago

ALIASING -Whether it increase no of constraints by assigning 2 scenarios to one constraint

Post by abrahamjp »

Kindly help me to understand how Alias (y,v) works to get 2 constraints

Code: Select all

[u][b](ie,high.low, high.high )[/b][/u]
from single Equation of IC (incentive Compatibility) Constraint;

Code: Select all

ic(v,y)..       ((sum(x,p(x,v)*sqrt(w(x)))-d(v))
                -(sum(x,p(x,y)*sqrt(w(x)))-d(y)))*dummy(v) =g= 0;
Output looks like this;
[/img]
gams output for High Effort
gams output for High Effort
[/img]

Complete Code snippet is below;

Code: Select all

*MORAL HAZARD 2 Activities
*Indiviua More Active SB
*C, B, N eplicitly shown
*Itoh,"A Course in Contract"4.2.2 p.161  IP'
Option limcol=0, limrow=0;

* Definition of Set
Set     x       project outcome /failure, success/
        y       effort level    /low, high/
        t       loop index      /1,2/;
Alias (y,v);
* Definition of Parameters
Table p(x,y)    probability of outcome by effort level
        low     high
failure 0.9     0.2
success 0.1     0.8
;

Parameter       d(y)    disutility by efforts
        /low    1
        high    2/
;
Parameter       r(x) project's interest
        /failure 13
        success  45/
;
Parameter dummy(y)      dummy to enable and disable equations;
dummy(y)=0;
* Definition of Primal Variables
Positive Variable
                w(x)    entrep's income
;

Variable        U       investor's expected utility
;
Equation
                obj     utility function
                pc(y)   participation constraint
                ic(v,y) incentive compatibility constraint
;

* Defining and Solving the Model
*more active efforts
obj..           U =e= sum((x,y), dummy(y)*p(x,y)*(r(x) - w(x)));
pc(y)..         (sum(x,p(x,y)*sqrt(w(x)))-d(y))*dummy(y) =g= 0;
ic(v,y)..       ((sum(x,p(x,v)*sqrt(w(x)))-d(v))
                -(sum(x,p(x,y)*sqrt(w(x)))-d(y)))*dummy(v) =g= 0;

* Setting Lower Bounds on Variables to Avoid Division by Zero
w.lo(x)=0.0001;

Model MH001FB  First Best Model  /obj,pc   /;
Model MH001SB  Second Best Model /obj,pc,ic/;

Parameter
        w_FB(y,x)  payments
        u_e_FB(y,x) entrep's FB utility
        C_FB(y)    investor's FB expected payment
        B_FB(y)    investor's FB expected revenue
        Net_FB(y)  investor's FB expected utility

        w_SB(y,x)  payments
        u_e_SB(y,x) entrep's utility
        C_SB(y)    investor's expected payment
        B_SB(y)    investor's expected revenue
        Net_SB(y)  investor's expected utility
;

Loop(t,
dummy(y)=1$(ord(t) eq ord(y));

Solve MH001FB maximizing U using NLP;

Solve MH001SB maximizing U using NLP;

);
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: ALIASING -Whether it increase no of constraints by assigning 2 scenarios to one constraint

Post by Renger »

Hi
I would use a mapping, to constraint the equation:

Code: Select all

set
    mapYY(y,v)  /high.high, high.low/;
Your equation can then be written as follows:

Code: Select all

ic(v,y)$mapYY(v,y)..       ((sum(x,p(x,v)*sqrt(w(x)))-d(v))
                -(sum(x,p(x,y)*sqrt(w(x)))-d(y)))*dummy(v) =g= 0;
If you then look in your listing, you will see that this results in two equations:

Code: Select all


---- EQU ic  incentive compatibility constraint

             LOWER     LEVEL     UPPER    MARGINAL

high.low      1.000     1.000     +INF     -0.653      
high.high      .         .        +INF       .         
CHeers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Post Reply