Search code examples
anylogic

Transport Container with Train


I'm using the rail library and I create trains which are going to container terminal. The trains consits of waggons and are animated as 3D-objects. I also have an agent for the container. I want that on each railcar of the train is a container-agent.

My Problem is, that I can't find a way to place a container on a railcar and that the container moves with the railcar to destination track.

In a succeeding step this container should be moved by a crane from the railcar to a storage.

My problem seems to me actually quite simple but I can find a way to sove it. I hope maybe one of you got an idea. Thanks!

I tried a few things:

In the train-source in the car-setup section I tried to creat a new container for each car and then place the new container on the car with the moveto method.

I also tried to place onn top of the railcar an attractor. Then I injected a container into a container-source for each railcar in the car-setup section. In the container-source block the location of arrival is a variable in which I saved the attractor of the railcar.


Solution

  • You can use the "Pickup" and "Dropoff" blocks from the Process Modelling library. All blocks are working together with the rail library, so your trains can pickup and dropoff other agents anytime.

    Check the help and example models showing you how to use these blocks first, though