* facclos.inc

DISPLAY "#### START: facclos.inc";    

* for labor, fix labor force participation rate
LABPARTRAT.FX(t) = LABPARTRAT0(t);
QLABSCAL.LO(t) = -INF;
QLABSCAL.UP(t) = +INF;

$ONTEXT
* alt:
LABPARTRAT.LO(t) = -INF;
LABPARTRAT.UP(t) = +INF;
QLABSCAL.FX(t) = QLABSCAL0(t);
$OFFTEXT

LOOP(f,

* full employment (fixed UERAT); mobile factor
  IF (facclossim(sim,f) EQ 1,
    WFDIST.FX(f,a,t) = WFDIST0(f,a,t);
    WF.LO(f,t)       = -INF;
    WF.UP(f,t)       = +INF;
    QF.LO(f,a,t)$QF0(f,a,t) = -INF;
    QF.UP(f,a,t)$QF0(f,a,t) = +INF;
    UERAT.FX(f,t) = UERAT0(f,t);
    QFSSCAL.FX(f,t) = QFSSCAL0(f,t);
  );

* full employment (fixed UERAT); specific factor
  IF (facclossim(sim,f) EQ 2,
    WFDIST.LO(f,a,t)$QF0(f,a,t) = -INF;
    WFDIST.UP(f,a,t)$QF0(f,a,t) = +INF;
    WF.FX(f,t)       = WF0(f,t);
*!! to do?? fix QF at qfexog that could differ between 0 and sim??    
    QF.FX(f,a,t)     = QF0(f,a,t);
    UERAT.FX(f,t) = UERAT0(f,t);
    QFSSCAL.LO(f,t) = -INF;
    QFSSCAL.UP(f,t) = +INF;
    
  );

* unemployment assuming exgenous (constant) real wage; mobile factor
  IF (facclossim(sim,f) EQ 3,
    WFDIST.FX(f,a,t) = WFDIST0(f,a,t);
    WF.FX(f,t)       = WF0(f,t);
    QF.LO(f,a,t)$QF0(f,a,t) = -INF;
    QF.UP(f,a,t)$QF0(f,a,t) = +INF;
    UERAT.FX(f,t) = UERAT0(f,t);    
    QFSSCAL.LO(f,t) = -INF;
    QFSSCAL.UP(f,t) = +INF; 
  );

* unemployment assuming wage curve (i.e., negative relation bt real wage and UERAT); mobile factor
  IF (facclossim(sim,f) EQ 4,
    WFDIST.FX(f,a,t) = WFDIST0(f,a,t);
    WF.LO(f,t)       = -INF;
    WF.UP(f,t)       = +INF;
    QF.LO(f,a,t)$QF0(f,a,t) = -INF;
    QF.UP(f,a,t)$QF0(f,a,t) = +INF;
    UERAT.LO(f,t) = -INF;
    UERAT.UP(f,t) = +INF;
    QFSSCAL.FX(f,t) = QFSSCAL0(f,t);    
  );
  
);  



*### capital dynamic model
WFDIST.LO(fcap,a,t)$(fcapng(fcap) AND QF00(fcap,a)) = -INF;
WFDIST.UP(fcap,a,t)$(fcapng(fcap) AND QF00(fcap,a)) = +INF;
WF.FX(fcap,t)$(dmod AND fcapng(fcap))                      = WF0(fcap,t);
QF.FX(fcap,a,t)$(fcapng(fcap) AND tmin(t))      = QF0(fcap,a,t);
QF.LO(fcap,a,t)$(fcapng(fcap) AND NOT tmin(t) AND QF00(fcap,a))  = -INF;
QF.UP(fcap,a,t)$(fcapng(fcap) AND NOT tmin(t) AND QF00(fcap,a))  = +INF;


* no need to flex QFSSCAL for capital endowments, given that we have droped factor market eq cond for capital
* also revelant is that QFSSCAL is not used in defining capital endowments
* capital endowments will adjust following QF; note that capital income is dist based on pop shares; not based on saving rates
*QFSSCAL.LO(fcap(f),t)$dmod = -INF;
*QFSSCAL.UP(fcap(f),t)$dmod = +INF;




DISPLAY "#### END: facclos.inc";    
