Conditional pusher


I have this simple setup where i would like to push tubes with a pusher from one conveyor onto another:

The second conveyor functions as a buffer, so I would like the pusher to stop pushing whenever the buffer gets full. This way the excess pipes should keep on moving by means of the first conveyor.
However, right now the simulation just pushes them into each other when the buffer is full:

Does anyone know how I could adjust this?

Try to limit the second conveyor capacity?

1 Like

Thank you for your response!

This fixes the problem with the overlapping products on the second conveyor, however it also brings the first conveyor to a halt.
Do you know if it is possible to have the first conveyor to continue running?

Cool, I get your point, it’s pretty smart, I guess your goal is to miss none of the workpiece.

Miss none of the workpiece

Simply modify 2 lines of pusher’s script.

#while out_going_path and out_going_path.ComponentCount >= out_going_path.Capacity:
if out_going_path and out_going_path.ComponentCount >= out_going_path.Capacity:

Here is the sample layout.
Miss none of the workpiece.vcmx (562.7 KB)


Awesome, that works like a charm! Thanks alot!!

Do you also happen to know if it there is a way for the ‘second’ conveyor capacity to be automatically set based on the products that it is carrying?
The idea is that I would like to run different batches of products with various sizes and cycle times, and I would like to simulate for what batch type the buffer would get full.

Setting the buffercapacity manually however makes this very tedious

I guess it would also need some script to solve it. Do you have more details about it? Images or scene … ? It would be helpful to find an easier way to solve it.

1 Like

This is the setup, once the buffer is full the tubes will continue

I managed to get this working based on the part sizes by adjusting your script a bit:

One thing that I would like to add is that it also bases this automatically on the length of the buffer (length of the conveyor). Right now I manually added the value ‘1500’. How can I call this value inside the pusher script? (e.g. ConveyorOut.ConveyorLength)

Cool, it woud be something like this.

outConveyor = comp.findBehaviour("PusherConveyorInterface").ConnectedComponent
capacity = math.floor(outConveyor.ConveyorLength / (part.Radius * 2.0))    
if out_going_path and out_going_path.ComponentCount >= capacity:

This is a very interesting topic. You could develop your own solver to input a production batch list and calculate how many stations you need or how long your conveyor would be.

1 Like

Instead of using capacity, which is just a simulation abstraction, you could try to model this more realistically by having a volume or raycast sensor. The sensor would tell whether the area the products are being pushed to is free / has enough space to push another product into.

The size of the product you are about to push you can just get from its bounding box.


Great, thats what I was looking for. Thanks alot for the help!
And indeed an interesting topic, such a solver might be an idea to look into in a later stadium.

Thank you for the suggestion. Thats a good point, but because the production is in batches there will not be different sized products on the buffer at the same time. Simultenously, the system knows if products leave the buffer, so using the product- and buffer sizes is a realistic approach in this case

I have a group of friends who learn this software. Could you please join our group and learn from you