cashflower package#
Subpackages#
Submodules#
cashflower.core module#
cashflower.error module#
- exception cashflower.error.CashflowModelError#
Bases:
Exception
cashflower.graph module#
- cashflower.graph.get_calc_direction(variables)#
Set calculation direction to irrelevant [0] / forward [1] / backward [-1]
- cashflower.graph.get_calls(variable, variables)#
List variables called by the given variable
- cashflower.graph.get_predecessors(node, DG)#
Get predecessors and their predecessors and their…
- cashflower.graph.raise_error_if_incorrect_argument(node)#
cashflower.reader module#
cashflower.start module#
- cashflower.start.create_graph(variables)#
- cashflower.start.create_model(model)#
Create a folder structure for a model. Copies the whole content of the model_tpl folder and changes templates to scripts.
- cashflower.start.get_model_point_sets(input_members, settings)#
Get model point set objects from input.py script.
- cashflower.start.get_runplan(input_members)#
Get runplan object from input.py script.
- cashflower.start.get_variables(model_members, settings)#
Get model variables from model.py script.
- cashflower.start.load_settings(settings=None)#
Add missing settings.
- cashflower.start.merge_part_diagnostic(part_diagnostic)#
- cashflower.start.merge_part_model_outputs(part_model_outputs, settings)#
Merge outputs from multiprocessing and save to files.
- cashflower.start.prepare_model_input(settings, argv)#
Get input for the cash flow model.
- cashflower.start.start(model_name, settings, argv)#
- cashflower.start.start_multiprocessing(part, cpu_count, model_name, settings, argv)#
Run subset of the model points using multiprocessing.
- cashflower.start.start_single_core(model_name, settings, argv)#
Create and run a cash flow model.
cashflower.utils module#
- cashflower.utils.get_object_by_name(objects, name)#
- cashflower.utils.print_log(msg, show=True)#
Print a log message with the timestamp.
- cashflower.utils.replace_in_file(_file, _from, _to)#
Replace a word (_from) with another word (_to) in a file (_file).
- cashflower.utils.split_to_ranges(n, num_ranges)#
n = 20, num_ranges = 3 –> (0, 6), (6, 12), (12, 20)
- cashflower.utils.updt(total, progress)#
Display or update a console progress bar. Original source: https://stackoverflow.com/a/15860757/1391441