This release adds a functionality to warn users in case of cycle among model components.
A cycle is when variables call each other in a circular way, for example:
a = ModelVariable()
b = ModelVariable()
assign(a)
def _a(t):
return b(t)
assign(b)
def _b(t):
return a(t)
A warning will be displayed:
cashflower.cashflow.CashflowModelError: Cycle of model components detected. Please review:
b --> a --> b
In the future releases, we plan to add a functionality of calculating the models with cycles which have time difference:
assign(a)
def _a(t):
return b(t-1)
assign(b)
def _b(t):
if t == 0:
return 1
return a(t)
because such cases are **not** ambiguous.
The second functionality added is limiting calculations when the user has chosen columns.
The model will calculate only necessary model components instead of all.