CompiledModel
CompiledModel contains the model components mapped to numeric/vectorized/lambdified counterparts.
VariableLayout records the variable grouping inferred during compilation.
Layout Fields:
| Name | Type | Description |
|---|---|---|
| declared_names | tuple[str, ...] |
Variables in config declaration order. |
| canonical_names | tuple[str, ...] |
Variables in compiled solver order. |
| exo_state_names | tuple[str, ...] |
Shock-map targets placed in the shocked/exogenous state block. |
| endo_state_names | tuple[str, ...] |
Unshocked variables inferred as states from model dynamics. |
| control_names | tuple[str, ...] |
Variables not inferred as states. |
| n_exog | int |
Number of shocked/exogenous state variables. |
| n_state | int |
Total number of state variables. |
| idx | dict[str, int] |
Variable-name to canonical index mapping. |
Fields:
| Name | Type | Description |
|---|---|---|
| config | ModelConfig |
Model config that was compiled. |
| kalman | KalmanConfig \| None |
Parsed Kalman config attached at compile time. |
| cur_syms | list[sympy.Symbol] |
Symbolized current-period state vector (cur_* symbols). |
| layout | VariableLayout |
Config-declared and compiler-inferred variable layout metadata. |
| var_names | list[str] |
Variables in compiled canonical order. |
| idx | dict[str, int] |
Variable-name to index mapping used by solver/simulation. |
| objective_eqs | list[sp.Expr] |
Solver targets in symbolic representation. (not used in the solver) |
| objective_funcs | list[Callable] |
Solver objectives as standalone Callables. |
| equations | Callable |
objective_funcs compiled into a single Callable target. (solver input) |
| calib_params | list[sympy.Symbol] |
Parameter symbols in canonical calibration order used by compiled functions. |
| observable_names | list[str] |
Observable variables as strings. |
| observable_eqs | list[sp.Expr] |
Measurement equations in symbolic representation. |
| observable_funcs | list[Callable] |
Measurement equations as Callables. |
| observable_jacobian | Callable[..., np.ndarray] |
Compiled Jacobian function of measurement equations. |
| n_state | int |
Number of state variables in the compiled layout. |
| n_exog | int |
Number of shocked/exogenous state variables in the compiled layout. |
Methods:
| Signature | Return Type | Description |
|---|---|---|
.to_dict() |
dict |
CompiledModel in dictionary form. |