SimEvents - inheritance & relative references & resource control
조회 수: 1(최근 30일)
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!
Abdolkarim Mohammadi 2021년 6월 25일
편집: Abdolkarim Mohammadi 2021년 6월 25일
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.