Search code examples
pythonfmijmodelica

FMU-module method get_states_list()


I found a limitation of the FMU-module method get_states_list(). This method seems to bring a list only of continuous time states and not of discrete time states. I do usually make models that contain both continuous and discrete time sub-models describing process and control system and I am very interested to be able to get a list of ALL states in the system.

One possibility could have been get_fmu_state() but I get the exception text “This FMU does not support get and set FMU-state”.

Another possibility would perhaps be bring out a larger list of all variables using and sort out those variables that contain in the declaration "fixed=true”, but this attribute I am not sure how to bring out, although other attributes can be brought out like min, max, nominal. The method get_model_variables() could perhaps be of help but I only get some address associated to the variable….

What to do?


Solution

  • The get_states_list method is a mapping back to the FMI specification which only includes the continuous time states. So this is by design.