### Install via pip Source: https://vrpsolvereasy.readthedocs.io/en/latest/Installation/index.html Standard command to install the free version of VRPSolverEasy. ```bash python -m pip install VRPSolverEasy ``` -------------------------------- ### Install via git Source: https://vrpsolvereasy.readthedocs.io/en/latest/Installation/index.html Command to install the package after downloading and extracting it into a local directory. ```bash python -m pip install . ``` -------------------------------- ### Example output for toy instance Source: https://vrpsolvereasy.readthedocs.io/en/latest/_sources/Demos/RichVRP.rst.txt Example output for the toy instance after printing the solution. Shows customer IDs with time windows, solution cost, and routes with end times, loads, and total costs. ```text Customer IDs and time windows: Customer 2: (id: 2, tw: [20, 100]) Customer 3: (id: 3, tw: [0, 100]) Customer 4: (id: 4, tw: [180, 250]) Customer 5: (id: 5, tw: [0, 100]), (id: 8, tw: [200, 300]), (id: 9, tw: [400, 500]) Customer 6: (id: 6, tw: [80, 130]) Customer 7: (id: 7, tw: [0, 50]), (id: 10, tw: [500, 600]) Solution cost : 980.2435999992152 Route for vehicle 2: ID : 0 --> 8 --> 10 End time : 0.0 --> 250.0 --> 550.0 Load : 0.0 --> 20.0 --> 50.0 Total cost : 158.767 Route for vehicle 2: ID : 0 --> 2 End time : 0.0 --> 70.0 Load : 0.0 --> 35.0 Total cost : 35.811 Route for vehicle 3: ID : 1 --> 6 --> 4 End time : 0.0 --> 130.0 --> 230.0 Load : 0.0 --> 80.0 --> 180.0 Total cost : 784.6656 ``` -------------------------------- ### Example solution output Source: https://vrpsolvereasy.readthedocs.io/en/latest/Example/index.html Example output of the solved VRPTW instance, showing three routes with IDs, names, end times, loads, and total costs. ```text Route for vehicle 1: ID : 0 --> 2 --> 5 --> 0 Name : DEPOT --> Vermont, USA --> Rhode Island, the US --> DEPOT End time : 0.0 --> 16.807 --> 19.259 --> 37.230000000000004 Load : 0.0 --> 300.0 --> 1041.0 --> 1041.0 Total cost : 372.29999999999995 Route for vehicle 1: ID : 0 --> 1 --> 3 --> 0 Name : DEPOT --> West Virginia, USA --> Texas, the USA --> DEPOT End time : 0.0 --> 10.548 --> 31.625 --> 48.728 Load : 0.0 --> 500.0 --> 1100.0 --> 1100.0 Total cost : 487.2800000000001 Route for vehicle 1: ID : 0 --> 4 --> 6 --> 0 Name : DEPOT --> South Dakota, the US --> Oregon, the US --> DEPOT End time : 0.0 --> 10.5 --> 31.006 --> 62.010000000000005 Load : 0.0 --> 658.0 --> 1094.0 --> 1094.0 Total cost : 620.1 ``` -------------------------------- ### Example instance toy.txt Source: https://vrpsolvereasy.readthedocs.io/en/latest/_sources/Demos/RichVRP.rst.txt Example instance content from demos/data/RichVRP/toy.txt. It defines two depots, one big vehicle type, one small vehicle type, and six customers with their attributes. ```text 2 0 0 0 0 1000 1 100 100 0 500 200 400 3.2 1 50 20 1.0 4 6 2 5 15 35 50 0 1 1 20 100 3 5 25 15 50 1 1 1 0 100 4 15 15 100 50 0 0 1 180 250 5 75 60 20 50 0 1 3 0 100 200 300 400 500 6 50 50 80 50 0 0 1 80 130 7 35 75 30 50 0 0 2 0 50 500 600 ``` -------------------------------- ### Upgrade setuptools Source: https://vrpsolvereasy.readthedocs.io/en/latest/Installation/index.html Recommended command to upgrade the setuptools package before installation. ```bash python -m pip install --upgrade setuptools ``` -------------------------------- ### Example solution output Source: https://vrpsolvereasy.readthedocs.io/en/latest/Demos/RichVRP.html Displays the expected output format for customer IDs, time windows, and vehicle routes. ```text Customer IDs and time windows: Customer 2: (id: 2, tw: [20, 100]) Customer 3: (id: 3, tw: [0, 100]) Customer 4: (id: 4, tw: [180, 250]) Customer 5: (id: 5, tw: [0, 100]), (id: 8, tw: [200, 300]), (id: 9, tw: [400, 500]) Customer 6: (id: 6, tw: [80, 130]) Customer 7: (id: 7, tw: [0, 50]), (id: 10, tw: [500, 600]) Solution cost : 980.2435999992152 Route for vehicle 2: ID : 0 --> 8 --> 10 End time : 0.0 --> 250.0 --> 550.0 Load : 0.0 --> 20.0 --> 50.0 Total cost : 158.767 Route for vehicle 2: ID : 0 --> 2 End time : 0.0 --> 70.0 Load : 0.0 --> 35.0 Total cost : 35.811 Route for vehicle 3: ID : 1 --> 6 --> 4 End time : 0.0 --> 130.0 --> 230.0 Load : 0.0 --> 80.0 --> 180.0 Total cost : 784.6656 ``` -------------------------------- ### Example data object contents Source: https://vrpsolvereasy.readthedocs.io/en/latest/_sources/Demos/CVRP.rst.txt Example contents of the data object returned by read_instance. Shows the structure of the instance data. ```python vehicle_capacity = 300 nb_customers = 3 cust_demands = [15,52,65] cust_coordinates = [[55.21,44.36],[54.31,65.23],[57.81,53.27]] depot_coordinates = [54.69,57.36] ``` -------------------------------- ### Example data structure Source: https://vrpsolvereasy.readthedocs.io/en/latest/Demos/CVRP.html Example of the contents of the 'data' dictionary returned by read_instance, showing vehicle capacity, number of customers, customer demands, customer coordinates, and depot coordinates. ```python vehicle_capacity = 300 nb_customers = 3 cust_demands = [15,52,65] cust_coordinates = [[55.21,44.36],[54.31,65.23],[57.81,53.27]] depot_coordinates = [54.69,57.36] ``` -------------------------------- ### Install Python for Apple Silicon Source: https://vrpsolvereasy.readthedocs.io/en/latest/Installation/index.html Command to install the x86_64 version of Python using Homebrew on Apple Silicon processors. ```bash arch -x86_64 /usr/local/homebrew/bin/brew install python ``` -------------------------------- ### Example MDVRP data structure Source: https://vrpsolvereasy.readthedocs.io/en/latest/Demos/MDVRP.html Example contents of the data object returned by read_instance. Shows the structure of the instance data for a small MDVRP instance. ```python nb_depots = 2 nb_customers = 3 vehicle_capacity = 60 cust_demands = [15,52,65] cust_coordinates = [[55.21,44.36],[57.81,53.27]] depot_coordinates = [[54.69,57.36],[54.31,65.23]] ``` -------------------------------- ### Example HFVRP data object Source: https://vrpsolvereasy.readthedocs.io/en/latest/_sources/Demos/HFVRP.rst.txt Example contents of the data object returned by read_hfvrp_instance. Shows the structure of the instance data used in the demo. ```python nb_vehicle_types = 2 nb_customers = 3 vehicle_capacities = [300,250] vehicle_fixed_costs = [12,24] vehicle_var_costs = [12,24] vehicle_max_numbers = [3,3] cust_demands = [15,52,65] cust_coordinates = [[55.21,44.36],[54.31,65.23],[57.81,53.27]] depot_coordinates = [54.69,57.36] ``` -------------------------------- ### Run VRPSolverEasy on Apple Silicon Source: https://vrpsolvereasy.readthedocs.io/en/latest/Installation/index.html Commands to install and run VRPSolverEasy using the x86_64 Python executable. ```bash /usr/local/homebrew/bin/python3 -m pip install VRPSolverEasy /usr/local/homebrew/bin/python3 VRPSolverEasy/demos/CVRP.py -i VRPSolverEasy/demos/data/CVRP/A-n32-k5.vrp ``` -------------------------------- ### Run CVRPTW instance from command line Source: https://vrpsolvereasy.readthedocs.io/en/latest/_sources/Demos/CVRPTW.rst.txt Run a CVRPTW instance from the command line after installation. Specify the instance path, time limit, and solver name. CPLEX requires the academic version and, on Windows, its path via -p. ```text python CVRPTW.py -i -t