Smart Scheduling: An Integrated First Mile and Last Mile Supply Approach

Supply chain management applies more and more Industry 4.0 innovations to increase their availability, elasticity, sustainability, and efficiency. In interconnected logistics networks, operations are integrated from suppliers through 3rd party logistics providers to customers. There are different delivery models depending on the time and cost. In the last few years, a wide range of customers is willing to pay an extra fee for the same delivery or instant delivery. This fact led to the increased importance of the optimized design and control of first mile/last mile (FMLM) delivery solutions. Cyberphysical system-based service innovations make it possible to enhance the productivity of FMLM delivery in the big data environment. The design and operation problems can be described as NP-hard optimization problems. These problems can be solved using sophisticated models and methods based on heuristic and metaheuristic algorithms. This research proposes an integrated supply model of FMLM delivery. After a careful literature review, this paper introduces a mathematical model to formulate the problem of realtime smart scheduling of FMLM delivery. The integrated model includes the assignment of first mile and last mile delivery tasks to the available resources and the optimization of operations costs, while constraints like capacity, time window, and availability are taken into consideration. Next, a black hole optimization(BHO-) based algorithm dealing with a multiobjective supply chain model is presented. The sensitivity of the enhanced algorithm is tested with benchmark functions. Numerical results with different datasets demonstrate the efficiency of the proposed model and validate the usage of Industry 4.0 inventions in FMLM delivery.


Introduction
The technologies of Industry 4.0 affect the connection of products, customers, production, and service companies. Digitization makes the supply chain solutions more efficient, flexible, and customer-focused. Key technologies, like smart logistics and warehousing and advanced analysis of information, will lead to the digital supply chain. In complex supply chain solutions, like first mile or last mile logistics, the application of these key technologies transforms separated supply chain solutions into interconnected logistics systems.
The increased complexity of these interconnected logistics networks needs new algorithms to solve the NP-hard optimization problems of these large-scale networks.
The design and operation of first mile and last mile supply chains include a huge number of problems: facility location, routing, scheduling, design of loading unit building and packaging processes, budgeting, warehousing, and assignment or queuing.
The model presented in this work combines the first mile and last mile operations of different package delivery companies and shows an optimization method to solve the real-time smart scheduling problem of open tasks in the interconnected logistics network. To our best knowledge, the design of FMLM supply chain has not been considered in the current literature.
The main contributions of this work include (1) an integrated model of FMLM delivery, (2) an enhanced black hole optimization-based algorithm, (3) a test of the modified black hole algorithm (BHA) with different datasets and test functions, and (4) computational results of FMLM delivery problems with different datasets. This paper is organized as follows: Section 2 presents a literature review, which systematically summarizes the research background of FMLM supply. Section 3 describes the model framework of the FMLM supply chains including the use of Industry 4.0 innovations. Section 4 presents an enhanced black hole optimization and supposes some modification to improve the convergence and enhance its efficiency. Section 5 demonstrates the sensitivity analysis of the algorithm based on CEC 2014 functions. For our study, in Section 6, we focus on the optimization results with numerical analysis. Conclusions and future research directions are discussed in Section 7.

Literature Review
There exist a huge number of articles related to the FMLM supply chain design. To build a link between literatures and this research work, we are focusing on the previous research works and results to find research gaps. Our methodology of a structured literature review includes four main steps [1]: (i) Search for articles in databases and other sources, like Scopus, Science Direct, and Web of Science.
(ii) Reduce the number of articles by reading the abstract and identify the main topic.
(iii) Define a methodology to analyze the chosen articles.
(iv) Describe the main scientific results and identify the scientific gaps and bottlenecks.
Firstly, the relevant terms were defined. It is a crucial phase of the review, because there are excellent review articles in the field of supply chain design and we did not want to produce an almost similar review, but we applied the presented methodology. We used the following keywords to search in the Scopus database: "last mile" OR "first mile" AND "supply." Initially, 137 articles were identified. This list was reduced to 50 articles selecting journal articles only. Our search was conducted in January 2018; therefore, new articles may have been published since then.
In the following step, the 50 articles were reduced after reading the abstracts. We excluded articles, in which the topics did not catch our interest and the smart scheduling of FMLM delivery cannot be addressed. After this reduction, we got 34 articles.
The reduced articles can be classified depending on the subject area. Figure 1 demonstrates the classification of these 34 articles considering ten subject areas. This classification shows the importance of multidisciplinary approach and the majority of mathematics, optimization and decision making in the design, and operation of complex, interconnected systems.
As Figure 2 demonstrates, the FMLM delivery as a new trend in supply chain solutions has been researched in the past decade. The first article in this field was published in 2005 [2], and it was focusing on customer satisfaction with order fulfillment in retail supply chains. The number of published papers has been increased in the last years; it shows the importance of this research field.
The distribution of the most frequently used keywords is depicted in Figure 3. As the keywords show, FMLM delivery is especially important for e-commerce solutions and humanitarian supply chains, and the optimization is based on many cases in integer programming, but in the case of NP-hard problems heuristic and metaheuristic solutions have to be taken into consideration.
We analyzed the articles from the point of view of scientific impact. The most usual form to evaluate articles from the point of view of scientific impact is the citation. Figure 4 shows the 10 most cited articles with their number of citations.
It remains a key challenge for supply chain solutions to make the best decisions related to FMLM delivery. In recent years, there have been many studies solving optimization problems of FMLM supply related to design and operation using bilevel multiobjective optimization with time window [3], Benders decomposition-based branch-and-cut algorithm to solve two-level stochastic problems of the last mile relief network [4], or a visual interactive simulation application for minimizing risk and improving outbound logistical efficiency in time-sensitive attended home deliveries and services [5]. Empirical evidences are also used by researches [2,6] and comparative studies also analyze e-commerce solutions and traditional trade channels from last mile solutions, costs, energy efficiency [7], and carbon emission point of view [8]. The comparative studies show that FMLM solutions have a high share in total logistics costs [9].
Last mile delivery and last mile supply are living optimization problems in a wide range of the economy [10,11], but the literature includes a great number of articles in the field of humanitarian logistics. Sudden onset disaster such as hurricane or earthquake creates a stochastic, chaotic environment to distribute humanitarian relief to the victims [12]. The relief items are usually delivered from temporary warehouses to the points of distribution (POD). The most important objective function is the minimization of the response time to provide required items to the victims. Integrated models and algorithms make it possible to solve multiobjective optimization problems, like facility location [13], inventory assignment, resource optimization, and routing [14]. Disaster operation can be modelled with two-stage relief chain consisting of a single staging area where donations arrive over time in uncertain quantities, which are distributed to victims located at the POD [15]. The last mile humanitarian efforts can be based on microretailers as last mile nodes, especially in Asia, where it is possible to use social enterprises as coordinators of supply chains for the distribution of items for victims [16]. Technology-enabled cooperation based on Industry 4.0 innovations can help facilitate collaboration through the supply chain [17,18]. The supply chain operation reference (SCOR) can be applied for the metrics of logistics processes in the disaster area, but the metrics does not cover last mile options [19].
Complexity is the most important characteristic of supply chain solutions. Complexity can be measured in different fields of supply chain and logistics. The design and operation of complex supply chain processes can be described as NPhard optimization problems [20]. These problems can be   3 Complexity solved using sophisticated models and methods based on metaheuristic algorithms, like black hole optimization [21]. Inventory management systems represent another important research field, where stochastic reliability measurement and design optimization are the main research directions [22]. Different types of biomass, like energy grass or forest biomass, have gained increasing interest in the recent years as a renewable source of energy, where predictive control methodology approaches in multilayer models become more and more important [23]. Not only design but also control strategies can be represented as NP-hard optimization problems, where simulation methods can also be used to find optimal solutions [24]. Complex network topology metrics is popular to analyze social networks, like Facebook, Twitter, or ResearchGate, but there are new novel complexity indicators, like line balancing rate and number of intercell and intracell flows to describe manufacturing layouts [25]. The complexity can be influenced by many factors, but in today's economy, one of the most important influencing factors is the price competition, which influences the pricing strategy. The design and operation of blending technologies represent a special field of supply chain management because of the significant approach of technological and logistic aspects. Approaches take technological and logistic aspects into consideration, and research results confirm that outsourcing is a valuable cost-cutting tool for blending technologies [26].
Intelligent retail environment, product enhancement, interconnected supply chain, and data-driven business are the key factors of successful FMLM processes. The last mile logistics has been characterized as the most expensive part of the supply chain, featuring negative impacts on pollution and operation costs. However, in densely populated areas, the number of possible material flow paths is extremely increased, but in this case, there is a great possibility to optimize the last mile solutions. The integration of last mile and first mile solutions increased the complexity of supply chains. Improving the efficiency of FMLM delivery is a major driver for the success of e-commerce [27]. Multichannel approach, mobile commerce, and data-driven marketing have accelerated the improvement of e-commerce solutions; e-commerce intelligent systems have a great impact on the reengineering of the e-order fulfilment process [28].
The recent interest in the expansion of FMLM supply in emerging economies in Africa and Asia has been greatly debated in the literature; firm expansion [29], distribution of medicines [30], development of urban transportation and freight parking system in densely populated areas [31], and food supply chain improvement [32] are the main research topics.
The analysis, evaluation, and development of FMLM solutions are areas of research which have shown remarkable growth over the last few years. Researchers investigated new evaluation and measurement methods and tools to improve the design methods including integrated facility location and routing problems [33,34], development of strategic planning framework [35,36], or stochastic facility routing [37]. Third-party logistics (3PL) providers allow the management to outsource processes of supply chain functions. Their services can include a wide range of first mile or last mile operations, like warehousing, loading and unloading, packaging, shipment, and collection [38].
The optimal design and operation of FMLM processes and operations have a great environmental impact; therefore, it is important to integrate environmental aspect into the design aspects, objective functions, and constraints of the engineering and business problem. It is especially true in densely populated areas. Researches examine different solutions of online and traditional retail supply chains in order to assess their relative environmental impacts [39]. The most important field of environmental impact-related researches is focusing on services through road transport. Researches show that first mile and last mile trips with transit may increase multimodal trip emissions significantly, mitigating potential impact reductions from transit usage [40]. Environmental impact can be measured in city logistics solutions; pollution and urbanistic considerations led to a change in the use of private vehicles, and the application of new technologies in dense city centers is used more and more often, like accelerating moving walkways [41].
Heuristics and metaheuristics are used in all fields of engineering [42]. BHO is inspired by the behavior of exotic and powerful places in the space, where gravitation forces are so high that all particles were trapped reaching the event horizon. BHO is a simplified particle swarm optimization (PSO) method with inertia weight represented by gravitational forces of black hole and stars [43]. BHO is an efficient global search technique, which can be implemented in a binary, discrete, or continuous form. A binary black hole algorithm (BBHA) is used for feature selection and classification on biological data [44]. A continuous black hole algorithm is used to investigate the critical slip surface of soil slope [45] and to support the nondestructive diagnosis of wiring networks. In this research, the combination of BHA and time domain reflectometry shows that BHA can be implemented in real-world systems [46]. BHO can be combined with other heuristic algorithms to improve its efficiency and convergence. The integration of the core of swarming optimization methods can increase the efficiency of preprocessing, transfer functions, and the discretization [47].
More than 50% of the articles were published in the last 4 years. This result indicates the scientific potential of this research field. The articles that addressed the optimization of first mile and last mile deliveries are focusing on routing, facility location, strategy framework, environmental impact, and comparison, but none of the articles aimed to identify the real-time optimization aspects of FMLM supply. Therefore, smart scheduling in integrated first mile and last mile solutions still need more attention and research. According to that, the main focus of this research is the modelling and analysis of integrated FMLM supply using smart scheduling based on the use of Industry 4.0 innovations.
The aim of this paper is to investigate the effect of realtime smart scheduling on the efficiency of FMLM supply. The contribution of this paper to the literature is twofold: (1) description of an integrated model of FMLM delivery including the optimization problem of assignment of first mile and last mile delivery tasks to delivery routes and facility 4 Complexity location and assignment and (2) development of a blackhole-based algorithm to solve the smart scheduling problem.

Model Framework
In traditional less than load shipping (LTLS), most deliveries are performed in the morning and pickup operations are made in the afternoon. It this case, the first mile operations (pickups) and the last mile operations (deliveries) are separated. The model framework of the smart scheduling in FMLM delivery makes it possible to analyze the possibilities of integrated handling of deliveries and pickup operations to optimize the operation costs and the utilization of resources, like package delivery trucks, drivers, and hubs.
Hubs have played an important role in traditional delivery solutions, but the application of Industry 4.0 inventions makes it possible to redefine the hub and spoke centralized transport topology optimization paradigm. There are two different types of deliveries: (1) scheduled deliveries, which are scheduled and assigned to delivery trucks, and (2)  The decision variables describe the decisions to be made. In this model it must be decided: (a) which open tasks by which package delivery truck in which time is picked up or (b) which package delivery truck delivers the package to the destination through which hubs. These decisions represent the abovementioned assignment and scheduling problem. With this in mind, we define the following positions describing the layout of the interconnected logistics network:  The objective function of the problem describes the minimization of the costs of the whole delivery process.
where C S is the costs of scheduled delivery routes without any assigned open task, C SF is the costs of loading and traveling from the hub or spoke to the first destination, C ST is the costs of traveling from the last destination to the hub including unloading, C OP is the pickup costs of assigned open tasks, and C OD is the delivery cost of assigned open tasks. The first part of the cost function (2) includes the sum of transportation costs of scheduled delivery routes without assignment of open tasks, where the transportation routes are the function of positions of delivery and pickup points and the load influences the specific transportation costs: where c i is the specific transportation cost of delivery truck i, q i,j is the load of delivery truck i passing delivery point j, and l ij is the length of the transportation route i between destination j and destination j + 1.
The second part of the cost function (2) includes the costs of loading and traveling from the hub or spoke to the first destination: The third part of the cost function (2) includes the costs of traveling from the last destination to the hub including unloading: The fourth part of the cost function (2) includes the pickup costs of assigned open tasks: where β i is the number of assigned open tasks to delivery route i, x k,i,j is the assignment matrix of pickup operations of open tasks to scheduled delivery routes as the decision variable, l i,j,k is the transportation length between the scheduled destination j and the pickup destination of the open task j, and l i,k,j+1 is the transportation length between the pickup destination of the open task and the scheduled destination j + 1.
The fifth part of the cost function (2) includes the delivery costs of assigned open tasks: where Q max i is the maximum capacity of delivery truck i.

Constraint 2.
It is not allowed to exceed the upper and lower limits of pickup and delivery operation time in each scheduled destination within the time frame.
where τ  x k,i,j · τ ao i,j,k + τ ao i,k,j+1 ≤ τ dmax k , 10  It follows directly from (9) and (10) that where τ The decision variables can only assume binary values, so we associate restrictions with the abovementioned decision variables.
x * k,i,j ∈ 0, 1 ⋀x k,i,j ∈ 0, 1 12 and in the same way, the assigned open task increases the capacity utilization of the delivery truck after pickup operation and decreases after delivery operation: The time window and the capacity of delivery trucks make the optimization problem more complicated. Without constrained time window and capacity, the open tasks can be assigned to the nearest delivery point of the delivery route, as seen in Figure 6

Discrete Black Hole Algorithm
Black holes are exotic and powerful places in the outer space where the gravitation forces are so high that it can trap not only particles, planets, and stars but also light. Black holes are born when stars die. Dying stars reach a point with zero volume and infinite density and become a singularity. The environment of black holes can be analyzed, but the black holes are invisible. The Schwarzschild radius is the radius of the event horizon. The distance between particles and the black hole has a great impact on the behavior of the particles. If the distance between a star and a planet is much higher than the Schwarzschild radius, then the particle can move in any directions. If this distance is larger than the Schwarzschild radius but this difference is not too much, the spacetime is deformed, and more particles are moving towards the center of the black hole than in other directions. If a particle reaches the Schwarzschild radius, then it can move only towards the center of the black hole (Figure 7). The black hole optimization is based on this phenomenon of black holes [26].
The first phase of the black hole optimization is the so-called big bang, when an initial population of stars is generated in the search space. Each star represents one candidate solution of the optimization problem. The coordinates of the star in the n-dimensional search space represent the decision variables of the n-dimensional optimization problem.
The second phase of the algorithm is the evaluation of the stars with an objective function.
The third phase is to choose one black hole. It is possible to choose more than one star as the black hole, but in this case, the algorithm is almost similar as gravity force optimization. Black holes are the stars with the highest gravity force, with the highest value of objective function.
The fourth phase of the algorithm is to move the stars towards the black hole in the search space. The operator to calculate the new position of stars takes only the gravity force between stars and the black hole into account, and the gravity force among stars is neglected. The movement of the stars is a discrete process because of the integer decision variables.
The movement of stars towards the black hole changes the decision variables of the solution represented by the moving star so that the decision variables will move to the decision variables of the best solution represented by the black hole. Figure 8 shows the movement of stars in the case of the two-dimensional Ackley function (23).
Stars reaching the photon sphere are forced to travel in orbits. The radius of the photon sphere is written as where g is the gravitational constant, m is the mass of the black hole, and c is the speed of light in vacuum. Stars reaching the event horizon will be absorbed, and a new star, representing a new candidate solution of the optimization problem, is generated in the search space. The radius of the event horizon (the Schwarzschild radius) is calculated as follows: where r SS is the radius of the event horizon, f BH is the gravity force of the black hole, and f S i is the gravity force of the ith star. The generation of the new stars is based on the big bang phase of the big bang big crunch (BBBC) algorithm, 7 Complexity where new individuals (stars) are generated around the center of mass.
where θ is a constant, N 0, 1 is a random number according to a standard normal distribution, and ε is the iteration number [48].
The fifth phase is the evaluation of stars. Stars with the best gravity force become the new black holes, and the old black holes become stars. This phase of the black hole algorithm avoids trapping into local optimum. Termination criteria of the algorithm can be the number of iteration steps, computational time, or the measure of convergence.

Sensitivity Analysis
Within the frame of this chapter, the sensitivity analysis of the black hole algorithm is described. In continuous cases,   Figure 7: Impact of the distance between particles and event horizon (Schwarzschild radius) on the behavior of particles.
8 Complexity there is a wide range of benchmarking functions to evaluate heuristics and metaheuristics [49], but in the case of discrete algorithms, these benchmarking functions can be used with constraints. Within the frame of this section, we evaluate the sensitivity of the algorithm with benchmark functions in the case of continuous problems:  with a search domain of x, y ∈ −10, 10 and four global minimums.
As Table 1 demonstrates, the combination of the BHO and BBBC algorithms decreases the error value after 50 iteration steps. As Figure 9 shows, the results of BHBBBC algorithm are comparable with the other three algorithms. Table 2 demonstrates the impact of the numbers of decision variables on the required iteration steps to reach the defined accuracy. We added some n-dimensional benchmark function as follows: (xi) Elliptic function: with a search domain of x i ∈ −100,100 and a global minimum of v 0, … , 0 = 0.
As Table 2 shows, the increased size of the problem led to the increase of the required iteration steps to reach the defined accuracy of a = 5 · 10 −6 .

Smart Scheduling of FMLM Delivery
Within the frame of this chapter, case studies are analyzed. The purpose of this chapter is to analyze the smart scheduling possibilities of smart scheduling to validate the usage of Industry 4.0 inventions in FMLM delivery. Scenario 1 is described in Figure 10.
Scenario 1 is a simple model with time window and constrained loading capacity, where the usability of the abovementioned algorithm is demonstrated. Scenario 1 includes three different package delivery routes of three different companies. The purpose of this demo problem is to assign the open task (pickup as first mile operation) to a possible route and deliver the product to the destination (delivery as last mile operation) to minimize the costs of the delivery (1), while constraint, like time window and capacity, is taken into consideration ( (7), (8), (9), and (10)). Table 3 shows the time window and the scheduled delivery and pickup times.
The loading capacity of each delivery trucks is 180 large brown postal boxes (430 mm × 300 mm × 180 mm), and the initial loadings at the first destinations are q 1,1 = q 2,1 = q 3,1 = 100. The pickup time of the open task is between 9:00 and 12:00, and the delivery time must be between 12:00 and 15:00. Table 4 demonstrates the quantity of scheduled pickup and delivery operations.
This simple optimization problem can be solved with the 1-dimensional version of the above-described BHBBBC algorithm. The optimization algorithm resulted the following: the open task can be picked up after the 2nd destination of the 2nd route, and the delivery is after the 4th destination ( Figure 11). Scenario 2 shows the optimization results of a larger system. There are four routes from four different package delivery services. The initial routes were scheduled without any cooperation. The scenario demonstrates the real-time smart scheduling possibility of four open tasks using floating car data captured from triangulation, vehicle reidentification, GPS-based methods, or smartphone-based monitoring ( Figure 12).
As Figure 7 shows, the assignment of open tasks takes into consideration not only the time window but also the constrained capacity of delivery trucks. In the case of open task 2, the pickup operation is scheduled to the nearest scheduled delivery destination p SC 2,4 , but the delivery operation cannot be scheduled after the nearest scheduled delivery p SC 2,12 , because of the constrained truck capacity: As Figure 13 shows, in the case of Scenario 2, the nearest pickup and delivery destination would lead to the overload of the delivery truck, while in the case of a shifted delivery destination, the loading capacity is not exceeded. 10 Complexity The above-described optimization of the first mile last mile supply chain can lead to increased efficiency, flexibility, and availability, while the value of each environmental indicators and operation costs are decreased.

Conclusions and Further Research Directions
Industry 4.0 solutions make it possible to improve traditional supply chain solution in hyperconnected logistics systems. This study developed a methodological approach for real-time smart scheduling of the first mile last mile delivery of cooperating delivery companies. In this paper, firstly, we review and systematically categorized the recent works presented for the design of FMLM supply. Then, motivated from the gaps in the literature, a model for cooperating FMLM supply is developed. We proposed a general model. The described model includes different delivery routes of different companies, where the cooperation is based on Industry 4.0 solution including vehicle reidentification, GPS-based methods, and smartphone-based monitoring. The smart scheduling means the real-time optimization of the assignment of open tasks to the scheduled routes depending on the captured information from the running processes. The smart scheduling problem was solved with a newly developed metaheuristic combining the BHO and BBBC algorithms. The sensitivity analysis showed the efficiency of the integration of both swarming heuristics.
The scientific contributions of this paper are the following: a model for the integrated real-time scheduling of first mile and last mile operations in a package delivery  4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 Value of objective function in logarithmic scale   11 Complexity environment, where the hyperconnected operation is based on Industry 4.0 solutions, and a new metaheuristic combining the black hole optimization and the big bang big crunch algorithm. The results can be generalized, because the model can be applied to different supply chain applications, especially in the case of a multitier supply chain for the automotive industry. The described methods make it possible to support managerial decisions; the operation strategy of the package delivery companies and the cooperation contract among them can be influenced by the results of the above-described contribution.
However, there are also directions for further research. In further studies, the model can be extended to a more complex model including additional constraints, like availability of human resources or the stochasticity of the parameters. This study only considered the BHBBBC optimization as the possible solution algorithm for the described NP-hard problem.

Complexity
In reality, other heuristic methods can be also suitable for the solution of this problem. The convergence of the described algorithm can be improved using enhanced operators, and the behavior of the described metaheuristics to other optimization approaches can be tested. This should be also considered in the future research.