Tracking waiting times per producttype

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
Mv2013
Posts: 2
Joined: Monday 04 November, 2013 - 12:01

Tracking waiting times per producttype

Post by Mv2013 »

Dear forum members,

We want to track the waiting times for two specific products.
Our model consists of two products which arrive at the same speed in one queue.
These products will be processed by one machine and then will leave the system.
Quite a basic model you can say.

But we would like to know what the waiting time of each product type in the queue is.

In the source we made a label on "trigger on exit". This trigger is for product 1:

Do(
SetLabel([servicetime],NegExp(1.6),i),
SetLabel([producttype],1,i)
)

And for product 2 a same label is made.
menno
Posts: 45
Joined: Tuesday 29 March, 2011 - 16:01

Re: Tracking waiting times per producttype

Post by menno »

Hello Mv2013,

If you want to know the waiting time of each product (so the time a product stays it the queue), then just mark the time at the entrance of the queue and when a product leaves the queue, deduct this time of the current time:

OnEntry of the queue:

Code: Select all

label([waitingtime],i) := time
OnExit of the queue:

Code: Select all

label([waitingtime],i) := time - label([waitingtime],i)
I hope this will help you out!

Kind regards,
Menno
Mv2013
Posts: 2
Joined: Monday 04 November, 2013 - 12:01

Re: Tracking waiting times per producttype

Post by Mv2013 »

Thanks Menno for your reply.

But how do we get the actual results of these codes?
We tried a lot of different things but everytime the results table is 0 in each column.

Could someboyd please help us out, we have a near deadline.

Thanks a lot in advance!
menno
Posts: 45
Joined: Tuesday 29 March, 2011 - 16:01

Re: Tracking waiting times per producttype

Post by menno »

Hello,

How do you write these values to a table?

On the exit trigger you could write the following (let's say the reference to the table atom is refResults):

Code: Select all

Do(
  label([waitingtime],i) := time - label([waitingtime],i),
  cell(nrows(refResults), 1, refResults) :=  label([waitingtime],i),
  settable( nrows(refResults)+1, ncols(refResults), refResults)
)
In this way, the value of the label([waitingtime],i) is put in the first column of the table at row 'nrows' (which is the row size of the table). After this is the done, I increase the table size so a new value can be entered. Hopefully this will help.

Kind regards,
Menno
Post Reply