Data

csdl_alpha.src.data.inline_export(filename, summary_csv=False, do_print=False, groupname='inline')[source]

Save variables from the current recorder’s node graph to an HDF5 file.

Parameters
filenamestr

The name of the HDF5 file to save the variables to.

summary_csvbool, optional

If True, a CSV file will be saved instead of an HDF5 file, by default False.

do_printbool, optional

If True, the CSV file will be printed to the console, by default False.

csdl_alpha.src.data.inline_import(filename, group, load_variables=False)[source]

Import variables from an HDF5 file.

Parameters
filenamestr

The path to the HDF5 file.

groupstr

The name of the group within the HDF5 file (eg, ‘inline’, ‘iteration1’).

load_variablesbool, optional

If True, the values will be loaded into existing variables in the current recorder, by default False.

Returns
dict

A dictionary containing the imported variables, where the keys are the variable names and the values are instances of the Variable class.

Raises
FileNotFoundError

If the specified file does not exist.

KeyError

If the specified group does not exist within the file.

csdl_alpha.src.data.save_all_variables(ignore_unnamed=False)[source]

Sets all variables in the current recorder’s node graph to be saved.

Parameters
ignore_unnamedbool, optional

If True, only variables with names will be saved, by default False.

csdl_alpha.src.data.save_optimization_variables()[source]

Sets optimization variables to be saved.

This function sets the optimization variables to be saved, including objectives, constraints, and design variables.