How to list all entities in a simulation in Simevents?

1 Ansicht (letzte 30 Tage)
Paul
Paul am 1 Jun. 2014
Kommentiert: Paul am 3 Jun. 2014
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

Akzeptierte Antwort

Teresa Hubscher-Younger
Teresa Hubscher-Younger am 2 Jun. 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

Weitere Antworten (0)

Kategorien

Mehr zu Discrete-Event Simulation finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by