Skip to content

Commit 29d1d1f

Browse files
committed
Updated Readme.md
1 parent f7ca9dc commit 29d1d1f

File tree

1 file changed

+80
-2
lines changed

1 file changed

+80
-2
lines changed

README.md

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,95 @@
11
# Vehicle Routing Problem with Time Window Constraints(VRPPDTW)
22

33
## Description
4-
This project is a Python-based solver for the Vehicle Routing Problem with time window constraints (VRPPDTW) using the DOcplex solver. It allows users to optimize routes for vehicles to efficiently deliver people within a network while respecting pickup and delivery time windows
4+
This project is a Python-based solver for the Vehicle Routing Problem with time window constraints (VRPPDTW) using the DOcplex solver. It allows users to optimize routes for vehicles to efficiently deliver people within a network while respecting pickup and delivery time windows.
5+
The code uses graph layout including nodes and edges and requests and vehicles information to solve the problem and output a comprehensive output of each service bus's information. Each bus has total travel time, total travel distance, total cost, and a list of movements. Each movement is comprised of the following data:
6+
- `origin_dest_ids`: A list containing the origin and destination node IDs.
7+
- `start_time`: The start time of the movement.
8+
- `finish_time`: The finish time of the movement.
9+
- `start_load`: The load of the vehicle at the start of the movement.
10+
- `finish_load`: The load of the vehicle at the end of the movement.
11+
- `request_id`: The ID of the request associated with the movement (if applicable).
12+
- `path`: The sequence of nodes visited during the movement.
13+
- `path_cost`: The cost associated with traversing the path.
14+
- `travel_time`: The total travel time for the movement.
15+
- `travel_distance`: The total travel distance for the movement.
16+
- `status`: The status of the movement, indicating whether it involves picking up or delivering a request.
17+
18+
Here's an example of the output movements:
19+
20+
```json
21+
{
22+
"origin_dest_ids": [
23+
10,
24+
0
25+
],
26+
"start_time": "0:0",
27+
"finish_time": "6:0",
28+
"start_load": 0,
29+
"finish_load": 3,
30+
"request_id": 0,
31+
"path": [
32+
7,
33+
4,
34+
5,
35+
8,
36+
11,
37+
10,
38+
0
39+
],
40+
"path_cost": 18.7,
41+
"travel_time": 15.5,
42+
"travel_distance": 8.8,
43+
"status": "Picking Up Request 0 at Node 0"
44+
}
45+
```
46+
47+
## Installation
48+
49+
To use this project, you need to have Python installed on your system. You can download Python from the [official Python website](https://www.python.org/downloads/).
50+
51+
Once you have Python installed, you can install the required dependencies using pip. Run the following command in your terminal or command prompt:
52+
53+
```bash
54+
pip install -r requirements.txt
55+
```
556

657
## Usage
7-
1. Run the main function within the VRPPDTW.py file. As the input, enter the folder name of one of the samples(For example 2). This will run the code and output 4 json files for chosen l_ik, t_ik, x_ijk and finally buses_paths which includes all the information necessary.
58+
1. Run the main function within the `VRPPDTW.py` file. As the input, enter the folder name of one of the samples(For example 2). Each folder contains 4 csv files as the input data. Running the code will output 4 json files for chosen l_ik, t_ik, x_ijk and finally buses_paths which includes all the information necessary. You could also create and test you own examples by placing them inside the `Samples` directory
59+
2. Use `Plot_Graph.py` for plotting the graph layout along with request pickups, deliveries, and depots, like the image below:
60+
61+
62+
<div style="text-align:center;margin-top:2rem;margin-bottom:2rem">
63+
<img src="images/Base_Graph_3.png" alt="Base_Graph" width="500" height="auto">
64+
</div>
65+
66+
67+
3. You could also use `Plot_Graph.py` for plotting the solution, either the overall or the step by step:
68+
69+
<div style="align-items:center;display:flex;justify-content:center;gap:2rem;margin-top:2rem;margin-bottom:2rem">
70+
<img src="images/Overall_Solution1_3.png" alt="Overall_1" width="250" height="auto">
71+
<img src="images/Overall_Solution2_3.png" alt="Overall_2" width="250" height="auto">
72+
<img src="images/Overall_Solution3_3.png" alt="Overall_3" width="250" height="auto">
73+
</div>
74+
75+
4. You can also create a Gifs using the same file. Both the step by step solutions and the Gifs display the current status of each movement, load of the bus at the beginning and the end, the start and finish time of the movement and path and total cost in the image.
76+
You can use space bar to move to the next movement or press q to exit
77+
78+
<div style="align-items:center;display:flex;justify-content:center;gap:2rem;margin-top:2rem;margin-bottom:2rem">
79+
<img src="images/bus_2.gif" alt="bus2_gif" width="500" height="auto">
80+
</div>
881

982
## Examples
1083
To see examples of how the VRPWT solver can be used, check out the `Solution` within each of the samples.
1184

1285
## Contact
1386
For questions or feedback, please email [danialchekani@arizona.edu](mailto:danialchekani@arizona.edu) or [danialchekani2000@gmail.com](danialchekani2000@gmail.com)
1487

88+
## Acknowledgements
89+
90+
This project is an implementation of the paper titled "VRP with Pickup and Delivery" by Desaulniers, G., Desrosiers, J., Erdmann, A., Solomon, M.M., & Soumis, F. (2002). The paper addresses the Vehicle Routing Problem with Pickup and Delivery (VRPPD) and provides insights into solving it efficiently.
91+
92+
If you find this project useful in your research or work, consider citing the paper
1593

1694

1795

0 commit comments

Comments
 (0)