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!