gft.gms : MPSGE model used by CTRLC test

Description


Small Model of Type : MPSGE


Category : GAMS Test library


Main file : gft.gms

$title 'MPSGE model used by CTRLC test' (GFT,SEQ=595)


$if not set ds $set ds g20_001
$include gtap8data.inc

parameter       esub(g)         Top-level elasticity indemand /C 1/;

$onText
$model:gtap8

$sectors:
        y(g,r)$vom(g,r)         ! Supply
        m(i,r)$vim(i,r)         ! Imports
        yt(j)$vtw(j)            ! Transportation services
        ft(f,r)$(sf(f) and evom(f,r))   ! Specific factor transformation

$commodities:
        p(g,r)$vom(g,r)         ! Domestic output price
        pm(j,r)$vim(j,r)        ! Import price
        pt(j)$vtw(j)            ! Transportation services
        pf(f,r)$evom(f,r)       ! Primary factors rent
        ps(f,g,r)$(sf(f) and vfm(f,g,r))        ! Sector-specific primary factors

$consumers:
        ra(r)                   ! Representative agent

$prod:y(g,r)$vom(g,r)   s:esub(g)    i.tl:esubd(i)  va:esubva(g)
        o:p(g,r)        q:vom(g,r)      a:ra(r)  t:rto(g,r)
        i:p(i,r)        q:vdfm(i,g,r)   p:(1+rtfd0(i,g,r)) i.tl:  a:ra(r) t:rtfd(i,g,r)
        i:pm(i,r)       q:vifm(i,g,r)   p:(1+rtfi0(i,g,r)) i.tl:  a:ra(r) t:rtfi(i,g,r)
        i:ps(sf,g,r)    q:vfm(sf,g,r)   p:(1+rtf0(sf,g,r))  va:    a:ra(r) t:rtf(sf,g,r)
        i:pf(mf,r)      q:vfm(mf,g,r)   p:(1+rtf0(mf,g,r))  va:    a:ra(r) t:rtf(mf,g,r)

$prod:yt(j)$vtw(j)  s:1
        o:pt(j)         q:vtw(j)
        i:p(j,r)        q:vst(j,r)

$prod:m(i,r)$vim(i,r)   s:esubm(i)  s.tl:0
        o:pm(i,r)       q:vim(i,r)
        i:p(i,s)        q:vxmd(i,s,r)   p:pvxmd(i,s,r) s.tl: a:ra(s) t:(-rtxs(i,s,r)) a:ra(r) t:(rtms(i,s,r)*(1-rtxs(i,s,r)))
        i:pt(j)#(s)     q:vtwr(j,i,s,r) p:pvtwr(i,s,r) s.tl: a:ra(r) t:rtms(i,s,r)

$prod:ft(sf,r)$evom(sf,r)  t:etrae(sf)
        o:ps(sf,j,r)    q:vfm(sf,j,r)
        i:pf(sf,r)      q:evom(sf,r)

$demand:ra(r)
        d:p("c",r)      q:vom("c",r)
        e:p("c",rnum)   q:vb(r)
        e:p("g",r)      q:(-vom("g",r))
        e:p("i",r)      q:(-vom("i",r))
        e:pf(f,r)       q:evom(f,r)

$offText
$sysInclude mpsgeset gtap8

gtap8.workspace = 128;
gtap8.iterlim = 0;
$include GTAP8.GEN
*solve gtap8 using mcp;


*       The elasticity for GAS is 34.  This makes calculations difficult.

esubm(i) = min(12,esubm(i));
esubd(i) = esubm(i)/2;


rtxs(i,s,r) = 0;
rtms(i,s,r) = 0;
gtap8.iterlim = 10000;
$include GTAP8.GEN
solve gtap8 using mcp;