# Use Systemmodeler for process-based discrete event simulations?

Posted 6 years ago
14257 Views
|
9 Replies
|
9 Total Likes
|
 Hi, Does anyone use System Modeler for process-based discrete event simulations? e.g. supply chain logistics simulations? Does anyone use ARENALib / SIMANLib / DES / DEVS? I am evaluating if I could use System Modeler for this. Cheers, Stefan
9 Replies
Sort By:
Posted 6 years ago
 Neil,meanwhile my experience is the same. But the argumentation (to pass on packages except official ones) is somewhat uncomfortable. One of the great strengths of systems like R is that there is a living community producing libraries with high quality. And again: Wolfram should anticipate that buyers of WSM want to model queues. This use case is really obvious in the context of modeling software and not beside the point. @Markus: you kindly offered help for questions about SystemDynamics.I will formulate my questions carefully and post them into this discussion.Best regards Volker
Posted 2 months ago
 While this thread is old, it appears to be still relevant.First of all, one may note that DESlib has not been abandoned as there is DESlib2, which has been developed and tested using Dymola 2021 according to the developers (V. Sanz and A. Urquia):http://www.euclides.dia.uned.esIn a very recent paper, Sanz and Urquia describe their implementation of message passing communication (MPC), which is based on earlier developments of Parallel DEVS (PDEVS) by the authors:Sanz and Urquia (2022) Cyber-physical system modeling with Modelica using message passing communication(Links to earlier works can be found on Victorino Sanz Prat's website.)What does make the MCP/PDEVS approach interesting imo is the fact, that the authors also use it to implement agent-based modeling capabilities in Modelica next to the before mentioned process-based discrete-event simulation. This is interesting, as to my knowledge there are not too many tools out there that fully allow to mix say system dynamics, discrete-event, and agent-based modeling (AnyLogic, of course, comes to mind).
Posted 6 years ago
 I find it easier to just use the built-in event handling in Modelica. The problem with libraries is that it becomes difficult to understand how something was modeled. For a simple object such as a mass or resistor, it is straightforward. Most of the difficult debugging that I have encountered is when I have relied on someone's library/model and realized that what they did was not consistent with my understanding of the model. Modelica is such a rich language, I suggest that you program your own blocks or use StateGraph blocks if they fit your requirements. In our models, I wound up doing my own blocks (mixed with built-in blocks) because they were simpler and easier to debug and verify. An event is triggered and my block responds to the event. The built-in Packages are well vetted and are reliable. It is a mistake to add Packages that are publicly available but that you really do not understand -- In my experience you will likely lose more time than you save.Regards
Posted 6 years ago
 Hi Volker,I have tried Deslib's example models in OpenModelica as well, and get the same errors as I do in WSM. I'm not sure if there are some special Modelica language constructs here that only Dymola supports or what exactly is going on. Modeling queues and discrete-event systems is slightly uncommon to do in the Modelica language (as shown by the low number of libraries supporting this), meaning that there might be some special implementations in Deslib that all Modelica tools don't support (I think you would have to ask the author, Victorino Sanz, about a comment on the status of the library in other tools to get a good answer). Unfortuanetly, it seems like the library is no longer being developed, which limits the chances of it being tested and modified to be supported by OM or WSM, or other Modelica tool vendors.Regarding documentation of Modelica libraries , such as the System Dynamics library (the documentation you quoted), this documentation is provided by the library, which means that the documentation in WSM will show the documentation for the library. In the case of the System Dynamics library, I can agree that it is a bit sparse. We are happy to assist if you have any specific questions regarding the System Dynamics Library.Information specifically about WSM is found in the built-in documentation. However, other books are useful when using WSM, such as Fritzson's book "Introduction to Modeling and Simulation of Technical and Physical Systems", which is about modeling and the Modelica language in general. Other books on the Modelica language and modeling include Tiller's "Modelica by Example" and Fritzson's "Introduction to Modeling and Simulation of Technical and Physical Systems with Modelica" (Which in this case contains an appendix with OpenModelica specific information).To be able to model a system in a modelica tool in general, a library needs to be in place (or be created) that can do this. When it comes to discrete-event systems, Deslib (only supported by Dymola it seems) is the only library I can find, except for the already mentioned StateGraph library and the SystemDynamics library.Best regards, Markus
Posted 6 years ago
 Hej Markus,about Deslib: coming from Mathematica I bought WSM 4.2 with the main objective to analyze waiting queues (more complex than the examples for MMA QueueingNetworkProcess, with branches etc.; I needed that for simulating and optimizing waiting queues in airports). This should be a typical application for an environment like WSM. But: no queues, Deslib does not work, no hints, no chance to solve my problems with MMA/WSM (Sorry, this is just my my frustration).About WSM documentation: I expected a documentation like MMA provides. Definition, Details, Examples (Basic, Scope, Applications, Properties&Relations, Neat Examples). I love MMA.But when I clicked on WSM Documentation Center > Additional Libraries > SystemDynamics > Overview > Population I got the information: "The System Dynamics methodology is frequently being used for the description of complex interactions between different biological species. This application area, which forms part of the ecological sciences, is usually referred to as population dynamics. This is still one of the most popular application areas of the System Dynamics methodology with thousands of publications describing different aspects of the dynamics of ecosystems." Surprise, surprise.In the Class Browser under UsersGuide > Overview > Population (double click) the result is even shorter: "class Population 'Population Dynamics' extends Modelica.Icons.Information; end Population".This is found when I tried to use an official library of WSM. There is nothing wrong with these sentences but they are not helpful ! I expect a "How to", a "FAQ" etc. I am not guided by this users guide.There are many good textbooks about MMA but I could not find anything like this for WSM, although there are some books about OpenModelica, e.g. Fritzson et. al. Should I better use OMEdit? Why pay for WSM?I wanted to stay in the Wolfram Universe but at now I found that Arena or Anylogic do the job much better and OMEdit does for free.Maybe I am wrong. In this case it would make me very happy if you (or others reading this discussion) could help me with some guiding hints.Best regards Volker
Posted 6 years ago
 As Neil said, I would recommend the StateGraph library (included in MSL) for this purpose. Deslib has currently not been tested to work in WSM (as the library web page states, only tested with Dymola).Volker, regarding your comment on the WSM documentation, what documentation is it exactly that you are referring to? Are you referring to the documentation in Deslib?
Posted 6 years ago
 I have the same requirement.Deslib does not work and the WSM documentation is really poor. I am interested to come in contact with you to discuss this topic. My phone nr is +49 175 4109108. Volker
Posted 6 years ago
 The StateGraph components in SystemModeler will work for this. You can also make your own custom blocks with discrete event behavior customized to your application.
Posted 6 years ago
 I think Only Sim Events from Mathworks and MATLAB can help you with this . Is very powerfull