open-simulation-platform / libcosimpy

Python wrapper for libcosim
Mozilla Public License 2.0
9 stars 3 forks source link

String variable references for observers and manipulators #6

Open msteinsto opened 1 year ago

msteinsto commented 1 year ago

Variables does currently have to be referred to by their id to be monitored with a observer or edited by a manipulator. Finding the id requires the user to unzip the FMU. Indexes can also change if additonal inputs and outputs are added and the FMU recreated.

Enhancement suggestion is to fetch all input, output and parameter names and create a mapping between name and index when the model is first created and use variable name instead of index for referencing.

This would also allow data type specific functions such as slave_integer_values to be replaced with general functions such as slave_values.