How to list all entities in a simulation in Simevents?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Teresa Hubscher-Younger
le 2 Juin 2014
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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Discrete-Event Simulation dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!