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.
Tracking waiting times per producttype
Re: Tracking waiting times per producttype
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:
OnExit of the queue:
I hope this will help you out!
Kind regards,
Menno
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
Code: Select all
label([waitingtime],i) := time - label([waitingtime],i)
Kind regards,
Menno
Re: Tracking waiting times per producttype
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!
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!
Re: Tracking waiting times per producttype
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):
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
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)
)
Kind regards,
Menno