How to list all entities in a simulation in Simevents?
1 次查看(过去 30 天)
显示 更早的评论
Background: I am modelling a production system comprising products (entities) that flow through 5-6 workstations. Products pass through the same workstation several times. The model should limit the number of entities to X where X = sum_of_storage/server_blocks, i.e. number of places an entity can reside, to prevent lock up. However I seem to have ~5 times this number of entities in the system based on entities_created - entities_destroyed_with_sink. I am now trying to find where these entities are.
My question: How can I create a list of the entities and their location by block at the end of a simulation nb I am usin SEdebug to walk through and wish to see status at the end of the simulation. I have reviewed and tried eninfo and related functions under sedb but these only seem to give single block information, not the entire system status
Thanks
P
0 个评论
采纳的回答
Teresa Hubscher-Younger
2014-6-2
Hi,
I got this tip about how to solve this problem from a very clever MathWorks developer.
Here's what he says: In the command-line of sedebug, command such as blklist, blkinfo and eninfo all can take a return value, e.g.
sedebug>> a=blklist returns a string array that carries block ids and block names.
You can then parse this array using MATLAB, and further dispatch sedebug command such as blkinfo:
sedebug>> b=blkinfo(a(4,1))
b= Time: 0 Block: ‘sedemo_md1/FIFO Queue’ BlockID: ‘blk3’ Capacity: Inf Entities: [1x3 struct]
Further parsing b.Entities can derive information of an entity, e.g.:
sedebug>> c=b.Entity(3)
c = ID: ‘en6’ Status: ‘Queued’ TimeInQueue: 0.1489
By chaining the above commands, you can create a MATLAB script. Then, you can use that script in the command-line of sedebug and get a list of entities and their locations.
HTH, Teresa
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete-Event Simulation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!