Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Queue primitives #4467

Open
davidelahoz opened this issue Sep 23, 2024 · 0 comments
Open

[Enhancement] Queue primitives #4467

davidelahoz opened this issue Sep 23, 2024 · 0 comments

Comments

@davidelahoz
Copy link

Modelica is one of the major standardised languages for implementing digital twins, allowing exchanging models between different simulators using FMI. For that reason, it would be great to be able to simulate communication networks that interconnect different subsystems using it, as that would simplify using modelica for verifying them using HIL (a modelica environtment could be used for connecting a real subsystem with virtual implementations of the others through their interfaces, without requiring to convert the signals to CAN messages in the driver). However, simulating that type of system requires supporting discrete event models.

Currently, Modelica support for that type of models is limited to (synchronous) state machines, being difficult to implement event queues using this language. In order to overcome that limitation, DESLib provides queue primitives using C code and annotations, but that approach isn't compatible with every modelica implementation, as the specification allows tools to ignore annotations.

Therefore, including primitives for supporting these kind of simulations in modelica standard libraries would simplify using this language in a wider range of applications, like simulation of manufacturing processes and communication networks at system level, without requiring to implement models for the actual circuits in charge of exchanging messages. Due to its similarity, SimEvents could be used as a reference, requiring to provide 4 new primitives:

  • An entity generator (messages could be implemented as records)
  • A queue primitive supporting different input output configurations (e.g. FIFO, LIFO...)
  • An entity switch, for routing packages
  • An entity terminator

On the other hand, entity servers could be implemented using the already existing stategraph blocks

In order to implement this, some additions to modelica specification might be needed, as it requires being able to instantiate at least records (although supporting models as well could also allow using modelica for agent based modeling). However, I think that from a proposal point of view, it make more sense to open a request in the standard library repository, so any proposed modification to the language specification is coordinated with the high level blocks finally provided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant