Simulation of product distribution

From Simulace.info
Jump to: navigation, search

Title: Simulation of product distribution

Author: Lucia Pavlíková

Method: Agent-based model

Tool: NetLogo

Problem definition

Simulation overview

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

Day and weather variables

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 and conclusion

Results

The transport vehicle effectively navigated the city to make deliveries under various conditions. The user is able to control key factors such as weather, day of the week, time of the day, and traffic intensity to observe the impact on the vehicle’s performance. The simulation records the number of customers that still need to be served, also how many times the vehicle had to return to the storage facility to finish all the deliveries. The recorded data provided insights into how external factors influenced the operational pattern of the transport vehicle.

Conclusion

This simulation successfully modeled the dynamic environment in which a transport vehicle is making deliveries in the city. The results demonstrated that external factors (weather, day of the week, time and traffic) had effects on the delivery process and the delivery was slower. The needed returns to the storage facility to fill the car again was also influenced by these factors, making the time even longer - showing that real time adjustments, optimizing the shortest way possible and schedules are significant for an effective delivery.

This is a simplified version of a real world problem, and there could be more variables added, for example availability/unavailability of customers, time required to fill the car again in the storage facility, multiple vehicles and so on.

Code

File:Seminarna praca Pavlikova.nlogo

Sources