G-Cubed
Python G-Cubed 5.0.2.0 · build 1
Generation details
Source revision
4c4a95aded1b5ca5e8f9c292ad8250440cd9c18b (modified inputs)
Source fingerprint
e2c719b38e03c6b1748f10e26bc1caf1ead5674dd1beee6628a6ccf7b90fd39b
Generated (UTC)
2026-11-11T03:06:22.844261+00:00
Generator
pdoc 16.0.0, CPython 3.14.8
Generation metadata

gcubed.base_equations

This module contains the BaseEquations class.

class BaseEquations(gcubed.base.Base):

Overview

All Python classes created by the SYM processor are subclasses of this class.

Provides functionality associated with all of the classes created by the SYM processor to implement the model equations.

BaseEquations( x1l: numpy.ndarray, j1l: numpy.ndarray, zel: numpy.ndarray, z1l: numpy.ndarray, x1r: numpy.ndarray, j1r: numpy.ndarray, z1r: numpy.ndarray, zer: numpy.ndarray, yjr: numpy.ndarray, yxr: numpy.ndarray, exo: numpy.ndarray, exz: numpy.ndarray, par: numpy.ndarray)

Overview

Initialise with each of the left-hand and right-hand side vectors of variables used to express the model equations.

Arguments

x1l: The left-hand side vector of state variables used to express the model equations.

j1l: The left-hand side vector of costate variables used to express the model equations.

zel: The left-hand side vector of expected endogenous variables used to express the model equations.

z1l: The left-hand side vector of endogenous variables used to express the model equations.

x1r: The right-hand side vector of state variables used to express the model equations.

j1r: The right-hand side vector of costate variables used to express the model equations.

z1r: The right-hand side vector of endogenous variables used to express the model equations.

zer: The right-hand side vector of expected endogenous variables used to express the model equations.

yjr: The right-hand side vector of 1-period lagged costate variables used to express the model equations.

yxr: The right-hand side vector of 1-period lagged state variables used to express the model equations.

exo: The right-hand side vector of exogenous variables used to express the model equations.

exz: The right-hand side vector of 1-period lagged expected endogenous variables used to express the model equations.

par: The vector of parameters used to express the model equations.

The parameters and the right-hand side vectors of variables are all used to populate the equations that are evaluated to determine values of variables that are then stored in the left-hand side variable vectors.

These left-hand side variable vectors are then referenced by calling classes to determine the results of equation evaluations.

def configure_structural_zero_reads(self, sym_data: gcubed.sym_data.SymData) -> None:

Give generated RHS equations exact zeros without changing solver arrays.

def equation(identifier: tuple[str, int]):

Overview

This is function you should use to access the functions implementing the model equations.

Returns

The equation function identified by the identifier. This equation function will have a name in the format 'vectorName_index'.

e.g. z1l_12 for equation of the 13th variable in the z1l vector, noting that the vector indexing starts at 0.

Notes

The equation function will have been declared in the subclass generated by the SYM processor from the SYM model definition.

This placeholder function does nothing in the superclass.

x1l: numpy.ndarray

The left-hand side vector of state variables used to express the model equations.

Use this property to get values of the state variables that have been computed using the model equations.

j1l: numpy.ndarray

The left-hand side vector of costate variables.

Use this property to get values of the costate variables that have been computed using the model equations.

zel: numpy.ndarray

The left-hand side vector of expected endogenous variables.

Use this property to get values of the expected endogenous variables that have been computed using the model equations.

z1l: numpy.ndarray

The left-hand side vector of endogenous variables.

Use this property to get values of the endogenous variables that have been computed using the model equations.

x1r: numpy.ndarray

The right-hand side vector of state variables used to express the model equations.

j1r: numpy.ndarray

The right-hand side vector of costate variables used to express the model equations.

z1r: numpy.ndarray

The right-hand side vector of endogenous variables used to express the model equations.

zer: numpy.ndarray

The right-hand side vector of expected endogenous variables used to express the model equations.

yjr: numpy.ndarray

The right-hand side vector of 1-period lagged costate variables used to express the model equations.

yxr: numpy.ndarray

The right-hand side vector of 1-period lagged state variables used to express the model equations.

exo: numpy.ndarray

The right-hand side vector of exogenous variables used to express the model equations.

exz: numpy.ndarray

The right-hand side vector of 1-period lagged expected endogenous variables used to express the model equations.

par: numpy.ndarray

The vector of parameters used to express the model equations.

def validate(self) -> None: