Event Simulation In Blender GE


I have a question for someone who knows Blender GE (At least better than me:). I am trying to make a simple program for event simulations. But nothing as complicated as shown in the link below.

For example: http://www.flexsim.com/products/flexsim/

Now to explain what do I mean. There are 4 basic things that I would like to make: A source, que, processor, and of course elements. Now to explain a little bit… Imagine yourself in your local market. You go in grocery shopping and when you have everything, it’s time to go to the chekout. You represent the element in this simulation and the checkout represents the processor but before you get to the checkout you have to wait in a que to be proccesed. In this way you can determine which is the better solution, one que and two checkouts or two checkouts each with it’s own que. This kind of research is done by scientist to see which method is faster and therefore logical to implement in real life. So to make this simulation be of any use to us we need controll over the lenght of time the proccesor needs for one element and the length of the que, preferably in an easy to use menu. Oh, and a random object generator to simulate things that go into the que.

I’ve searched all over the net to find some information about this sort of work in blender but no luck. I was trying to make it myself and it turned out I bit off more than I can chew. So I am posting this with a hope that someone would be able to help me make this little project a reality. And I can explain much more of this stuff if it’s needed.


So, basically, you want to make a (simple) event simulator that simulates stuff like for example a supermarket queue…? I think an event simulator is an interesting project, but how hard it is to make really depends on how complex you want to make it. :rolleyes: Could you explain a bit more about what kind of things you want to simulate?

I would like to keep it as simple as possible. It only has to have the most basic things which I mentioned in the post before. So to be more exact:
A source would generate objects at random intervals. Let us say they are simple cubes. A source would make a cube which would then travel along an axis in a straight line until it reaches a stationary object(que). It then moves into this que which in our case would be a simple box without the top. The que itself needs to have a storage limit so it can only hold for example 10 cubes. So if more cubes come from the source and the box is full they just disappear when they touch it. Once in the box, the cubes would one at a time go to the processor which is also a stationary object. Now this processor or checkout in the previous post wold hold a cube in place for a period of time that you want, let’s say about 10 seconds and then let it continue.

This simulation however does not have a que, only a source (the green arrow) and the processor(that brown thing) and some other stuff in the back, but it should at least put things in perspective.

So what do you think? Can it be done?

Yes :yes: shouldn’t be too hard. I’ll help you to make this blender event simulator ;). I just made a little start.
It has a track with a (random) source and an end. The source has a “mintime” and a “maxtime” property. The source chooses a random time delay between the “mintime” and the “maxtime”.

I think we need to move the thread to “Team Projects”, btw.

Hey, this is great! I looked over the stuff you did and it seems very good :slight_smile: so thank you very much for helping me. I think with my knowlege of blender I wouldn’t get that far, especialy because I don’t know how to code in Python :confused: So all we need now is a que and a processor. Will these two also need coding or can one make them with simple logic bricks?

I’m afraid they also need python :no:. But you wanted a menu, right? Maybe you could design the menu and it’s buttons and write the helpfile explainations? :rolleyes:

Sure, i’ll do that. Just need to brush up on creating the menus first.

I modified the script a bit, so now there can be several tracks at the same time :slight_smile: I also added a sort of indicator with a little bulb.
link is the same http://www.box.net/shared/fi9p029byt
Just so you know, I’ll be gone for a week.

Hey, that’s superbly done. Thank you very much. So you’re off on holidays, thats nice :slight_smile: I’m in the process of making menus, so they should be done by the time you get back.
Well then, we will continue this discussion in a week.
Have a nice time!

Just wanted to let you know I’m back from my vacation :wink:

I modified the script again so tracks can now join. I also added the possibility of collisions. See for yourself. :smiley:
Maybe you can make some sort of explosion animation?

Hey. Sorry for the late reply. I hope you enjoyed your vacations :slight_smile: Yeah, the collisions are great. But I would really need a que, so something that would hold the cubes in line untill they get to the processor with the cool light thingie :slight_smile: Also could you modify the script so the processor would hold the cube in place for a few moments, about a second or two would do it. I tried it myself but it ended up in disaster :smiley: Thanks a lot.

Don’t worry, I’m working on it :wink: Btw, if you want to learn Python I know some tutorials that helped me a lot…

Ok, i won’t worry :slight_smile: Well actually, that would be quite useful since I am planing to do other stuff in blender, but after the summer is over :slight_smile:

Well, this tutorial helped me to get a start with python
However, some things are deprecated since Blender 2.49. The new way of writing it will be shown in the command prompt, though…

I found this one
very useful. Explains some basic stuff, but is also useful as reference.

Some video tutorials

But the most important thing is probably that you can always use print dir(…) to get information about possible functions and variables in Blender. Once you’ve learned some python, this will be enough help in most cases.

Hope this helps :wink:

The queue is almost done :smiley:

Thanks for the tuts. I checked them out a bit, they seem simple enough to start with :slight_smile:

How’s it going over there? Haven’t heard anything from you for quite a while now. So, any developments on the simulator?

Eh, yeah ^^; haven’t had much time to work on the event sim lately, I’m working on too many projects at the moment >_<" I’ve made progress with the queue, though, but it’s a little more complicated than I thought…
How are things going with the menu?