Jump to content

waiting time for each entity


Nadine

Recommended Posts

  • 1 month later...

Thanks, I've found this already. But I need (similar to the TimeInSystem Statistic) the (average, minimum, maximum) waiting time for each entity type in the model. Is there any possibility to get this number?

Link to comment
Share on other sites

It's not clear to me if you are looking for waiting time at a particular location, or overall waiting time, but either way, Simio does not calculate that automatically by entity type, so you need to add custom TallyStatistics by entity type to record these. The general procedure is:


1) Create an appropriately named TallyStatistic for each type (e.g. PartAWaitingTime, PartBWaitingTime, ...)

2) Add a state to the ModelEntity definition to hold the queue entry time (e.g. TimeEnteredQueue)

3) When it leaves the queue (when it starts processing) record its waiting time using an expression like (TimeNow-TimeEnteredQueue) to the appropriate tally.


There are several ways to get "the appropriate tally".

Brute Force: Use a cascading series of Decides each with a condition like "Is.PartA" followed by a Tally Step to PartAWaitingTime of "TimeNow-TimeEnteredQueue".

Elegant: If you already have a part information table (like in SimBit EntityFollowsSequenceWithTable) then add a column of type Element Reference > Tally Statistic called WaitingTimeStatistic and then have a single Tally Step to JobTable.WaitingTimeStatistic of "TimeNow-TimeEnteredQueue".


If you wanted total waiting time instead, then you would need an extra state on the entity to incrementally collect each waiting time, then use the above procedure to tally it once when each entity reaches the Sink.

  • Thanks 1
Link to comment
Share on other sites

Additionally, you can also use built in TimeInSystem function of modelentity anytime and anywhere in the model you want.

this gives you extra flexibility for average time calculations.

ModelEntity.TimeInSystem

sample.thumb.png.da236c7a24eddd9b3dbeb4fdfeb70575.png

Link to comment
Share on other sites

Thanks, I've found this already. But I need (similar to the TimeInSystem Statistic) the (average, minimum, maximum) waiting time for each entity type in the model. Is there any possibility to get this number?

 

Nadine,


Note that if you have an entity type in the system named 'EntityType1', then you may use the following set of functions:


EntitytType1.Population.TimeInSystem.Average

EntitytType1.Population.TimeInSystem.Minimum

EntitytType1.Population.TimeInSystem.Maximum


To get the average/minimum/maximum time in system statistics for all entities of that type that were destroyed (or disposed) in the system. Regardless of where or how the entities were disposed of.


Note that any entity as well can access statistics for the entire entity type population that it is a member of using 'Entity.Population.XXXXXXX' syntax.


Thus, refer to the 'Population' function namespace on an entity type or individual entity and perhaps what you are looking for is located there.

Link to comment
Share on other sites

Nadine,

I took your initial request literally in that you are looking for Waiting Time (e.g. time spent in one or more queues) by entity type. If this is in fact what you are looking for, then follow my suggested solution.


If what you are really looking for is TOTAL TIME in system by entity type, then what Mustafa and Glenn have suggested is a simpler approach.

Link to comment
Share on other sites

  • 2 weeks later...
Here is a model illustrating the above approach:[attachment=0]RecordTotalWaitingTimeByEntity.spfx[/attachment]

 

Hi:


Thank you for this model. Is this model part of the SimBit database, or was this created by you to respond to the OP's question?

Link to comment
Share on other sites

Custom solution for now. Maybe eventually it will become a SimBit.

 

Oh, good to know. I'm actually working on a research project which is around the waiting time statistic and I might be creating a SimBit as part of my proposal. Is it ok if I reference your model in my research project? It will be very beneficial to my findings.

Link to comment
Share on other sites

×
×
  • Create New...