Different arrivaltimes

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
sander
Posts: 8
Joined: Tuesday 22 January, 2013 - 12:29

Different arrivaltimes

Post by sander »

Hello,

I have another problem. Is it possible to generate different arrivaltimes at an hour of a day? For example from 12:00 until 13:00 an inter-arrival time of Negexp(10000) and
13:00-14:00 NegExp(9000) and
14:00-15:00 NegExp(8000) and so on. It is every day the same pattern so it have to repeat itself every 24 hour.
I think it is possible with arrivalList but do you know how?

Regards,

sander
BartC
Posts: 47
Joined: Monday 05 November, 2012 - 17:05

Re: Different arrivaltimes

Post by BartC »

Hello Sander,

The fastest way to do this is by using the following code on the Inter-arrival time of a simple source:

Code: Select all

Case(
  Trunc(Mod(Time, 24 * 3600) / 3600) + 1,
  NegExp(1000),    {Interarrivaltime from 00:00-01:00}
  NegExp(2000),    {Interarrivaltime from 01:00-02:00}
  NegExp(3000),    {Interarrivaltime from 02:00-03:00}
  NegExp(4000),    {Interarrivaltime from 03:00-04:00}
  NegExp(5000),    {Interarrivaltime from 04:00-05:00}
  NegExp(6000),    {Interarrivaltime from 05:00-06:00}
  NegExp(7000),    {Interarrivaltime from 06:00-07:00}
  NegExp(8000),    {Interarrivaltime from 07:00-08:00}
  NegExp(9000),    {etc}
  NegExp(10000),
  NegExp(11000),
  NegExp(12000),
  NegExp(13000),
  NegExp(14000),
  NegExp(15000),
  NegExp(16000),
  NegExp(17000),
  NegExp(18000),
  NegExp(19000),
  NegExp(20000),
  NegExp(21000),
  NegExp(22000),
  NegExp(23000),
  NegExp(24000)
)
The only thing is to keep in mind that when you use inter-arrival times in the order of 10000 (=~ 3 hours), it is a bit pointless to use every hour of the day as an interval.

Regards,

Bart
sander
Posts: 8
Joined: Tuesday 22 January, 2013 - 12:29

Re: Different arrivaltimes

Post by sander »

Thanks.

But if I put the input below in the source arrival-time and I run the program 1000 days I should have an input close to 60*60*1000*12/8000+60*60*1000*12/1207800=5436. But if I run the program the imput is only around 200 every time. Why is this happening?


Case(
Trunc(Mod(Time, 24 * 3600) / 3600) + 1,
NegExp(1207800), {Interarrivaltime from 00:00-01:00}
NegExp(1207800), {Interarrivaltime from 01:00-02:00}
NegExp(1207800), {Interarrivaltime from 02:00-03:00}
NegExp(1207800), {Interarrivaltime from 03:00-04:00}
NegExp(1207800), {Interarrivaltime from 04:00-05:00}
NegExp(1207800), {Interarrivaltime from 05:00-06:00}
NegExp(1207800), {Interarrivaltime from 06:00-07:00}
NegExp(1207800), {Interarrivaltime from 07:00-08:00}
NegExp(8000), {etc}
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(8000),
NegExp(1207800),
NegExp(1207800),
NegExp(1207800),
NegExp(1207800)
)
BartC
Posts: 47
Joined: Monday 05 November, 2012 - 17:05

Re: Different arrivaltimes

Post by BartC »

Hello Sander,

There is something wrong with your calculations:

You have in total 60*60*1.000*24 = 86.400.000 seconds available. Your average inter-arrivaltime is (1.207.800 + 8.000)/2 = 607.900. So the number of products leaving the source should be in the order of 86.400.000/607.900 = 142.

This is exactly what I meant in my previous post, that it is meaningless to have an hourly distribution when your inter-arrivaltimes are that big (in this case even almost 14 days). So if between 03.00 and 04.00 on the first day the first product arrives, the model waits approximately 14 days before he lets a new product enter. At that moment there is about a 50 % chance that the model will again wait 14 days, etc, etc.

Regards,

Bart
sander
Posts: 8
Joined: Tuesday 22 January, 2013 - 12:29

Re: Different arrivaltimes

Post by sander »

I don't understand it. From 8:00 until 20:00 there is a negexp(8000) and from 20:00 until 8:00 there is a negexp(1207800).
This means that half of the time available: 60*60*12*1000=43200000 seconds there is a expected cycle time of 8000. So from 8:00 until 20:00 the average is 5400. From 20:00 until 8:00 there is a very small chance that that day there will arrive a product but on average of 1000 days there will arrive 35,77 products(60*60*1000*12/1207800), so on average 0,03577 a day.

I want this in my model, is that possible?
BartC
Posts: 47
Joined: Monday 05 November, 2012 - 17:05

Re: Different arrivaltimes

Post by BartC »

Hello Sander,

I was already thinking a bit better about what your intentions might be and came to the conclusion that to use an arrival list could be a good idea. In the attached model you see an arrival list with arrival possibilities every half an hour. For each arrival possibility I stated the chance on an arrival based on your inter-arrival times. When I run this model the number of products exiting the arrival list satisfy your expectations.

For your understanding, with the above mentioned 4DScript, the inter-arrival times are dependent on each other, whilst in the attached model they are independent. This is a big difference which you should keep in the back of your mind.

Regards,

Bart
Attachments
Different_Arrivaltimes_Example.mod
(16.2 KiB) Downloaded 333 times
sander
Posts: 8
Joined: Tuesday 22 January, 2013 - 12:29

Re: Different arrivaltimes

Post by sander »

Hello Bart,

I understand that the inter-arrival times where dependent on each other in the above mentioned 4DScript. But is it possible that they are independent on each ohter?
Because with the attached model with the arrival list the inter-arrival times are'nt negexp any more and now it also not possible that 2 products enters between one hour.

regards,

Sander
BartC
Posts: 47
Joined: Monday 05 November, 2012 - 17:05

Re: Different arrivaltimes

Post by BartC »

Hello Sander,

You are right about the fact that the arrival times aren't NegExp anymore and that within one hour it is not possible that two products arrive. In the attached model you can find the solutions to your problem I think. In there are two sources present, one for the night arrivals (with an inter-arrival time of NegExp(1207800)) and one for the day arrivals (inter-arrival time of NegExp(8000)). For these sources a send to strategy is set, being for the night arrivals:
  • - Send to the OK sink when the arrival time is between 8 pm and 8 am
    - Send to the NOT OK sink when the arrival time is between 8 am and 8 pm
For the day arrivals it is exactly the opposite.

Hope this will help you.

Regards,

Bart
Attachments
Different_Arrivaltimes_Example_v2.mod
(21.26 KiB) Downloaded 318 times
sander
Posts: 8
Joined: Tuesday 22 January, 2013 - 12:29

Re: Different arrivaltimes

Post by sander »

Thanks a lot!
This is where I was looking for!

Regards,

Sander
Post Reply