How to add costs to routes in Anylogic?

185 Views Asked by At

I am creating a model in Anylogic to simulate the container transportation between a port and the hinterland (in a GIS map). I have data on how many trucks are driving between each customer zone and the terminals. I want to add a possible hub in the network, so that trucks can choose to transport containers at night between the terminals and hub (and at day bring them to the customers).

However, I am struggling to find how to add a route (and time of day) choice to Anylogic (based on route costs (based on a travel time matrix I have), hub costs and average waiting times at terminals during specific times of the day). Does somebody know how to add costs to routes in Anylogic?

1

There are 1 best solutions below

4
On BEST ANSWER

If you want to add costs to route the best option would be to create your own custom Java class and have the standard AnyLogic GISroute as a field as well as the cost (and any other variable that you want)

enter image description here

You can then create routes and assign costs to them and then use this custom field inside your analysis and modelling

enter image description here