SimEvents - inheritance & relative references & resource control
1 view (last 30 days)
Show older comments
Matthew Gilbert
on 24 Jun 2021
Commented: Abdolkarim Mohammadi
on 28 Jun 2021
Hi,
I am currently evaluating a few different pieces of software for capability/ease of use in building DES models, and as I already had access to SimulLink I thought I would give SimEvents a go! While I have been looking through some of the introductory tutorials, I still have a few important questions about how the software structures its models that I haven't been able to find so far:
- Does SimEvents have any semblance of inheritance for model building, i.e. I have 5 servers that should all share the same block of code to calculate process time. If I was to change the code, can I do it in a single place and have the changes trickle down or will I have to change the attributes on each processor block?
- If I am at an event in a queue and I want to route out to one of multiple processors, how can I reference the attributes and state of each processor that I could route to (e.g. a successor attribute from the queue that I can use)?
- When I have 4 workers with different combinations of 3 skills, how could this be easily set up such that a server block can request say 2 of skill A and 1 of skill B? Would I need to essentially create all of the skill combinations that are possible and feed the request into the right combination, while tracking which workers are engaged where?
Apologies if these are simple questions, but after a lot of searching I still can't find a clear answer to them!
Thanks!
0 Comments
Accepted Answer
Abdolkarim Mohammadi
on 25 Jun 2021
Edited: Abdolkarim Mohammadi
on 25 Jun 2021
1. MATLAB Discrete-Event System (MDES) block allows you to share code between multiple instances of an object, where each block can have different properties in the run time. For example, all of your servers share a single file of code, and at the same time, each of them can have different service time, defined in a dialogue box, similar to standard SimEvents blocks.
2. Prior to each router (or Entity switches in SimEvents) you can have a server, whose job is to set the route for the entity to be directed in the switch block as an attribute. You can also do this without separate block, and implement this in as the service completion event action (but not the exit action) of the normal servers to reduce the numer of blocks.
3. Each skill should be modeled as a separate resource pool. When an entity arrives in the Resource acquirer block, it waits until all of the resources needed are available.
As a concluding remark, SimEvents is ultimately flexible. If you master it, especially the MDES, you can simulate any discrete-event system. I encourage you to put time and effort to learn SimEvents.
2 Comments
Abdolkarim Mohammadi
on 28 Jun 2021
1. I don't for sure whether discrete-event system can be inherited or not.
2. The logic behind SimEvents' blocks is the Entity/Storage system. Storages located in different blocks cannot communicate directly with each other (maybe with the help of Data store or other blocks). All of the blocks of the standard library of SimEvents have only one storage. Therefore, they cannot communicate with each other. In MDES block, you can create many storages in your block, the main benefit of which is the ability of the storages to communicate with each other. Communication means passing data and more importantly, triggering event actions on each other.
3. As far as I know, you cannot do this in SimEvents' standard Resource pool. You need to virtually create the resource pool as a property of the MDES. Then you can control how to forward entities to other blocks.
More Answers (0)
See Also
Categories
Find more on Discrete-Event Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!