pydae.core.builder.parser

Functions

check_system(sys)

Validates the user-provided system dictionary.

process_system_dict(sys)

Parses the raw user dictionary.

pydae.core.builder.parser.check_system(sys)[source]

Validates the user-provided system dictionary. Adds dummy equations if dynamic or algebraic equations are missing, checks for duplicates, and determines if a separate initialization run (‘inirun’) is required.

Parameters:

sys (dict) – The raw system dictionary provided by the user.

Returns:

  • sys (dict) – The validated and potentially patched system dictionary.

  • inirun (bool) – Flag indicating if the initialization and run stages are different.

pydae.core.builder.parser.process_system_dict(sys)[source]

Parses the raw user dictionary. It handles cases where the variables in the lists are either strings OR already defined SymPy symbolic objects. It extracts the EXACT SymPy symbols from the expressions to ensure derivatives compute correctly.