gEconpy.classes.time_aware_symbol.TimeAwareSymbol#
- class gEconpy.classes.time_aware_symbol.TimeAwareSymbol(name, time_index, **assumptions)#
Subclass of
sympy.Symbolwith a time index.A TimeAwareSymbol is identical to a
symPy.Symbolin all respects, except that it has a time index property that is used when determining equality and hashability. Two symbols with the same name, assumptions, and time index evaluate to equal.Examples
from gEconpy.classes.time_aware_symbol import TimeAwareSymbol x1 = TimeAwareSymbol("x", time_index=1) x2 = TimeAwareSymbol("x", time_index=2) print(x1 == x2) # False, time indexes are different print(x1 == x2.set_t(1)) # True, time indexes are the same print(x1.step_forward() == x2) # True, time indexes are the same
Methods
Set the time index to zero if in the steady state, otherwise do nothing.
Set the time index to a specific value.
Decrement the time index by one.
Increment the time index by one.
Set the time index to steady state.
Attributes
base_nametime_indexdefault_assumptionssafe_name