Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2009-08-26 10:36:33
Size: 578
Comment:
Revision 11 as of 2009-09-03 11:23:17
Size: 4417
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Options =
For each model representation there are two kind of options:
 * the options which are used during the prerpocessing step and that modify the model reprewentation. There are called global options:
  * the internal representation of the model: bytecode or human readable forme;
  * the block decomposition of the model: block;
  * the model simplification. All the elements of the jacobian which are below a cutoff are discarded: cutoff=real value
  * Each block of the model can be rewritten in a quais recursiv
     * mfs = 0 : (default value) the
  *
= Description of the ByteCode format =

== List of tags ==
Each tag is coded as char.
 * FBEGINBLOCK:
  * Description: New block
  * Arguments:
   * Size of the block (int) (number of equations)
   * Type of the block (int) see appendix
   * for each equation
     * Variable number (int)
     * Equation number (int)
     * Own derivative (int) (unused)
 * FDIMT or FDIMST
  * Description: Indicate the number of temporary terms (needed to allocate the memory space for temporary terms) (FDIMT for dynamic model and FDIMTS for static model)
  * Arguments:
   * Number of temporary terms (int)
 * FEND
  * Description: End of the model
  * Arguments:
 * FENDBLOCK
  * Description: End of a model block
  * Arguments:
 * FLDV
  * Description: load a variable for dynamic model
  * Arguments:
   * Variable type (char)
   * for eEndogenous, eExogenous and eExogenousDet
    * Variable number (int)
    * Lag or lead (int)
   * for eParameter
    * Variable number (int)
 * FLDSV
  * Description: load a variable for static model
  * Arguments:
   * Variable type (char)
   * Variable number (int)
 * FLDT or FLDST
  * Description: load a temporary term (FLDT for dynamic model and FLDST for static model)
  * Arguments:
   * Number (int)
 * FLDU or FLDUS
  * Description: load an element of the sparse representation of the Jacobian matrix (FLDU for dynamic model or FLDUS for static model)
  * Argument:
   * Number (int)
 * FLDR
  * Description: load a residual
  * Argument:
   * Number (int)
 * FLDZ
  * Description: load zero
  * Arguments
 * FLDC
  * Description: load a constant
  * Arguments:
   * Value (double)
 * FSTPV
  * Description: store a variable for a dynamic model
  * Arguments:
   * Variable type (char)
   * for eEndogenous, eExogenous and eExogenousDet
    * Variable number (int)
    * Lag or lead (int)
   * for eParameter
    * Variable number (int)
 * FSTPSV
  * Description: store a variable for static model
  * Arguments:
   * Variable type (char)
   * Variable number (int)
 * FSTPT or FSTPST
  * Description: store a temporary term (FSTPT for dynamic model and FSTPST for static model)
  * Arguments:
   * Number (int)
 * FSTPU or FSTPUS
  * Description: store an element of the sparse representation of the Jacobian matrix (FSTPU for dynamic model or FSTPUS for static model)
  * Argument:
   * Number (int)
 * FSTPR
  * Description: store a residual
  * Argument:
   * Number (int)
 * FSTPG
  * Description: store a derivative
  * Argument:
   * Number (int)
 * FBINARY
  * Description: compute a binary operation
  * Argument:
   * opCode (int)
 * FUNARY
  * Description: compute a unary operation
  * Argument:
   * opCode (int)
 * FENDEQU
  * Description: End of an equation
  * Argument:
 * FCUML
  * Description: add two arguments in the stack and put the result in the stack
  * Argument:

== Appendix: Type of block ==
 * EVALUATE_FORWARD: the block is recursive and the equations have to be simply evaluated. Because the block is backward looking, the simulation is performed from the first period to the last period.
 * EVALUATE_BACKWARD: the block is recursive and the equations have to be simply evaluated. Because the block is forward looking, the simulation is performed from the last period to the firs period.
 * SOLVE_FORWARD_SIMPLE: the block is composed of only one equation that has to be solved. Because the block is backward looking, the simulation is performed from the first period to the last period.
 * SOLVE_ BACKWARD _SIMPLE: the block is composed of only one equation that has to be solved. Because the block is forward looking, the simulation is performed from the last period to the firs period.
 * SOLVE_FORWARD_COMPLETE: the block is composed of several equations and it does not contain any lead endogenous variable. It has to be solved period by period from the first period to the last period
 * SOLVE_BACKWARD_COMPLETE: the block is composed of several equations and it does not contain any lag endogenous variable. It has to be solved period by period from the last period to the first period
 * SOLVE_TWO_BOUNDARIES_COMPLETE or SOLVE_TWO_BOUNDARIES_SIMPLE: the block is composed of equations and it contains lead and lag endogenous variables. The block is simulated, using its stacked-time representation.

Description of the ByteCode format

List of tags

Each tag is coded as char.

  • FBEGINBLOCK:
    • Description: New block
    • Arguments:
      • Size of the block (int) (number of equations)
      • Type of the block (int) see appendix
      • for each equation
        • Variable number (int)
        • Equation number (int)
        • Own derivative (int) (unused)
  • FDIMT or FDIMST
    • Description: Indicate the number of temporary terms (needed to allocate the memory space for temporary terms) (FDIMT for dynamic model and FDIMTS for static model)
    • Arguments:
      • Number of temporary terms (int)
  • FEND
    • Description: End of the model
    • Arguments:
  • FENDBLOCK
    • Description: End of a model block
    • Arguments:
  • FLDV
    • Description: load a variable for dynamic model
    • Arguments:
      • Variable type (char)
      • for eEndogenous, eExogenous and eExogenousDet
        • Variable number (int)
        • Lag or lead (int)
      • for eParameter
        • Variable number (int)
  • FLDSV
    • Description: load a variable for static model
    • Arguments:
      • Variable type (char)
      • Variable number (int)
  • FLDT or FLDST
    • Description: load a temporary term (FLDT for dynamic model and FLDST for static model)
    • Arguments:
      • Number (int)
  • FLDU or FLDUS
    • Description: load an element of the sparse representation of the Jacobian matrix (FLDU for dynamic model or FLDUS for static model)
    • Argument:
      • Number (int)
  • FLDR
    • Description: load a residual
    • Argument:
      • Number (int)
  • FLDZ
    • Description: load zero
    • Arguments
  • FLDC
    • Description: load a constant
    • Arguments:
      • Value (double)
  • FSTPV
    • Description: store a variable for a dynamic model
    • Arguments:
      • Variable type (char)
      • for eEndogenous, eExogenous and eExogenousDet
        • Variable number (int)
        • Lag or lead (int)
      • for eParameter
        • Variable number (int)
  • FSTPSV
    • Description: store a variable for static model
    • Arguments:
      • Variable type (char)
      • Variable number (int)
  • FSTPT or FSTPST
    • Description: store a temporary term (FSTPT for dynamic model and FSTPST for static model)
    • Arguments:
      • Number (int)
  • FSTPU or FSTPUS
    • Description: store an element of the sparse representation of the Jacobian matrix (FSTPU for dynamic model or FSTPUS for static model)
    • Argument:
      • Number (int)
  • FSTPR
    • Description: store a residual
    • Argument:
      • Number (int)
  • FSTPG
    • Description: store a derivative
    • Argument:
      • Number (int)
  • FBINARY
    • Description: compute a binary operation
    • Argument:
      • opCode (int)
  • FUNARY
    • Description: compute a unary operation
    • Argument:
      • opCode (int)
  • FENDEQU
    • Description: End of an equation
    • Argument:
  • FCUML
    • Description: add two arguments in the stack and put the result in the stack
    • Argument:

Appendix: Type of block

  • EVALUATE_FORWARD: the block is recursive and the equations have to be simply evaluated. Because the block is backward looking, the simulation is performed from the first period to the last period.
  • EVALUATE_BACKWARD: the block is recursive and the equations have to be simply evaluated. Because the block is forward looking, the simulation is performed from the last period to the firs period.
  • SOLVE_FORWARD_SIMPLE: the block is composed of only one equation that has to be solved. Because the block is backward looking, the simulation is performed from the first period to the last period.
  • SOLVE_ BACKWARD _SIMPLE: the block is composed of only one equation that has to be solved. Because the block is forward looking, the simulation is performed from the last period to the firs period.
  • SOLVE_FORWARD_COMPLETE: the block is composed of several equations and it does not contain any lead endogenous variable. It has to be solved period by period from the first period to the last period
  • SOLVE_BACKWARD_COMPLETE: the block is composed of several equations and it does not contain any lag endogenous variable. It has to be solved period by period from the last period to the first period
  • SOLVE_TWO_BOUNDARIES_COMPLETE or SOLVE_TWO_BOUNDARIES_SIMPLE: the block is composed of equations and it contains lead and lag endogenous variables. The block is simulated, using its stacked-time representation.

DynareWiki: ByteCode (last edited 2009-09-03 11:23:17 by SébastienVillemot)