Skip to content

Model generation

Generate a flat CellML (or Python / C++ / CasADi) model from the vessel and parameter CSV arrays referenced by the configuration dict.

scripts.script_generate_with_new_architecture.generate_with_new_architecture

generate_with_new_architecture(
    do_generation_with_fit_parameters=False,
    inp_data_dict=None,
)

Generate a model from the vessel and parameter CSV arrays.

Reads the vessel/module and parameter CSV arrays referenced by the config and emits a flat model in the configured model_type (CellML, Python, C++ or CasADi) into the generated-models directory.

Parameters:

Name Type Description Default
do_generation_with_fit_parameters

If True, regenerate using previously fitted parameters instead of the defaults in the parameters CSV.

False
inp_data_dict

Configuration dict (see get_default_inp_data_dict). If None, the values are loaded from user_inputs.yaml.

None

Returns:

Name Type Description
bool

True if generation succeeded, False otherwise.

Converting 0D vessels to 1D

scripts.convert_0d_to_1d.convert_0d_to_1d

convert_0d_to_1d(
    model,
    folder_0d,
    param_file_0d,
    folder_hyb=None,
    vess_1d_list=[],
)