Cashflower

Latest version: v0.8.5

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 7

0.3.4

There are two main changes in this release:

- using numpy matrices to store the results
- dealing with cycles within the model components

0.3.3

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.

0.3.1

The main change in this release is the introduction of the `SAVE_OUTPUT` setting.

This setting can be used to not save the csv files with the result. The cashflower framework save by default the results into the `output` folder into a csv files with defined filenames (`<timestamp>_<model_point_set_name>.csv`). The user might want to have custom filenames or save the files elsewhere. The user now has more flexibility in terms of saving the files.

Changes:

- introduced `SAVE_OUTPUT` setting,
- added `mp_dep` attribute to `Constant` (analogous behaviour to `ModelVariable`),
- updates to docs and unit tests.

0.3.0

Here's a cheatsheet of what you need to update in your cash flow model to be able to use version >= 0.3.0 of the cashflower:

- `ModelPoint()` --> `ModelPointSet()`
(input.py)

- `policy` --> `main`
(input.py and model.py)

- `ModelVariable(modelpoint=...)` --> `ModelVariable(model_point_set=...)`
(model.py)

- `<my_model_point_set>.size` --> `<my_model_point_set>.model_point_size`
(model.py)

- `ModelVariable(pol_dep=...)` --> `ModelVariable(mp_dep=...)`
(model.py)

- `POLICY_ID_COLUMN` --> `ID_COLUMN`
(settings.py)

- `policy_id` --> `id`
(settings.py)

Page 7 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.