Currently cosim::last_value_observer caches all port values (variables) of the simulators in every simulation step. However, in many scenarios, this may be not necessary. For example, if a simulator uses the observer to display data for only a single FMU at any given time. To improve simulation performance, it would be better to give a master algorithm an ability to capture only a subset of a model's port values in each step.
In this regard, I suggest to add additional methods in cosim::last_value_provider (A parent of cosim::last_value_observer) and cosim::slave_value_provider to enable this 'optional' feature.
Currently
cosim::last_value_observer
caches all port values (variables) of the simulators in every simulation step. However, in many scenarios, this may be not necessary. For example, if a simulator uses the observer to display data for only a single FMU at any given time. To improve simulation performance, it would be better to give a master algorithm an ability to capture only a subset of a model's port values in each step.In this regard, I suggest to add additional methods in
cosim::last_value_provider
(A parent ofcosim::last_value_observer
) andcosim::slave_value_provider
to enable this 'optional' feature.For example: