Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 04 June 2014 - 11:48 PM
Posted 04 June 2014 - 11:56 PM
Edited by L. Spiro, 06 June 2014 - 02:44 AM.
Posted 05 June 2014 - 12:03 AM
Posted 05 June 2014 - 01:50 AM
Posted 05 June 2014 - 02:19 AM
void App::FrameUpdate() { int number = GetRandomNumber(); if (number > 9000) { arrive = true; } }Is or isn't this a good idea? Thanks Jack
Posted 05 June 2014 - 04:17 AM
Hello BitMaster,
Thanks for helping.
I am not sure how to tell how frequently the function runs. I am using the Ogre3D rendering engine.
Is there a way to measure this frequency? The numbers that return will be in the range of 1-10000
so there will be 90% of the chance that the lorry will not appear?
Thanks
Jack
Posted 05 June 2014 - 04:27 AM
Posted 05 June 2014 - 05:52 AM
If I want to make this more deterministic (but still more or less random) as I need to load some data from Excel
that determines how the program would behave...
pretty stumped now. What are your suggestions to me?
Thanks
Jack
Edited by lucky6969b, 05 June 2014 - 05:54 AM.
Posted 05 June 2014 - 06:21 AM
Date Time Apple Orange Pear 10/10/2009 7:00 1 8:00 1 1
The Date and time are the "Cartons or pallets" arrival dates and times, they arrive in the trailer of the truck
I need to convert this data into the probability of truck arrival time....
Thanks
Jack
Edited by lucky6969b, 05 June 2014 - 06:28 AM.
Posted 05 June 2014 - 07:20 AM
You may think of it as if there is some deviation based on this data.
Thanks
Jack
Posted 05 June 2014 - 10:52 PM
Yes, and it would be perfectly nice to post some example code for me.
Thanks
Jack
Edited by lucky6969b, 05 June 2014 - 10:58 PM.
Posted 06 June 2014 - 03:24 AM
Edited by Satharis, 06 June 2014 - 03:26 AM.
Posted 06 June 2014 - 04:38 AM
If you want to model number of arrivals in a discrete time period (e.g. number of arrivals per hour, with some mean number of arrivals per time unit), you want to use the Poisson distribution:
http://en.wikipedia.org/wiki/Poisson_distribution
If you just want to model time between arrivals (with a certain mean time of arrival) you want the exponential distribution:
http://en.wikipedia.org/wiki/Exponential_distribution
Posted 06 June 2014 - 04:45 AM
Okay, I'll think thru it, and see I can come up with a solution.
Sorry, I was too impulsive to ask for an instant answer....
Thanks everybody
Jack
Edited by lucky6969b, 06 June 2014 - 04:52 AM.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.