-
How can I have the entities of a I got a snippet of csv reader to provide an example:
In this example, entities can be retrieved via |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In principle, there is actually no designated method for accessing the simulator-internal entities in the scenario script. How they are stored exactly can vary from simulator to simulator. Plus, if the simulator is not written in Python and does not run in the same process as mosaik, there is no way to do this. The "right" solution would be to extend the simulator whose internal entities you would like to have with a corresponding |
Beta Was this translation helpful? Give feedback.
In principle, there is actually no designated method for accessing the simulator-internal entities in the scenario script. How they are stored exactly can vary from simulator to simulator. Plus, if the simulator is not written in Python and does not run in the same process as mosaik, there is no way to do this.
So the
world.sims[...].proxy.sim
method you proposed is about as hacky as it feels.The "right" solution would be to extend the simulator whose internal entities you would like to have with a corresponding
extra_method
that returns these entities or the information required from them. More information aboutextra_methods
and how to use them can be found here: simulator-docsUnfortu…