cosim::inject_system_structure() only allows setting custom initial values for parameter and input variables. For other variables, it throws an "invalid system structure" exception. This is too strict and not in accordance with the FMI spec. For example, FMI 2 allows any variable with variability != constant to be set with fmi2SetXxx() prior to entering initialisation mode. (The full set of rules is given in section 2.2.7 of the FMI2 spec.)
cosim::inject_system_structure()
only allows setting custom initial values forparameter
andinput
variables. For other variables, it throws an "invalid system structure" exception. This is too strict and not in accordance with the FMI spec. For example, FMI 2 allows any variable withvariability != constant
to be set withfmi2SetXxx()
prior to entering initialisation mode. (The full set of rules is given in section 2.2.7 of the FMI2 spec.)