<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    ajor
   </journal-id>
   <journal-title-group>
    <journal-title>
     American Journal of Operations Research
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2160-8830
   </issn>
   <issn publication-format="print">
    2160-8849
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/ajor.2024.146009
   </article-id>
   <article-id pub-id-type="publisher-id">
    ajor-137973
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Physics 
     </subject>
     <subject>
       Mathematics
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    An Elementary Approach to the Vehicle Routing Problem via Python and Google API
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Kai Q.
      </surname>
      <given-names>
       Lian
      </given-names>
     </name>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Gareth A.
      </surname>
      <given-names>
       Tribello
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aCentre for Quantum Materials and Technologies, School of Mathematics and Physics, Queen’s University Belfast, Northern Ireland, UK
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     29
    </day> 
    <month>
     11
    </month>
    <year>
     2024
    </year>
   </pub-date> 
   <volume>
    14
   </volume> 
   <issue>
    06
   </issue>
   <fpage>
    169
   </fpage>
   <lpage>
    190
   </lpage>
   <history>
    <date date-type="received">
     <day>
      2,
     </day>
     <month>
      November
     </month>
     <year>
      2024
     </year>
    </date>
    <date date-type="published">
     <day>
      26,
     </day>
     <month>
      November
     </month>
     <year>
      2024
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      26,
     </day>
     <month>
      November
     </month>
     <year>
      2024
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    Commercial organisations commonly use operational research tools to solve vehicle routing problems. This practice is less commonplace in charity and voluntary organisations. In this paper, we provide an elementary approach for solving the Vehicle Routing Problem (VRP) that we believe can be easily implemented in these types of organisations. The proposed model leverages mixed integer linear programming to optimize the pickup sequence of all customers, each with distinct time windows and locations, transporting them to a final destination using a fleet of vehicles. To ensure ease of implementation, the model utilises Python, a user-friendly programming language, and integrates with the Google Maps API, which simplifies data input by eliminating the need for manual entry of travel times between locations. Troubleshooting methods are incorporated into the model design to ensure easy debugging of the model’s infeasibilities. Additionally, a computation time analysis is conducted to evaluate the efficiency of the code. A node partitioning approach is also discussed, which aims to reduce computational times, especially when handling larger datasets, ensuring this model is realistic and practical for real-world application. By implementing this optimized routing strategy, logistics companies or organisations can expect significant improvements in their day-to-day operations, with minimal computational cost or need for specialised expertise. This includes reduced travel times, minimized fuel consumption, and thus lower operational costs, while ensuring punctuality and meeting the demands of all passengers.
   </abstract>
   <kwd-group> 
    <kwd>
     Vehicle Routing Problem (VRP)
    </kwd> 
    <kwd>
      Google Maps Distance Matrix API
    </kwd> 
    <kwd>
      Python
    </kwd> 
    <kwd>
      Pulp
    </kwd> 
    <kwd>
      Mixed Integer Linear Programming
    </kwd> 
    <kwd>
      Transportation
    </kwd> 
    <kwd>
      Optimisation Problem
    </kwd> 
    <kwd>
      Time Window
    </kwd> 
    <kwd>
      Mathematical Modelling 
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>This paper originates from a project undertaken for the final-year module, Stochastic Processes and Risk in the BSc Mathematics undergraduate program at Queen’s University Belfast. The project was developed in collaboration with Fermanagh Community Transport (FCT) <xref ref-type="bibr" rid="scirp.137973-1">
     [1]
    </xref>, which is a transport service provider to individuals in rural and socially isolated areas in and around Fermanagh. Fermanagh is a largely rural county located in Northern Ireland, which is composed of dispersed communities, thus making transportation services, like those provided by FCT, essential for connecting residents to essential services and resources. Their services, such as the Dial-A-Lift scheme and the Home to Hospital transport service, cater primarily to the elderly, people with disabilities, and individuals facing mobility challenges. These services are vital in enabling people who lack access to public or private transport options to maintain their independence and attend essential appointments, especially health and well-being visits. FCT uses a fleet of minibuses and volunteer-driven cars to facilitate these operations. However, due to the rural and widespread nature of the service area, assigning efficient vehicle routes is a crucial aspect of maintaining a cost-effective and reliable transport service. Hence, this project proposes a solution for determining the optimal sequence for picking up customers from various locations and transporting them to a final destination, tailored specifically to FCT’s operational needs through mathematical modelling. In this paper, the original FCT-focused project has been significantly revised and expanded to serve as a practical model for general applications in vehicle routing and logistics. This broader approach seeks to provide a versatile framework that can be adapted to various real-world scenarios, delivering both practical insights and impactful solutions in transportation systems for volunteer or charity logistics organisations with limited computational resources.</p>
   <p>The vehicle routing problem (VRP) is considered among the most challenging in combinatorial optimization <xref ref-type="bibr" rid="scirp.137973-2">
     [2]
    </xref> and is NP-hard, because it encompasses the Travelling Salesman Problem (TSP) as a specific case <xref ref-type="bibr" rid="scirp.137973-3">
     [3]
    </xref>. In recent years, the evolution of VRP has focused on adapting VRP to real-world applications, resulting in new VRP variants, models, solution techniques, and practical implementations. The VRP is a fundamental problem in logistics and operational research. It involves designing optimal delivery or collection routes from a central depot to a set of geographically dispersed customers while adhering to constraints such as vehicle capacity, route length, time windows, and precedence relations <xref ref-type="bibr" rid="scirp.137973-3">
     [3]
    </xref>. The objective in solving VRP is to minimize the total cost associated with these routes, generally due to factors such as distance travelled, fuel consumption, vehicle utilization, and driver costs. The Vehicle Routing Problem with Time Windows (VRPTW) is one of the popular extensions of this problem, which assumes that each customer must be visited within a specific time interval <xref ref-type="bibr" rid="scirp.137973-4">
     [4]
    </xref>. The General Vehicle Routing Problem (GVRP) is a complex extension of the classic VRP that incorporates various real-life constraints and requirements, such as time windows, heterogeneous fleets, multi-dimensional capacity constraints, and order/vehicle compatibility <xref ref-type="bibr" rid="scirp.137973-5">
     [5]
    </xref>. These extensions make GVRP a more realistic and challenging problem to solve, but also a more powerful tool for optimizing complex real-world logistics operations.</p>
   <p>The VRP is encountered daily by numerous distributors worldwide and carries substantial economic importance as it directly impacts operational costs and service efficiency. Common applications arise in newspaper industries, food delivery and milk collection services <xref ref-type="bibr" rid="scirp.137973-3">
     [3]
    </xref>. The primary advantage of employing VRP solutions is operational cost reduction. By optimizing routes, businesses or organisations can minimize the total distance travelled by their vehicles, leading to lower fuel consumption and reduced vehicle wear and tear. Also, VRP solutions boost customer satisfaction by enabling timely and reliable deliveries. Their adaptability to real-world constraints such as vehicle capacity, route length, time windows, and specific customer requirements allows businesses to tailor VRP models to their unique operational needs, maximizing efficiency and cost-effectiveness. Additionally, in the context of environmental sustainability, VRP minimizes travel distances and fuel consumption, directly reducing greenhouse gas emissions and supporting the development of greener logistics systems <xref ref-type="bibr" rid="scirp.137973-2">
     [2]
    </xref>. The emerging focus on green VRP expands traditional VRP models to explicitly consider environmental impacts, incorporating constraints related to energy efficiency and fuel usage. This shift is increasingly important for organisations aiming to meet sustainability goals without compromising service quality.</p>
   <p>Unlike more complex vehicle routing problem (VRP) solutions, which will be discussed in Section 4.4, that typically demand considerable computational power and specialized knowledge, this paper discusses an approach which strikes a practical balance between simplicity, cost-effectiveness, and adaptability, making it particularly suitable for smaller-scale volunteer or charity operations like FCT. Advanced VRP methodologies often require complex algorithms and extensive data analysis capabilities, which can be overwhelming and impractical for organisations lacking the resources to implement such solutions. In contrast, this model’s straightforward approach allows smaller organisations to effectively tackle routing challenges without the need for extensive technical expertise or substantial investments in computational resources. The implementation of the model proposed in this paper is facilitated through user-friendly tools such as the Google Maps Distance Matrix API <xref ref-type="bibr" rid="scirp.137973-6">
     [6]
    </xref> and Python programming language, which enhance its accessibility and usability. The Google Maps API provides real-time data on traffic conditions, distances, and estimated travel times, allowing users to generate optimal routes efficiently. Python, known for its simplicity and versatility, enables quick development and customization of the routing model. This combination results in a simple user interface that allows staff members or users with minimal technical training to engage with the routing solution effectively, reducing the learning curve typically associated with more advanced VRP systems. Ultimately, the methodology and implementation explored in this paper aim to provide a valuable framework for improving transportation logistics in a variety of real-world contexts, in a straight forward, yet impactful and effective manner.</p>
  </sec><sec id="s2">
   <title>
    <xref ref-type="bibr" rid="scirp.137973-"></xref>2. Methodology</title>
   <p>In this section, we describe the mathematical modelling of the Vehicle Routing Problem (VRP). In our model, various locations will be regarded as nodes, each representing a specific point on the route. The first node will mark the departure point, often referred to as the central hub or depot, where the fleet of vehicles initiates its journey. The last node represents the final destination or drop-off point, that is, the terminating node for each vehicle’s route. This structure will allow for a clear and consistent reference framework as we discuss routing and optimization within the VRP context.</p>
   <sec id="s2_1">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>2.1. Assumptions</title>
    <p>The model is formulated based on the following assumptions:</p>
   </sec>
   <sec id="s2_2">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>2.2. Parameters and Sets</title>
    <p>The notations used in the model are as follows:</p>
   </sec>
   <sec id="s2_3">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>2.3. Decision Variables</title>
    <p>The variables implemented in the system are as follows,</p>
   </sec>
   <sec id="s2_4">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>2.4. Objective Function</title>
    <p>The objective of the model is to minimize the total travel time for all vehicles, as we assume the total costs incurred are directly proportional to the total travel time of all vehicles. The objective function can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         min 
       </mi> 
       <mi>
         z 
       </mi> 
       <mo>
         = 
       </mo> 
       <munderover> 
        <mstyle mathsize="140%" displaystyle="true"> 
         <mo>
           ∑ 
         </mo> 
        </mstyle> 
        <mrow> 
         <mi>
           k 
         </mi> 
         <mo>
           = 
         </mo> 
         <mn>
           0 
         </mn> 
        </mrow> 
        <mrow> 
         <msub> 
          <mi>
            n 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </munderover> 
       <mi>
         max 
       </mi> 
       <mtext>
         _ 
       </mtext> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
      </mrow> 
     </math> (O1)</p>
   </sec>
   <sec id="s2_5">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>2.5. Constraints</title>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         0 
       </mn> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <msub> 
        <mi>
          z 
        </mi> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <msub> 
        <mi>
          z 
        </mi> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         v 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         h 
       </mi> 
       <mi>
         i 
       </mi> 
       <mi>
         c 
       </mi> 
       <mi>
         l 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
      </mrow> 
     </math> (C1)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         ≥ 
       </mo> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         − 
       </mo> 
       <mi>
         M 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           − 
         </mo> 
         <msub> 
          <mi>
            z 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           2 
         </mn> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         v 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         h 
       </mi> 
       <mi>
         i 
       </mi> 
       <mi>
         c 
       </mi> 
       <mi>
         l 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
      </mrow> 
     </math> (C2)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <munderover> 
        <mstyle mathsize="140%" displaystyle="true"> 
         <mo>
           ∑ 
         </mo> 
        </mstyle> 
        <mrow> 
         <mi>
           k 
         </mi> 
         <mo>
           = 
         </mo> 
         <mn>
           0 
         </mn> 
        </mrow> 
        <mrow> 
         <msub> 
          <mi>
            n 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </munderover> 
       <mtext>
           
       </mtext> 
       <msub> 
        <mi>
          z 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         1 
       </mn> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           2 
         </mn> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (C3)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <munder> 
        <mstyle mathsize="140%" displaystyle="true"> 
         <mo>
           ∑ 
         </mo> 
        </mstyle> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           ∈ 
         </mo> 
         <mi>
           n 
         </mi> 
         <mi>
           o 
         </mi> 
         <mi>
           d 
         </mi> 
         <mi>
           e 
         </mi> 
         <mi>
           s 
         </mi> 
        </mrow> 
       </munder> 
       <mtext>
           
       </mtext> 
       <msub> 
        <mi>
          d 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <msub> 
        <mi>
          z 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         ≤ 
       </mo> 
       <mi>
         Q 
       </mi> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         v 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         h 
       </mi> 
       <mi>
         i 
       </mi> 
       <mi>
         c 
       </mi> 
       <mi>
         l 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
      </mrow> 
     </math> (C4)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           j 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         + 
       </mo> 
       <mi>
         M 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           − 
         </mo> 
         <msub> 
          <mi>
            x 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mi>
             j 
           </mi> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≥ 
       </mo> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         + 
       </mo> 
       <msub> 
        <mi>
          t 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         − 
       </mo> 
       <mi>
         M 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           2 
         </mn> 
         <mo>
           − 
         </mo> 
         <msub> 
          <mi>
            z 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
         <mo>
           − 
         </mo> 
         <msub> 
          <mi>
            z 
          </mi> 
          <mrow> 
           <mi>
             j 
           </mi> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         , 
       </mo> 
       <mi>
         j 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         n 
       </mi> 
       <mi>
         o 
       </mi> 
       <mi>
         d 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         v 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         h 
       </mi> 
       <mi>
         i 
       </mi> 
       <mi>
         c 
       </mi> 
       <mi>
         l 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
      </mrow> 
     </math> (C5)</p>
    <p>Also, the following constraint ensures that vehicles can only travel between nodes if they visit both nodes:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          x 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         + 
       </mo> 
       <msub> 
        <mi>
          x 
        </mi> 
        <mrow> 
         <mi>
           j 
         </mi> 
         <mi>
           i 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         ≥ 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         + 
       </mo> 
       <mi>
         M 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            z 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
         <mo>
           + 
         </mo> 
         <msub> 
          <mi>
            z 
          </mi> 
          <mrow> 
           <mi>
             j 
           </mi> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
         <mo>
           − 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         , 
       </mo> 
       <mi>
         j 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         n 
       </mi> 
       <mi>
         o 
       </mi> 
       <mi>
         d 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         v 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         h 
       </mi> 
       <mi>
         i 
       </mi> 
       <mi>
         c 
       </mi> 
       <mi>
         l 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
      </mrow> 
     </math> (C6)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          e 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <msub> 
        <mi>
          z 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          l 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <msub> 
        <mi>
          z 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         n 
       </mi> 
       <mi>
         o 
       </mi> 
       <mi>
         d 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         v 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         h 
       </mi> 
       <mi>
         i 
       </mi> 
       <mi>
         c 
       </mi> 
       <mi>
         l 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
      </mrow> 
     </math> (C7)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         T 
       </mi> 
       <mo>
         ≥ 
       </mo> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         v 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         h 
       </mi> 
       <mi>
         i 
       </mi> 
       <mi>
         c 
       </mi> 
       <mi>
         l 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
      </mrow> 
     </math> (C8)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         max_ 
       </mtext> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
           
       </mtext> 
       <mo>
         ∀ 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         v 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         h 
       </mi> 
       <mi>
         i 
       </mi> 
       <mi>
         c 
       </mi> 
       <mi>
         l 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         s 
       </mi> 
      </mrow> 
     </math> (C9)</p>
   </sec>
  </sec><sec id="s3">
   <title>
    <xref ref-type="bibr" rid="scirp.137973-"></xref>3. Implementation and Results</title>
   <p>In this section, we discuss the use of Google Maps API to determine the travel time between locations. Also, we demonstrate the implementation of the mathematical model using a predetermined set of parameters, specifically chosen to mimic the day-to-day operation of Fermanagh Transport Community <xref ref-type="bibr" rid="scirp.137973-1">
     [1]
    </xref>. Note that this approach is not only tailored to FCT’s specific needs but can also be changed by other logistics organisations, allowing for flexibility and applicability across different operational contexts.</p>
   <sec id="s3_1">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>3.1. Travel Time via Google Maps API</title>
    <p>For the travel time parameter, we utilized the Google Maps Distance Matrix API <xref ref-type="bibr" rid="scirp.137973-6">
      [6]
     </xref> to efficiently determine the travel time matrix, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          t 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> between all nodes instead of manually calculating these times. This API allows us to predict the travel times for a particular day and time on which we intend to travel. By considering future traffic patterns that vary throughout the day, we can obtain more accurate results that reflect the expected travel times. Additionally, the service time at each node can be simply added to each element of the matrix 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          t 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math>, depending on the circumstances, thus providing a more realistic representation of the total travel time. The nodes, represent specific locations, that is, each customer’s departure and drop-off addresses.</p>
    <p>The complete Python script used for this demonstration is given in Appendix A.1.2. The travel times for the API call are set to 8 a.m. on 25th October 2024. Nine specific locations in County Fermanagh, Northern Ireland have been selected as nodes, with Ballinamallard designated as the departure point and Enniskillen as the drop-off station. The selected nodes are as follows:</p>
    <p>The travel time matrix, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          t 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> associated with these 9 nodes is evaluated and shown in <xref ref-type="table" rid="table1">
      Table 1
     </xref>. Note that the diagonal elements of the travel time matrix 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          t 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> are zero, as the time taken to travel from node i to itself is inherently zero. By implementing the API, we obtain accurate and up-to-date travel times based on real-world traffic conditions, while also reducing the potential for human errors associated with manual time calculation. The travel times obtained from the API are subsequently integrated as a parameter into the vehicle routing model, facilitating a more efficient optimization process.</p>
    <table-wrap id="table1">
     <label>
      <xref ref-type="table" rid="table1">
       Table 1
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.137973-"></xref>Table 1. Travel time matrix (in minutes) showing the estimated travel times between the nine nodes, as calculated using the Google Maps Distance Matrix API. Each entry x<sub>ij</sub> represents the travel time from node i to node j.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="9.99%"><p style="text-align:center"></p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Node 0</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Node 1</p></td> 
       <td class="custom-bottom-td acenter" width="9.99%"><p style="text-align:center">Node 2</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Node 3</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Node 4</p></td> 
       <td class="custom-bottom-td acenter" width="9.99%"><p style="text-align:center">Node 5</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Node 6</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Node 7</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Node 8</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="9.99%"><p style="text-align:center">Node 0</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">0.00</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">41.22</p></td> 
       <td class="custom-top-td acenter" width="9.99%"><p style="text-align:center">23.83</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">20.47</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">27.30</p></td> 
       <td class="custom-top-td acenter" width="9.99%"><p style="text-align:center">9.48</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">21.73</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">28.28</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">11.38</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">Node 1</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">40.48</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.00</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">48.73</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">52.52</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">23.33</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">33.13</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">45.22</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">51.75</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">34.78</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">Node 2</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">24.42</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">48.10</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.00</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">10.67</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">31.93</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">28.07</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">4.52</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">8.55</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">15.50</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">Node 3</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">20.27</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">51.92</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">10.62</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.00</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">35.75</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">23.75</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">14.07</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">19.17</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">18.78</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">Node 4</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">25.38</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">22.98</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">31.60</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">35.38</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.00</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">29.58</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">28.08</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">34.63</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">17.67</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">Node 5</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">8.85</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">32.98</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">27.55</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">23.07</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">30.83</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.00</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">25.45</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">32.00</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">14.90</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">Node 6</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">22.47</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">44.58</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">4.62</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">14.05</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">28.42</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">26.67</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.00</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">6.55</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">11.98</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">Node 7</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">28.88</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">51.02</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">8.57</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">18.98</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">34.83</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">33.10</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">6.43</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.00</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">18.42</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">Node 8</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">10.48</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">33.95</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">15.23</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">18.57</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">17.78</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">14.68</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">11.72</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">18.27</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.00</p></td> 
      </tr> 
     </table>
    </table-wrap>
   </sec>
   <sec id="s3_2">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>3.2. Setting Parameters</title>
    <p>We first define all parameters used in the model before demonstrating the results. We use the travel time matrix, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          t 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> as defined in <xref ref-type="table" rid="table1">
      Table 1
     </xref>, i.e., we have a total of 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         n 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         9 
       </mn> 
      </mrow> 
     </math> nodes. Then, we set the number of available vehicles 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          n 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         3 
       </mn> 
      </mrow> 
     </math>, each with a maximum capacity of 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         Q 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         12 
       </mn> 
      </mrow> 
     </math>. The maximum arrival time for each vehicle is set to 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         T 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         90 
       </mn> 
      </mrow> 
     </math> minutes. The demands, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          d 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math> and the starts, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          e 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math>, and ends, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          l 
        </mi> 
        <mi>
          l 
        </mi> 
       </msub> 
      </mrow> 
     </math> of the time windows for each node are as follows,</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          d 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           3 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           2 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           2 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           3 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           2 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           0 
         </mn> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          e 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           50 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           40 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           30 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           20 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           35 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           45 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           55 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           0 
         </mn> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          l 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <mi>
           M 
         </mi> 
         <mo>
           , 
         </mo> 
         <mn>
           60 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           50 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           40 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           30 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           45 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           55 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           65 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           M 
         </mi> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>Note that the array of demands, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          d 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math> represents the demand at each node 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         i 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, hence 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          d 
        </mi> 
        <mn>
          0 
        </mn> 
       </msub> 
      </mrow> 
     </math> and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          d 
        </mi> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> are zero since there are no customers at the starting and ending points. Also, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          e 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math> and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          l 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math> representing the earliest and latest arrival time at each node 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         i 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, is set to be 10 minutes apart for the customer nodes. Meanwhile, the latest arrival time at the start and final nodes are set to 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         M 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         10000 
       </mn> 
      </mrow> 
     </math>, an arbitrarily large integer to allow the time windows at these nodes to be arbitrarily wide.</p>
   </sec>
   <sec id="s3_3">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>3.3. Solution Using PuLP</title>
    <p>The mathematical model is solved using the PuLP library in Python, which provides an interface to linear programming solvers. The complete Python script used for the linear optimization is listed in Appendix A.1.1. For the output results, instead of printing out a list of all optimised decision variables and manually inspecting each variable, the following approach processes the results and displays the actual sequence of node visits for each vehicle in an easily readable and understandable format.</p>
    <p>First, the status of the optimization model, i.e., whether it is infeasible or optimal, and the total cost of the solution, i.e., the value of the objective function z, are returned. It then collects the nodes visited by each vehicle, along with their respective arrival times. The nodes are then sorted by arrival time for each vehicle to match the actual route taken by each vehicle. This information is stored in a dictionary, where each vehicle is associated with its corresponding route. Also, the waiting time at each customer node is calculated by subtracting the sum of the previous arrival time and the travel time to that node from the arrival time at that customer node. Finally, the code generates a detailed route description for each vehicle, including the arrival time and the waiting time at each node, presented in sequence. From <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>, we see that the optimization returned an optimal status with a total routing time of 208.38 minutes across all vehicles, and a detailed route assignment for each vehicle.</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. Vehicle routing output.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1040907-rId129.jpeg?20241206112714" />
    </fig>
    <p>This method of printing the result gives a more insightful view of vehicle routes than simply reviewing the raw decision variables which is tedious and time consuming. While the output of the script is returned in only 4.239 seconds, the computation time may increase significantly with larger node counts; this matter will be discussed in Section 4.2 &amp; 4.3.</p>
   </sec>
   <sec id="s3_4">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>3.4. Visualization of Solution</title>
    <p>To plot visual representations of the solution, we utilized the matplotlib, NetworkX and Folium libraries in Python, resulting in two figures that illustrate the vehicle routing solution. Both plots display the nodes, including the central hub, customer locations, and the final drop-off station, with each vehicle’s route highlighted in distinct colours. The lines connecting the nodes represent the optimal sequence for picking up the customers associated with each vehicle. The arrival and waiting times, demands, and time windows at each node are annotated, providing a concise and descriptive routing solution that makes it easy for the user to determine whether a solution has been found which adheres to the inputted constraints.</p>
    <p>
     <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref> presents a detailed visual plot of the optimal route that was found by the algorithm. Each node in this figure represents a location with specified customer demands and time windows, showing that all vehicles depart from Ballinamallard and end at the drop-off station in Enniskillen, with arrival times clearly satisfying the maximum routing time of T = 90 minutes. Additionally, <xref ref-type="fig" rid="fig3">
      Figure 3
     </xref> offers a geographical context for the routing solution, showcasing the vehicle routes and nodes within the actual locations of customers and drop-off points, thereby further clarifying the distances involved in the routing problem.</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>Figure 2. Vehicle routing solution on a graph (Note that the graph is not drawn to scale).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1040907-rId130.jpeg?20241206112718" />
    </fig>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. Vehicle routing solution on a map.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1040907-rId131.jpeg?20241206112717" />
    </fig>
   </sec>
   <sec id="s3_5">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>3.5. Troubleshooting Infeasible Status</title>
    <p>In order to efficiently identify the causes of infeasibility in our vehicle routing model, a straightforward troubleshooting system is implemented. When the optimization model returns an infeasible status, the constraints that cannot be satisfied simultaneously are indicated. There are two primary potential causes of this infeasibility, namely time window and vehicle capacity violations.</p>
    <p>Time window violations occur due to several factors. One common issue arises from the total time horizon, T, being insufficient to transport all of the customers. If the time allowed for service, T is too short, and the vehicles may be unable to reach all nodes within their designated time frames. Additionally, if the time windows for customers are too concentrated and tight, it can create scheduling conflicts where the vehicles cannot feasibly travel to the nodes in time to meet their respective windows. On the other hand, vehicle capacity violations can occur if the total demand from the customers assigned to a vehicle exceeds its maximum capacity.</p>
    <p>Our troubleshooting implementation aims to quickly assess these two key issues. If a vehicle capacity violation is detected, the system outputs a clear message stating, “Vehicle capacity not satisfied.” If capacity is not the issue, the system then checks for time window violations and returns the message, “Time window not satisfied.” By simplifying the identification of key issues, this aids the user in adjusting the parameters accordingly, allowing the system to return a feasible solution.</p>
   </sec>
  </sec><sec id="s4">
   <title>
    <xref ref-type="bibr" rid="scirp.137973-"></xref>4. Discussion</title>
   <p>In this section, we discuss the model weaknesses, as well as the measures that must be taken to ensure that this mathematical model can be used in real-world scenarios, where the datasets can be arbitrarily large. A computation time analysis is also conducted to evaluate the efficiency and applicability of this model with different numbers of nodes. Finally, we discuss existing VRP models developed by other researchers and organisations.</p>
   <sec id="s4_1">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>4.1. Model’s Limitations</title>
    <p>There are a few limitations to this model. Firstly, this model is designed to accommodate only a single destination, which may not be sufficient for organisations with more complex routing needs. Additionally, the model does not incorporate AND/OR precedence constraints <xref ref-type="bibr" rid="scirp.137973-4">
      [4]
     </xref>, which can be critical for situations where certain locations must be visited together or in a specific order. The implementation of the precedence constraints will be addressed in Section 4.4.2. Also, we have assumed that the total cost incurred is directly proportional to the travel time of vehicles, hence our objective is to minimize it. However, this is not always the case, as there are additional costs such as driver wages, toll charges, environmental impact fees and vehicle maintenance that can vary independently of travel time. On the other hand, the model treats waiting time in the same way as travelling time, which may not accurately reflect real-world cost structures where waiting incurs significantly lower costs.</p>
    <p>Besides, the model assumes that all customers’ time window, location and the demands at each node are predetermined and constant, which allows for a structured approach to route optimization. However, real-world logistics often involve dynamic variables that our model does not account for, such as last-minute changes in customer requests. For example, unexpected customer requests or cancellations could require on-the-fly adjustments to routes. Also, one limitation of using the Google Distance Matrix API for travel time estimation is that it requires the specification of a future date and time. While this can be useful for planning in advance, it assumes that traffic conditions and travel durations can be reliably predicted, which may not always align with real-time traffic patterns. Unforeseen delays due to accidents, weather, or sudden congestion cannot be accounted for in these estimates, potentially reducing the accuracy of the model under real-world conditions. Finally, for a general application, the number of nodes and available vehicles can be arbitrarily large, thus in the following subsections, we conduct an analysis on the model’s computation time and explore methods to adapt our model for realistic parameters.</p>
   </sec>
   <sec id="s4_2">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>4.2. Computation Time Analysis</title>
    <p>In this subsection, we conduct a computation time analysis for the algorithm proposed by running simulations across various node counts, n. The Python script utilised in this subsection can be found in Appendix A.1.3. The objective of this analysis is to evaluate the model’s efficiency and scalability as the problem size increases. The dataset for this analysis was generated using the following fixed parameters:</p>
    <p>In addition to these fixed parameters, the following random values were used for each simulation instance:</p>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>Figure 4. Computation times for node counts n ranging from 4 to 13, graphed on a logarithmic scale. The bars represent the median computation times obtained from 20 simulations for each node count, while the error bars indicate the 5th and 95th percentiles, representing the 90% confidence limits. The analysis was conducted using Google Colab.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1040907-rId138.jpeg?20241206112724" />
    </fig>
    <p>The computation times were recorded and plotted for each node count n, ranging from 4 to 13, focusing on the median, 5th, and 95th percentiles, with each node count simulated 20 times, as illustrated in <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>. Given the relatively relaxed parameters of the constraints, all simulations returned feasible optimal solutions. The simulations were run in Google Colab, and it is worth noting that these results can be significantly improved when run locally on a high-performance computer, as Colab’s virtual environment imposes certain limitations on computational efficiency. The results project a clear trend: as the number of nodes increases, computation times grow significantly, with more variability at larger node counts. In particular, the problem becomes more computationally expensive beyond 10 nodes, with the upper 5 percent of simulations taking over a minute to compute.</p>
    <p>This analysis highlights the importance of scalability for real-world applications, as the computation time increases exponentially with larger problem sizes. The data indicates that the model’s performance is manageable for smaller node counts. Therefore, in the following subsection, we introduce an improvement to this model aimed at enhancing its efficiency for larger instances.</p>
   </sec>
   <sec id="s4_3">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>4.3. Scalability Using Node Partitions</title>
    <p>In real-world scenarios, the number of nodes and available vehicles in a system can be exceedingly large. This increased complexity can lead to significant computational challenges, resulting in unrealistic computation times when solving for the optimal solution as demonstrated in <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>. To address this issue and improve scalability, we discuss an approach which splits the nodes into partitions, treating each partition as an independent sub-system. Each partition consists of a set of nodes, and vehicles are assigned from the fleet to service these nodes. The partitions can be based on user preferences or through clustering of nearby locations. This method provides several benefits:</p>
    <p>By implementing this partitioning method, organisations can enhance the effectiveness of the model proposed, leading to more efficient solutions within complex transportation networks.</p>
   </sec>
   <sec id="s4_4">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>4.4. Other Advanced VRP Methods</title>
    <p>The selection of an appropriate VRP method depends on the specific features of the dataset, the constraints of the problem, and the desired balance between solution quality and computational time. In this subsection, we review existing available VRP tools and the work of other researchers, highlighting the unique use cases and applications for their VRP models.</p>
    <p>Google OR-Tools <xref ref-type="bibr" rid="scirp.137973-7">
      [7]
     </xref> is an open-source software suite designed for solving various optimization problems, including the Vehicle Routing Problem (VRP), through advanced algorithms that enhance routing and scheduling efficiency. While OR-Tools is highly effective in delivering quick solutions for large datasets, our proposed model offers distinct advantages for small-scale logistics operations where specific operational constraints and passenger needs are prioritized. While Google OR-Tools is widely used for complex optimization problems across various industries, our model offers a simpler user interface that requires no technical expertise, making it more accessible for smaller organisations and non-technical users. This design allows operators to easily input parameters and constraints while delivering robust optimization solutions. It also incorporates a built-in troubleshooting system to easily identify infeasibilities due to parameter conflicts. Additionally, the organisations often benefit from focusing on constraint satisfaction, rather than only computational efficiency, which makes our approach valuable despite lacking the speed advantage of more generalized solvers.</p>
    <p>The Vehicle Routing Problem with AND/OR Precedence Constraints and Time Windows framework proposed by Roohnavazfar et al. (2022) <xref ref-type="bibr" rid="scirp.137973-4">
      [4]
     </xref>, addresses an additional constraint of requiring that for a given node, all AND-type predecessors must be visited before it and at least one OR-type predecessor must be visited before it. In the context of transport service, the AND precedence constraint becomes particularly relevant when there are multiple drop off locations in a single journey. To ensure all passengers are on board before commencing drop-offs, every drop-off node must be designated as a successor to all pickup nodes. This constraint guarantees that the vehicle only begins dropping off passengers after completing all pickups, avoiding contradicting routes, and ensuring a more organized and systematic journey for all passengers. Of course, this approach introduces significantly more computational complexities, as the number of constraints increases, making it more challenging to find optimal or even feasible solutions. Also, adhering to the precedence relationships may lead to less efficient routes in terms of distance or travel time.</p>
    <p>Heuristic algorithms <xref ref-type="bibr" rid="scirp.137973-3">
      [3]
     </xref> are approximation methods designed to find near-optimal solutions to complex optimization problems within an acceptable time-frame. There is no guarantee that these techniques will find an optimal solution but they are computationally efficient and are thus able to handle large data sets. Metaheuristics <xref ref-type="bibr" rid="scirp.137973-4">
      [4]
     </xref> represent a more sophisticated class of heuristic algorithms that incorporate mechanisms to explore the solution space more comprehensively. Some common metaheuristics for VRP include:</p>
   </sec>
  </sec><sec id="s5">
   <title>
    <xref ref-type="bibr" rid="scirp.137973-"></xref>5. Conclusions</title>
   <p>In this project, we have proposed a complete elementary solution to the Vehicle Routing Problem (VRP). Unlike more advanced VRP solutions, which often require significant computational resources and specialized expertise, this model offers a practical balance of simplicity, cost-effectiveness, and adaptability for smaller-scale operations suitable for volunteer or charity organisations. The model’s Python-based code is entirely written from scratch, making it straightforward to understand, troubleshoot, and modify. This eliminates the need to hire specialized technical personnel to implement or manage routing optimizations. One of the primary advantages of this model lies in its ease of use and self-sufficiency, as all concepts and parameters are comprehensively documented within this paper. This approach not only simplifies parameter input but also reduces the time and resources necessary for organisations to manage and adapt the model to their needs.</p>
   <p>Additionally, the model can be extended to handle return journeys by inverting the start and end nodes, making it well-suited for transporting passengers both to and from their destinations. While computation time may be longer compared to advanced VRP methods, the trade-off is manageable for small-scale logistics organisations with smaller network of nodes and simpler routing requirements. Ultimately, this model is an elementary yet effective solution to the VRP, serving as a low-cost, efficient routing tool to provide essential transport services in a systematic, reliable, and economically feasible manner.</p>
   <p>To build on this research, several extensions for future works could improve its practical applications. Automating the node partitioning process using an algorithm to group nearby locations into subsystems could provide near-optimal solutions, allowing the script to handle larger problem instances. This approach would make the tool more robust for complex, real-world logistics by reducing problem complexity and focusing computational resources on smaller, manageable sub-problems. Such clustering strategies could significantly reduce computational expenses and time. Additionally, it is worth researching other heuristics or metaheuristic approaches to implement in the Python script, as these could further reduce the time required to generate near-optimal solutions compared to exact methods. These extensions would make the model better suited for real-time applications where quick, feasible approximations are more prioritized than exact solutions.</p>
  </sec><sec id="s6">
   <title>Acknowledgements</title>
   <p>We would like to express our sincere gratitude to Jason Donaghy, manager of Fermanagh Community Transport, for his insights into real-world logistics operations and for providing crucial datasets that informed this work. Kai Lian is also thankful to Dr. Salissou Moutari, reader at Queen’s University Belfast, whose feedback and assistance were invaluable in the completion of this research. The use of AI tools is acknowledged, which has facilitated a few aspects of this research, including assistance in scripting the Python code for solving the mathematical model. Finally, Kai Lian wishes to thank his colleague Jyoutir, whose inspiration led to the implementation of the Google Maps API, greatly enhancing the project’s scope and applicability.</p>
  </sec><sec id="s7">
   <title>
    <xref ref-type="bibr" rid="scirp.137973-"></xref>Appendix</title>
   <p>In this section, we provide the complete Python script implemented for this proposed Vehicle Routing Problem (VRP).</p>
   <sec id="s7_1">
    <title>
     <xref ref-type="bibr" rid="scirp.137973-"></xref>A.1. Python Script</title>
    <p>The complete Python code for solving the mathematical model, implementing Google API and conducting computation time analysis is presented. This Python script can be executed in any environment that supports Python, such as Jupyter Notebook or Google Colab. To ensure proper functionality, the following packages must be installed: Pulp, Requests, Matplotlib, and NetworkX. Use the following commands to install the required packages:</p>
    <p>!pip install pulp</p>
    <p>!pip install requests</p>
    <p>!pip install matplotlib</p>
    <p>!pip install networkx</p>
    <p>The mathematical model proposed in Section 2 is solved using the following script, which generates the output shown in <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>. Users are required to input the parameters between lines 7 and 16. The travel time matrix, located at line 18, is automatically input from the Google Maps API request script, Listing A.1.2.</p>
    <p>
     <xref ref-type="bibr" rid="scirp.137973-"></xref></p>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId147.jpeg?20241206112747" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId148.jpeg?20241206112746" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId149.jpeg?20241206112746" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId150.jpeg?20241206112748" /></p>Listing 1. Vehicle routing problem optimisation script.<xref ref-type="bibr" rid="scirp.137973-"></xref>A.1.2. Google Maps APIThis script must be executed first to generate the travel time matrix required in Listing A.1.1, as illustrated in <xref ref-type="table" rid="table1">
        Table 1
       </xref>. Users should input their API key on line 7, and the address of the nodes starting from line 10. It is recommended to include the zip code to accurately identify and differentiate places with generic names. Additionally, the number of days in advance for which travel data is needed should be specified on line 21, while the departure time should be entered on line 22. The script outputs two matrices: one for the travel time, used in Listing A.1.1, and another annotated matrix for further details and reference.<p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId151.jpeg?20241206112750" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId152.jpeg?20241206112750" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId153.jpeg?20241206112750" /></p></title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1040907-rId145.jpeg?20241206112747" />
    </fig>
    <fig id="fig6" position="float">
     <label>Figure 6</label>
     <caption>
      <title>Listing 2. Google map API request script.<xref ref-type="bibr" rid="scirp.137973-"></xref>A.1.3. Computation Time AnalysisThis script is utilized in the Computation Time Analysis 4.2 to access the run time of the optimization script in Listing A.1.1. The model’s fixed parameters are located between lines 10 and 13, while the range of the random parameters, which can be altered according to needs, are specified between lines 16 and 21. Additionally, the number of nodes and the number of simulations for each set of nodes are entered in lines 24 and 25. This script prints the 5th and 95th percentiles, along with the median of the time taken for the script to run for each node count. Additionally, it generates a histogram of the median on a logarithmic scale, with error bars representing the 5th and 95th percentiles. The number of feasible and infeasible states for each node count is also annotated below the histogram.<p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId155.jpeg?20241206112752" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId156.jpeg?20241206112752" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId157.jpeg?20241206112751" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId158.jpeg?20241206112751" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId159.jpeg?20241206112751" /></p><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1040907-rId160.jpeg?20241206112753" /></p>Listing 3. Computation time analysis script.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1040907-rId154.jpeg?20241206112750" />
    </fig>
   </sec>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.137973-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Transport: Fermanagh Community Transport: Northern Ireland. &gt;https://www.fermanaghcommunitytransport.com/ 
    </mixed-citation>
   </ref>
   <ref id="scirp.137973-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Derbel, H., Jarboui, B., and Siarry, P. (2020) Green Transportation and New Advances in Vehicle Routing Problems. Springer International Publishing.
    </mixed-citation>
   </ref>
   <ref id="scirp.137973-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Laporte, G. (2007) What You Should Know about the Vehicle Routing Problem. Naval Research Logistics, 54, 811-819. &gt;https://doi.org/10.1002/nav.20261
    </mixed-citation>
   </ref>
   <ref id="scirp.137973-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Roohnavazfar, M., Pasandideh, S.H.R. and Tadei, R. (2022) A Hybrid Algorithm for the Vehicle Routing Problem with and/or Precedence Constraints and Time Windows. Computers &amp; Operations Research, 143, Article 105766. &gt;https://doi.org/10.1016/j.cor.2022.105766
    </mixed-citation>
   </ref>
   <ref id="scirp.137973-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Goel, A. and Gruhn, V. (2008) A General Vehicle Routing Problem. European Journal of Operational Research, 191, 650-660. &gt;https://doi.org/10.1016/j.ejor.2006.12.065
    </mixed-citation>
   </ref>
   <ref id="scirp.137973-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Google Distance Matrix API. &gt;https://developers.google.com/maps/documentation/distance-matrix/overview 
    </mixed-citation>
   </ref>
   <ref id="scirp.137973-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Google OR-Tools: Optimizing Routing and Scheduling Problems. &gt;https://developers.google.com/optimization
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>