Using a python based Genetic Algorithm i am able to get routes for a vehicle routing problem with a heterogeneous fleet. These have to be evaluated in anylogic using discrete event simulation. I used the following blocks:
In the main, I call the python communicator and store the routes in a parameter of the type "List", then I add these routes to the agent 'Order' (of population type) such that each order agent contains a unique route and vehicle.
However, after seizing, each separate stop embedded within the parameter route from the order agent needs to be visited by the vehicle. Currently I have the moveTo block where I defined to agent with an agent 'main.Stops'. But this gives me the error that I cannot convert from int to agent.
The idea I had is to count the routes and count the elements in the routes via the parameter 'routeID' and variable 'OrderCount' respectively. These are updated after each visit and are initialized at zero. Does anybody know how I can ensure that each integer element in the route can be visited via a moveTo block (or other solution).