Hello Dragos,
on the last Modelica Conference we published a Library for simulation of distributed systems. Inside the controller models we've had a similar problem. The tasks running inside a controller model were supposed to exchange arbitrary information without explicitely defining connectors for each value to be exchanged. Our solution was to introduce a Modelica external shared memory component which can store strings that are addressed by a unique id.
Click to view attachmentThe library can be downloaded from our homepage (NCLib) (
http://www.eit.uni-kl.de/frey) in the software section.
You'll find the shared memory model (RAM) in the Controller.Memory subpackage of Controller.mo. An example on how to use the RAM component can be found in the subpackage Controller.Examples (Model PureSynchronisationEffects).
For your purpose you just need to write converter functions to transform the strings stored and read in the memory to the data format you want to use. Converter Functions for Real and Boolean values are already defined in Controller.Memory.Functions.
Instead of using variable names you then need to use the memory address to read and write values to your variables in the simulation and controller model.
Regards
Florian