Simulation of product distribution
Title: Simulation of product distribution
Author: Lucia Pavlíková
Method: Agent-based model
Tool: NetLogo
Problem definition
This project explores the optimization of delivery times for distribution vehicles in a city (London) with a complex and challenging logistics environment. This study focuses on key variables that impact delivery efficiency, such as traffic congestion, weather conditions, variability in package handling, and scenarios of unavailability of recipients. The aim is to provide insights and strategies for businesses to enhance their urban distribution operations, making this research relevant for both academic and practical applications in urban logistics.
Method
The model for this project simulates the distribution process in a city (London) using an agent-based approach in NetLogo. In this model, agents represent different elements of the distribution network (delivery vehicle, customers, storage facility). External factors include weather conditions or customers availability.
Model
The model for this project simulates the distribution process in London using an agent-based approach in NetLogo. It begins with a map of the world - onto which various distribution elements, such as vehicles, storage facilities, and delivery locations, are placed.
Environment
The simulation takes place within the city. Delivery locations are randomly generated within the simulation, each assigned a position in a Cartesian coordinate system. Each household is designated to receive one package. Once the final package is delivered, the vehicle returns to the storage facility, using the button “go to storage”.
User can decide about various variables:
- Number_of_customers: how many customers will have a package delivered during the day.
- Time_of_day: whether the delivery car drives in the morning, lunch or afternoon.
- Day: the user can chose what day of the week it is.
- Weather: for simplification there are 4 types of weather that influence how fast the delivery vehicle can move.
Both weather and day variables are chosen based on the data of transport in London and its average weather. Users can chose these variables based on a description below the "chooser" to make a more educated decision.
Agents
In this model, agents represent different elements of the distribution network. Delivery vehicle is the primary agents. Storage facility and delivery locations are also represented, serving as starting and ending points for the distribution journey.
This function sets up the town. It has a colour grey, bacause London is a pretty grey.
ask patches [ set pcolor grey ]
This is set up for the delivery vehicle. It always starts the day in the storage.
create-cars 1 ask cars [ setxy storagex storagey set size 2 set shape "car" ]
Here the storage is created - it has a shape of "pentagon", since it should be differenciated from the customers.
create-storages 1 ask storages [ setxy storagex storagey set size 2 set shape "pentagon" ]
Cuustomers are created in random places and the number of them is set by user using slider before the simulation setup.
create-customers number_of_customers ask customers [ setxy random-xcor random-ycor set size 2 set shape "house" ]
Movement
The movement of vehicles is a crucial aspect of the model. Vehicles navigate through the city, contending with variables such as traffic congestion, day of the week, weather or time of the day. Their movement patterns are influenced by all of the variables.
the go function. First step is to identify the closest customer, then go to him. The vehicle has capacity 20 packages, so if the car is not empty, it delivers the package to the customer. Otherwise it goes to the storage to get more packages. If the delivery is finished, the functions stop.
identify-closest make-step fill-car if (filled_car != 20) [deliver] if (finish_delivery = 1) [stop]
Distribution Process
The model for this project simulates the distribution process in a city (London) using an agent-based approach in NetLogo. In this model, agents represent different elements of the distribution network (delivery vehicle, customers, storage facility). External factors include weather conditions or customers availability.
The core of the model is the distribution process, where vehicles collect packages from storage facilities and deliver them to designated stores or direct to customers.
External Factors
External factors like weather conditions and traffic congestion are integrated into the model. The model allows for the customization of these variables to simulate different scenarios.
End of the Simulation
The simulation concludes when all scheduled deliveries are completed. The model provides data on delivery costs and potential bottlenecks in the distribution process.
Results
Conclusion
Code
Sources
- https://www.britannica.com/place/London/Transportation
- https://www.holiday-weather.com/london/averages/
- https://www.quora.com/How-common-are-thunderstorms-in-London
- https://weatherspark.com/y/45061/Average-Weather-in-City-of-London-United-Kingdom-Year-Round
- https://content.tfl.gov.uk/travel-in-london-2023-road-traffic-trends-acc.pdf
- https://ccl.northwestern.edu/netlogo/docs/programming.html
- https://logistiko.eu/help/goods-delivery-procedure