How to list all entities in a simulation in Simevents?

1 visualización (últimos 30 días)
Paul
Paul el 1 de Jun. de 2014
Comentada: Paul el 3 de Jun. de 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

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Discrete-Event Simulation en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by