Real-Time Decision Making in First Mile and Last Mile Logistics: How Smart Scheduling Affects Energy Efﬁciency of Hyperconnected Supply Chain Solutions

: Energy efﬁciency and environmental issues have been largely neglected in logistics. In a traditional supply chain, the objective of improving energy efﬁciency is targeted at the level of single parts of the value making chain. Industry 4.0 technologies make it possible to build hyperconnected logistic solutions, where the objective of decreasing energy consumption and economic footprint is targeted at the global level. The problems of energy efﬁciency are especially relevant in ﬁrst mile and last mile delivery logistics, where deliveries are composed of individual orders and each order must be picked up and delivered at different locations. Within the frame of this paper, the author describes a real-time scheduling optimization model focusing on energy efﬁciency of the operation. After a systematic literature review, this paper introduces a mathematical model of last mile delivery problems including scheduling and assignment problems. The objective of the model is to determine the optimal assignment and scheduling for each order so as to minimize energy consumption, which allows to improve energy efﬁciency. Next, a black hole optimization-based heuristic is described, whose performance is validated with different benchmark functions. The scenario analysis validates the model and evaluates its performance to increase energy efﬁciency in last mile logistics.


Introduction
Energy efficiency has become a primary energy policy goal in the world and the research of energy efficiency of supply chain has a great scientific potential [1]. Energy efficiency is an inherent part of Industry 4.0. Power management means that for production and service networks more than energy efficiency, costs, and quality. Energy efficiency is the key factor for economic and social development, ranging from the entities which develop energy efficient measures to everyone in society [2]. The increased intensity of cooperation among supply chain members based on Industry 4.0 technologies offers an enormous potential. In networking, particularly hyperconnected supply chains, in addition to the traditional coordination of the operations, the members may also share their information, financial, and technical resources [3]. As Kevin Morin said in an interview: "Over time, as energy becomes an increasingly digital given with sensors, while also becoming more decentralized with energy coming from a local solar photovoltaic, wind or microgrid system, users will have even more control and ability to manage their energy usage" [4]. It means that today the design and operation of supply chain solutions, external systems, and in-plant processes are more complicated than in the future of Industry 4.0, when digitalized energy will make it possible to control and optimize energy consuming resources.
First mile logistics is the first stage and last mile logistics is the last stage of the supply chain and comprises a significant part of the total delivery cost and energy consumption. Industry 4.0 technologies make it possible to reduce order fulfillment time through real-time processing of open task in a network of package delivery service providers. Therefore, the improvement of first mile and last mile logistics and a significant externalities reduction are very important challenges for researchers [5]. Based on the importance of the energy efficiency of first mile and last mile services represented by package delivery service providers, it can be concluded that the research topic is quite relevant. The increasing importance of cost, resource and energy efficiency in supply chain solutions and the intention to find design and operation strategies supported by real-time decisions were a motivation for writing this paper. After this introduction, the remaining parts of the paper are divided into five sections. Section 2 presents a systematical literature review to summarize the research background. Section 3 presents the model framework and mathematical model of first mile and last mile supply chain including real-time decision of scheduling and assignment to increase energy efficiency. Section 4 presents an enhanced version of black hole heuristics. This section describes new operators for the heuristics and their increased performance is validated using benchmarking functions. Section 5 presents the numerical analysis of real-time decision making in first mile and last mile logistics focusing on the energy efficiency. Conclusions and future research directions are discussed in the last section.

Literature Review
Within the frame of this chapter the following questions are answered with a systematic literature review: Who is doing what? Who first did it or published it? What are research gaps?

Conceptual Framework and Review Methodology
Our used methodology of systematic literature review includes the following aspects [6]: 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 management and we didn't want to produce an almost similar review. We used the following keywords to search in the Scopus database: "energy efficiency" AND "logistics". Initially, 466 articles were identified. This list was reduced to 231 articles selecting journal articles only. Our search was conducted in May 2018; therefore, new articles may have been published since then.

Descriptive Analysis
The reduced articles can be classified depending on the subject area. Figure 1 shows the classification of these 231 articles considering 10 subject areas. This classification shows the majority of environmental sciences, engineering, and energy, and defines the importance of computational methods related to decision sciences.
As Figure 2 demonstrates, the energy efficiency in logistics and supply chain has been researched in the past 20 years. The first article in this field was published in 1998 in the field of energy efficiency in passenger transportation [7] and it was focusing on the proportion of different transportation method. The number of published papers increased in the last eight years; this shows the importance of this research field. Figure 1. Classification of articles considering subject areas based on search in Scopus database using "energy efficiency" AND "logistics" keywords.
As Figure 2 demonstrates, the energy efficiency in logistics and supply chain has been researched in the past 20 years. The first article in this field was published in 1998 in the field of energy efficiency in passenger transportation [7] and it was focusing on the proportion of different transportation method. The number of published papers increased in the last eight years; this shows the importance of this research field. The distribution of the most frequently used keywords is depicted in Figure 3. As the keywords show, the design of energy efficiency of supply chain solutions is based on optimization methods and cost is the most important constraints.  Classification of articles considering subject areas based on search in Scopus database using "energy efficiency" AND "logistics" keywords.
As Figure 2 demonstrates, the energy efficiency in logistics and supply chain has been researched in the past 20 years. The first article in this field was published in 1998 in the field of energy efficiency in passenger transportation [7] and it was focusing on the proportion of different transportation method. The number of published papers increased in the last eight years; this shows the importance of this research field. The distribution of the most frequently used keywords is depicted in Figure 3. As the keywords show, the design of energy efficiency of supply chain solutions is based on optimization methods and cost is the most important constraints.  The distribution of the most frequently used keywords is depicted in Figure 3. As the keywords show, the design of energy efficiency of supply chain solutions is based on optimization methods and cost is the most important constraints.
Energies 2018, 11, x FOR PEER REVIEW 3 of 25 Figure 1. Classification of articles considering subject areas based on search in Scopus database using "energy efficiency" AND "logistics" keywords.
As Figure 2 demonstrates, the energy efficiency in logistics and supply chain has been researched in the past 20 years. The first article in this field was published in 1998 in the field of energy efficiency in passenger transportation [7] and it was focusing on the proportion of different transportation method. The number of published papers increased in the last eight years; this shows the importance of this research field. The distribution of the most frequently used keywords is depicted in Figure 3. As the keywords show, the design of energy efficiency of supply chain solutions is based on optimization methods and cost is the most important constraints.  Articles were analyzed from scientific impact point of view. The most usual form to evaluate articles from scientific impact point of view is the citation. Figure 4 shows the 10 most cited articles with their number of citations [8][9][10][11][12][13][14][15][16][17].
Articles were analyzed from scientific impact point of view. The most usual form to evaluate articles from scientific impact point of view is the citation. Figure 4 shows the 10 most cited articles with their number of citations [8][9][10][11][12][13][14][15][16][17]. In the following step, the 231 articles were reduced after reading the abstracts. We excluded articles whose topic did not match our interest and cannot be addressed to the energy efficiency of supply chain solutions. After this reduction, we got 45 articles.

Content Analysis
The literature introduces a wide range of methods used to solve problems of energy efficiency in supply chain domain, like decision support systems, heuristic optimization, statistical approaches, measurement, aggregate methods, or empirical studies. Hierarchical linear models were used to validate that greater urbanization, transport-related energy consumption, and transportation-sector greenhouse gas emissions have a great impact on each other [18]. Decision support tools, like the Synchromodal Supply Chain Energy Analysis (SSCEA) tool [19], make it possible to analyze and customize supply chain model and analyze their environmental and economic effects. Comparing and measuring logistic systems and processes against others is a good way to gain insights into measures, performance, and practices in a way that can rapidly improve the energy efficiency [20]. Statistical approaches using augmented Dickey-Fuller test, Johansen co-integration test, or impulse response can help to validate that energy efficiency, energy structure, and product remanufacturing rate are more capable of inhibiting reverse logistics carbon footprint [21]. Studies validate the usability of aggregated methods to improve operational energy efficiency in short sea container shipping, where appropriate vessel sailing speed, port time/sailing time ratio, and cargo capacity utilization need to be taken into account [9]. In the case of real supply chain solutions, empirical analysis can also be used. Researchers analyzed the impact of energy management systems on carbon and corporate performance with data from German automotive suppliers using empirical analysis [22]. The optimization is a very powerful tool in the case of both external logistic systems, supply chains, and intralogistics systems [23]. Another approach is the measuring. On the basis of measuring environmental performance across a green supply chain, researchers validated different regression models for resource conservation, reduction of hazardous waste, and reduction of emission of greenhouse gases [24]. The value-stream mapping method has proven itself to be the best practice tool to generate energy value-streams in production and logistics in respect to time-and energyconsumption [25]. Supply chain coordination enables additional opportunities that the individual approach hinders. For instance, an alternative supply method for raw material in manufacturing led to greening supply chain [26].
The measurement of supply chain and logistics solutions is performed allowing to quantify availability, flexibility, efficiency, and plasticity indicators [27]. Several scenarios related with energy efficiency of supply chain solutions were assessed and evaluated in order to compare the effects of technology, organization, infrastructure, policy, and finance. Case studies show that energy In the following step, the 231 articles were reduced after reading the abstracts. We excluded articles whose topic did not match our interest and cannot be addressed to the energy efficiency of supply chain solutions. After this reduction, we got 45 articles.

Content Analysis
The literature introduces a wide range of methods used to solve problems of energy efficiency in supply chain domain, like decision support systems, heuristic optimization, statistical approaches, measurement, aggregate methods, or empirical studies. Hierarchical linear models were used to validate that greater urbanization, transport-related energy consumption, and transportation-sector greenhouse gas emissions have a great impact on each other [18]. Decision support tools, like the Synchromodal Supply Chain Energy Analysis (SSCEA) tool [19], make it possible to analyze and customize supply chain model and analyze their environmental and economic effects. Comparing and measuring logistic systems and processes against others is a good way to gain insights into measures, performance, and practices in a way that can rapidly improve the energy efficiency [20]. Statistical approaches using augmented Dickey-Fuller test, Johansen co-integration test, or impulse response can help to validate that energy efficiency, energy structure, and product remanufacturing rate are more capable of inhibiting reverse logistics carbon footprint [21]. Studies validate the usability of aggregated methods to improve operational energy efficiency in short sea container shipping, where appropriate vessel sailing speed, port time/sailing time ratio, and cargo capacity utilization need to be taken into account [9]. In the case of real supply chain solutions, empirical analysis can also be used. Researchers analyzed the impact of energy management systems on carbon and corporate performance with data from German automotive suppliers using empirical analysis [22]. The optimization is a very powerful tool in the case of both external logistic systems, supply chains, and intralogistics systems [23]. Another approach is the measuring. On the basis of measuring environmental performance across a green supply chain, researchers validated different regression models for resource conservation, reduction of hazardous waste, and reduction of emission of greenhouse gases [24]. The value-stream mapping method has proven itself to be the best practice tool to generate energy value-streams in production and logistics in respect to time-and energy-consumption [25]. Supply chain coordination enables additional opportunities that the individual approach hinders. For instance, an alternative supply method for raw material in manufacturing led to greening supply chain [26].
The measurement of supply chain and logistics solutions is performed allowing to quantify availability, flexibility, efficiency, and plasticity indicators [27]. Several scenarios related with energy efficiency of supply chain solutions were assessed and evaluated in order to compare the effects of technology, organization, infrastructure, policy, and finance. Case studies show that energy efficiency is a crucial problem in all areas of economy. A Stockholm pilot study shows that night-time deliveries increase the energy efficiency of urban goods delivery [28]. A South Korean case study describes that urban planning for optimal city size and characteristics with sufficient financing can lead to reduced logistics-related energy consumption [18]. The results of a study including 27 European countries over a period of 2007-2014 show that logistics performance index significantly increases GDP per unit of energy use, health expenditures, and renewable energy source, and decreases carbon emissions [29]. Based on data from 108 German automotive suppliers, a study described that the implementation of an Energy Management System has a (positive) effects on their practices and performances [22]. Measuring and improving operational energy efficiency is important in all supply chain solutions, like road, rail, water [9], and air. A Beijing pilot study examines the role of bicycles and tricycles for package delivery, food and beverage distribution, and waste and recycling services. The study shows that motorized alternatives to the tricycle are uncompetitive in terms of energy efficiency [30]. Intermediate and flexible transport, logistics, and supply chain schemes, operated by eco-friendly vehicles support the achievement of high standards of energy efficiency and environmental quality [31]. The extension of the green corridor system to all nodes of the shipping line and other transport modes in the case of a port in Spain led in the long run to a carbon-neutral green corridor [32].
The objective functions and indicators of design of supply chains from energy efficiency point of view can include a wide range of aspects, like capacity utilization, CO 2 emission, fuel replacing, cooperation with stakeholders, taxes, or policies. Research results suggest that energy efficiency of supply chain solutions can be increased by enhanced utilization of capacity [33]. Studies show that unmanned aerial vehicles have potential effectiveness to reduce CO 2 emissions compared to conventional transportation solutions [34]. Policies have a great impact on the performance. Policies that shift deliveries from peak hours to off-peak hours have the potential to increase the scheduling flexibility, delivery reliability and energy efficiency of carriers and recipients through the introduction of additional off-peak hours [28]. Replacing the heavy fuel oil by low sulfur fuel oil and shore power can lead to increased energy efficiency as shown in a study focusing on a case study of the port of Shenzhen. The proposed approach can be generalized for other ports [35]. Investigations have pointed out that logistic organizations and supply chain networks can achieve environmental goals. Therefore, it is necessary that companies develop a concrete environment-friendly orientation, based on the respect of market's requests and environmental regulations and cooperate with their stakeholders [36]. A logistic-induced energy economic hybrid model combining top-down and bottom-up modeling and introducing revised logistic curves for enriching technical details validated that optimal carbon taxes can help to achieve the voluntary goal of reducing carbon intensity [37]. Examples show that in order to affect transport demand and total energy consumption, the focus should be shifted from single shipments to the analysis of complete supply chain solutions, including purchasing, in-plant supply, distribution, and inverse processes [38]. The energy efficiency of supply chain solutions can be influenced in three levels: operational, tactical, and strategic (conceptual) level [8]. Developed Geographic Information System (GIS)-based decision support program can be a unique tool assisting suppliers in making comprehensive decisions on organizational options for the most suitable, most energy efficient transportation [39].
More than 50% of the articles were published in the last five years. This result indicates the scientific potential of the research on energy efficiency of supply chain. The articles that addressed the optimization of supply chain and logistics systems from energy efficiency and energy utilization Therefore, first mile and last mile supply still needs more attention and research. It was found that heuristic and metaheuristic algorithms are important tools for design and operation of complex supply chain solutions since a wide range of models determines an NP-hard (non-deterministic polynomial-time hardness) optimization problem. According to that, the main focus of this research is the modelling and optimization of first mile and last mile supply chain solutions focusing on energy efficiency, also taking into account the real-time scheduling possibilities based on Industry 4.0 technologies.
Energies 2018, 11, x FOR PEER REVIEW 6 of 25 point of view are focusing on conventional supply chain solutions, but few of the articles have aimed to research the design and operation of first mile and last mile supply chain solutions. Therefore, first mile and last mile supply still needs more attention and research. It was found that heuristic and metaheuristic algorithms are important tools for design and operation of complex supply chain solutions since a wide range of models determines an NP-hard (non-deterministic polynomial-time hardness) optimization problem. According to that, the main focus of this research is the modelling and optimization of first mile and last mile supply chain solutions focusing on energy efficiency, also taking into account the real-time scheduling possibilities based on Industry 4.0 technologies.

Model of Real-Time Decision Making in Last Mile Logistics to Increase Energy Efficiency
In traditional parcel delivery services (PDS), the first mile and last mile operations are separated: delivery of packages is performed in the morning while the pickup operations of new packages are scheduled in the afternoon. It means that the first mile and last mile operations are sequenced. The model framework of the real-time decision making of parcel delivery services makes it possible to analyze the performance of logistics of deliveries and pickup operations in order to increase the energy efficiency of transportation and other material handling operations. Table 1 shows the units of measures used in the model.

Model of Real-Time Decision Making in Last Mile Logistics to Increase Energy Efficiency
In traditional parcel delivery services (PDS), the first mile and last mile operations are separated: delivery of packages is performed in the morning while the pickup operations of new packages are scheduled in the afternoon. It means that the first mile and last mile operations are sequenced. The model framework of the real-time decision making of parcel delivery services makes it possible to analyze the performance of logistics of deliveries and pickup operations in order to increase the energy efficiency of transportation and other material handling operations. Table 1 shows the units of measures used in the model. The model shown in Figure 6 includes three different types of deliveries: (1) scheduled deliveries, which are scheduled and assigned to delivery trucks; (2) open tasks with known delivery destinations, which are not scheduled and assigned to delivery trucks and routes; (3)  The model shown in Figure 6 includes three different types of deliveries: (1) scheduled deliveries, which are scheduled and assigned to delivery trucks; (2) open tasks with known delivery destinations, which are not scheduled and assigned to delivery trucks and routes; (3)   With this in mind, we define the following parameters describing the layout of the hyperconnected first-mile/last-mile supply chain:  With this in mind, we define the following parameters describing the layout of the hyperconnected first-mile/last-mile supply chain: The objective function of the problem describes the minimization of energy use of the whole delivery process: where U SD is the energy usage of delivery of scheduled deliveries without any assigned open task, U SDFL is the energy usage from the hub to the first destination and from the last destination to the hub, U OTP is the energy usage of pickup operations of open tasks and U OTD is the energy usage of delivery operations of open tasks. The first part of the energy usage function (1) includes the sum of energy usage of scheduled delivery routes without assignment of open tasks, where the energy usage is a function of loading of package delivery trucks and the length of routes depending on the location of delivery points: where ϑ i,j is the specific energy usage of package delivery truck of PDSP i through scheduled delivery route j, q i,j,k is the load of the delivery truck of PDSP i through scheduled delivery route j passing delivery point k, l i,j,k is the length of the transportation route of PDSP i through scheduled delivery route j between destination k and destination k + 1.
The second part of the energy usage function (1) includes the energy usage from the hub to the first destination and from the last destination to the hub: The third part of the energy usage function (1) where and where and where x * f ,i,j,k is the assignment matrix of delivery operations of open tasks to scheduled delivery routes as decision variable. If the pickup of open task f is assigned to delivery route j of PDSP i passing delivery point k, then x f ,i,j,k = 1. If the delivery of open task f is assigned to delivery route j of PDSP i passing delivery point k, then x * f ,i,j,k = 1. The solutions of the above described integrated scheduling and assignment problem are limited by the following three constraints related to time window and capacity of package delivery trucks: Constraints 1: We can define a timeframe for each scheduled delivery operation and it is not allowed to exceed the upper and lower limit of this timeframe.
t OTD,min where t OTP,min The capacity of package delivery trucks is limited, so it is not allowed to exceed its loading capacity. The actual loading capacity at the scheduled destination k of package delivery truck assigned to delivery route j of PDSP i can be calculated as follows: where Q max i,j is the maximum capacity of package delivery truck assigned to delivery route j of PDSP i. If there is a difference between the value of open task at the pickup point and the destination, then this constraint can be written as follows: The decision variables have two different types: the decision variable of the assignment problem is a binary matrix, while the decision variable of the scheduling problem is a matrix with real values. The assignment matrix (15) defines the scheduling of open tasks, so we have one real decision variable, while the scheduling matrix is a virtual decision variable.

Black Hole Algorithm-Based Optimization
The idea of black holes was established in the 18th century by John Michel and Pierre Simon de Laplace, and the first black hole was recognized by John Wheeler in 1967 [61,62]. A common type of black hole is created by dying stars with very large masses, when the gravity force won against pressure. There are three types of black holes depending on their mass: stellar black holes, supermassive black holes, and miniature black holes. In a black hole, gravity force pulls so much that nothing, not even particles, light or radiation can escape from it. But black holes are not giant cosmic vacuum cleaners, because the gravity force of a black hole is extremely high if a particle is extremely close. This boundary is the so-called event horizon. The radius of the event horizon is the Schwarzschild radius, which can be calculated as follows: where g is Newton's gravitational constant, M is the mass of the object and c is the speed of light. Inside the event horizon, the gravity force drags all particles back and prevents it from escaping. There is another special sphere around non-spinning black holes. The photon sphere is a spherical region; photons reaching this region are forced to travel in orbits. The radius of photon sphere can be calculated as follows: The environment of black holes can be analyzed, but the black holes are invisible, because light cannot escape. If the distance between a particle (star, proton, electron, photon, etc.) 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 space-time 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 [63].

Black Hole Algorithm-Based Optimization
The idea of black holes was established in the 18th century by John Michel and Pierre Simon de Laplace, and the first black hole was recognized by John Wheeler in 1967 [61,62]. A common type of black hole is created by dying stars with very large masses, when the gravity force won against pressure. There are three types of black holes depending on their mass: stellar black holes, supermassive black holes, and miniature black holes. In a black hole, gravity force pulls so much that nothing, not even particles, light or radiation can escape from it. But black holes are not giant cosmic vacuum cleaners, because the gravity force of a black hole is extremely high if a particle is extremely close. This boundary is the so-called event horizon. The radius of the event horizon is the Schwarzschild radius, which can be calculated as follows: where g is Newton's gravitational constant, M is the mass of the object and c is the speed of light. Inside the event horizon, the gravity force drags all particles back and prevents it from escaping. There is another special sphere around non-spinning black holes. The photon sphere is a spherical region; photons reaching this region are forced to travel in orbits. The radius of photon sphere can be calculated as follows: The environment of black holes can be analyzed, but the black holes are invisible, because light cannot escape. If the distance between a particle (star, proton, electron, photon, etc.) 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 space-time 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 [63].   Black hole algorithm (BHA) is inspired by this phenomenon and belongs to the swarm intelligence paradigm using adaptive strategies to search and optimize. Black hole algorithm can be defined as a sub-field of particle swarm optimization and they are inspired by physical laws, like gravitation search [64], intelligent water drop [65], or simulated annealing [66]. Other types of heuristic optimization algorithms are inspired by living bodies, like bacterial algorithm [67], bat algorithm [68], artificial bee colony algorithm [69], firefly algorithm [70], and ant colony algorithm [71].
The first phase of the black hole optimization is the so called big-bang, which is the initialization phase of location and velocity of stars in the search space. Each star represents a possible solution of the optimization problem, where location in the n-dimensional search space represents the value of the decision variables. The generated stars have to be inside the boundaries of the search space.
The second phase of the algorithm is the evaluation of the stars representing potential solutions. The stars are evaluated with the value of the objective functions after moving towards the black hole.
The third phase of the algorithm is to choose the heaviest star with the best value of objective function to represent the black hole. This star with the highest gravity force is the center of the movement of stars. x The fourth phase of the algorithm is the moving (swarming) of stars towards the black hole. We can define two different types of movement: in the first case, only the gravity force between star and black hole has impact on the movement of the star, while in the second case, the gravity force among all stars are taken into consideration. The second case is performed through the gravity search algorithm.
The movement process has to be performed so that the new location of the star after the movement is inside the search space, because limitations of decision variables x min i,j , x max i,j have to be taken into consideration. Stars reaching the event horizon are absorbed and a new star is generated in the search space. It is important to schedule the evaluation of stars reaching the event horizon. If the candidate solution represented by the star reaching the event horizon is not evaluated before absorbed, then it could happen that we lost a better solution than the solution represented by the black hole, especially in the case if the global optimum of the problem is inside the event horizon of the current black hole. If we evaluate stars reaching the event horizon, the evaluated star can become the new black hole and the best solution among the candidate stars get nearer to the global optimum ( Figure 8).
The Schwarzschild radius can be taken into consideration either as a constant value or as a permanently decreased value. If we take into consideration the Hawking radiation, then the black hole lost weight and the radius of the event horizon get smaller and smaller. The permanently decreased event horizon makes it possible to prevent the absorption of stars near the optimum of the objective function ( Figure 9). The Schwarzschild radius can be calculated depending on the gravity force of the black hole, stars, and the current iteration step as follows: where ϑ is the number of the current iteration step. The Schwarzschild radius can be taken into consideration either as a constant value or as a permanently decreased value. If we take into consideration the Hawking radiation, then the black hole lost weight and the radius of the event horizon get smaller and smaller. The permanently decreased event horizon makes it possible to prevent the absorption of stars near the optimum of the objective function ( Figure 9). The Schwarzschild radius can be calculated depending on the gravity force of the black hole, stars, and the current iteration step as follows: where is the number of the current iteration step. The application of Hawking radiation is another possible way to reach optimal solution near the black hole, inside the event horizon. Hawking verified that object can escape from a black hole and The Schwarzschild radius can be taken into consideration either as a constant value or as a permanently decreased value. If we take into consideration the Hawking radiation, then the black hole lost weight and the radius of the event horizon get smaller and smaller. The permanently decreased event horizon makes it possible to prevent the absorption of stars near the optimum of the objective function (Figure 9). The Schwarzschild radius can be calculated depending on the gravity force of the black hole, stars, and the current iteration step as follows: where is the number of the current iteration step. The application of Hawking radiation is another possible way to reach optimal solution near the black hole, inside the event horizon. Hawking verified that object can escape from a black hole and black holes mass can reduce [83]. This mass reduction has an impact on the gravity force of the black hole. Using this idea, it is possible to change the position of the black hole in the search space using the following calculation: The application of Hawking radiation is another possible way to reach optimal solution near the black hole, inside the event horizon. Hawking verified that object can escape from a black hole and black holes mass can reduce [83]. This mass reduction has an impact on the gravity force of the black hole. Using this idea, it is possible to change the position of the black hole in the search space using the following calculation: where µ influences the possible shift of the black hole. In the big-bang phase, the best option is to use uniform distribution to generate stars. After absorption of a star inside the event horizon, there are different ways to generate new stars. We can generate the new stars either uniformly or using a special, discrete, or continuous distribution function [84]. Figure 10 shows an example of performing generation of new stars with a discrete distribution. In this case p G where influences the possible shift of the black hole. In the big-bang phase, the best option is to use uniform distribution to generate stars. After absorption of a star inside the event horizon, there are different ways to generate new stars. We can generate the new stars either uniformly or using a special, discrete, or continuous distribution function [84]. Figure 10 shows an example of performing generation of new stars with a discrete distribution. In this case = 0.6, = 0.3, = 0.1. The stars in the 1 st sphere are called lucky stars. It is important that where the possibility of uniformly generation of a new star instead of the absorbed one is As termination criteria we can define either the upper limit of the number of iteration steps or the value of expected changes in the gravity force after the next iteration step.
On the basis of the abovementioned aspects of the black hole algorithm, it is possible to perform the optimization with different variations of the standard algorithm:  The stars in the 1 st sphere are called lucky stars. It is important that where the possibility of uniformly generation of a new star instead of the absorbed one is As termination criteria we can define either the upper limit of the number of iteration steps or the value of expected changes in the gravity force after the next iteration step.
On the basis of the abovementioned aspects of the black hole algorithm, it is possible to perform the optimization with different variations of the standard algorithm: • BHA with permanently decreasing Schwarzschild radius, Hawking radiation, and lucky star.
The results of the evaluation of the performance of different BHA is demonstrated in Table 2.   As Table 2 shows, the decreased Schwarzschild radius, the Hawking radiation, and the lucky star options increase the performance of the standard black hole algorithm, so the DSR/LS/HR version of the BHA is used in the next chapter to optimize the real-time decision making problem in last mile logistics to increase the energy efficiency.

Scenario Analysis of Real-Time Decision Making in Last Mile Logistics Focusing on Energy Efficiency
Within the frame of this chapter, the performance of the abovementioned black hole algorithm-based heuristics is validated through the optimization of real-time decision making problem of last mile logistics focusing on energy efficiency. The model has two package delivery service providers, 17 scheduled destinations for three scheduled routes (Table 3), and two open tasks (Table 4) to be picked up and delivered.  Within the frame of scenarios, the fuel consumption depending on the weight of the loading is calculated as follows: where ζ EC i,j is the specific additional fuel consumption depending on the loading weight. The unit of measure of the energy consumption is L/100 km. Within the frame of these scenarios the linear fuel consumption function was used with a fuel consumption of 9 L/100 km for empty package delivery trucks and 13 L/100 km for full package delivery trucks. The fuel consumption was measured with the used fuel quantity. Figure 11 demonstrates the loading capacity of delivery routes of PDSPs. As the figures show, it is not allowed to exceed the loading capacity of delivery trucks without and with assigned open tasks. The loading capacity of delivery trucks is measured with pcs of standard postal boxes.  Within the frame of scenarios, the fuel consumption depending on the weight of the loading is calculated as follows: where , is the specific additional fuel consumption depending on the loading weight. The unit of measure of the energy consumption is L/100 km. Within the frame of these scenarios the linear fuel consumption function was used with a fuel consumption of 9 L/100 km for empty package delivery trucks and 13 L/100 km for full package delivery trucks. The fuel consumption was measured with the used fuel quantity. Figure 11 demonstrates the loading capacity of delivery routes of PDSPs. As the figures show, it is not allowed to exceed the loading capacity of delivery trucks without and with assigned open tasks. The loading capacity of delivery trucks is measured with pcs of standard postal boxes.

Scenario 1 with Non-Cooperating PDSPs, without Time Frame and Real-Time Scheduling
In the case of the first scenario, the time frame for pickup and delivery operations is not taken into consideration and open tasks are not scheduled real-time. The pickup and delivery operations of open tasks are performed by shuttle services of the PDSPs receiving the open task, because it is not possible to modify the scheduled routes (Figure 12a). In this case the total energy consumption is 38.246 L including 28.375 L energy consumption of the scheduled routes and 9.871 L energy consumption of shuttle services.

Scenario 3 with Cooperative Partners, without Time Frame, without Loading Capacity Limit, and with Real-Time Scheduling
In the case of the third scenario, the time frame for pickup and delivery operations is not taken into consideration but open tasks are assigned to the scheduled routes. In this scenario, the loading capacity of trucks is not taken into consideration. In this case, the loading capacity of delivery trucks assigned to route 1 and 3 is exceeded, as Figure 13 shows. In this case the total energy consumption is 28.979 L including 22.658 L energy consumption of the scheduled routes and 6.321 L energy consumption of added routes for pickup and delivery of open tasks (Figure 14a).

Scenario 3 with Cooperative Partners, without Time Frame, without Loading Capacity Limit, and with Real-Time Scheduling
In the case of the third scenario, the time frame for pickup and delivery operations is not taken into consideration but open tasks are assigned to the scheduled routes. In this scenario, the loading capacity of trucks is not taken into consideration. In this case, the loading capacity of delivery trucks assigned to route 1 and 3 is exceeded, as Figure 13 shows. In this case the total energy consumption is 28.979 L including 22.658 L energy consumption of the scheduled routes and 6.321 L energy consumption of added routes for pickup and delivery of open tasks (Figure 14a).

Scenario 4 with Cooperative Partners, without Time Frame, with Limited Loading Capacity and Real-Time Scheduling
In the case of the fourth scenario, the time frame for pickup and delivery operations is not taken into consideration but it is not allowed to exceed the loading capacities of delivery trucks. In this case the open tasks are rescheduled ( Figure 14b). As Figure 14 shows

Scenario 4 with Cooperative Partners, without Time Frame, with Limited Loading Capacity and Real-Time Scheduling
In the case of the fourth scenario, the time frame for pickup and delivery operations is not taken into consideration but it is not allowed to exceed the loading capacities of delivery trucks. In this case the open tasks are rescheduled ( Figure 14b). As Figure 14 shows, the loading capacity of the delivery trucks is not exceeded after rescheduling pickup and loading operations of open tasks. In this case the total energy consumption is 30.97 L including 22.906 L energy consumption of the scheduled routes and 8.064 L energy consumption of added routes for pickup and delivery of open tasks.

Scenario 5 with Cooperative Partners, Time Frame, Limited Loading Capacity, and Real-Time Scheduling
In the case of the fifth scenario, the time frame for pickup and delivery operations is taken into consideration and open tasks are assigned to the scheduled routes. The black hole algorithm-based heuristics resulted two different solutions, and loading capacity were not exceeded ( Figure 15). The first solution represents the model, where time frames are not taken into consideration (Figure 16a), while the second solution includes the constrained time frame (Figure 16b). Taking into account the time frame, the total energy consumption is 28.979 L including 22.658 L energy consumption of the scheduled routes and 6.754 L energy consumption of added routes for pickup and delivery of open tasks. Figure 17 demonstrates the results of real-time scheduling.

Scenario 5 with Cooperative Partners, Time Frame, Limited Loading Capacity, and Real-Time Scheduling
In the case of the fifth scenario, the time frame for pickup and delivery operations is taken into consideration and open tasks are assigned to the scheduled routes. The black hole algorithm-based heuristics resulted two different solutions, and loading capacity were not exceeded ( Figure 15). The first solution represents the model, where time frames are not taken into consideration (Figure 16a), while the second solution includes the constrained time frame (Figure 16b). Taking into account the time frame, the total energy consumption is 28.979 L including 22.658 L energy consumption of the scheduled routes and 6.754 L energy consumption of added routes for pickup and delivery of open  Figure 18 demonstrates the comparison of fuel consumption of the different assignment and scheduling solutions of the above described scenarios. However, scenario 3 has the lowest energy consumption, but in this scenario the pickup and delivery operations cannot be performed within the predefined timeframe. As the optimal solution, the results of scenario 4 have to be taken into consideration, because in this case the pickup and delivery operations can be performed within the time frame given by the customers.      Figure 18 demonstrates the comparison of fuel consumption of the different assignment and scheduling solutions of the above described scenarios. However, scenario 3 has the lowest energy consumption, but in this scenario the pickup and delivery operations cannot be performed within the predefined timeframe. As the optimal solution, the results of scenario 4 have to be taken into consideration, because in this case the pickup and delivery operations can be performed within the time frame given by the customers.

Conclusions
It is common in logistics and supply chain that the objective of decreasing fuel consumption and increasing the energy efficiency is targeted at the level of operation of the supply chain's members. The importance of cooperation has not been fully explored, but Industry 4.0 technologies and the Internet of Things paradigm led to the improvement of hyperconnected logistics and the abovementioned objective is targeted at strategic level. Energy efficiency is not extensively researched in the case of cooperative supply chain solutions. To try to fill this gap, this work has developed a methodology based on heuristic optimization of real-time scheduling of last mile logistics to minimize energy consumption, which allows to improve energy efficiency.
The model of first mile and last mile logistics focuses on the energy efficiency of cooperative package service providers. The described model represents an integrated optimization problem including assignment of open tasks to scheduled routes, scheduling of open tasks and rescheduling of existing delivery routes. The optimization problem, which is described by an objective function representing the minimization of energy consumption and constraints including loading capacity limits and time frame, is an NP-hard problem. For the solution of this problem, a black hole optimization-based heuristics was developed. The developed heuristic is an improved version of the standard black hole optimization; its increased performance is validated with benchmarking functions. The integrated optimization model of real-time scheduling of last mile logistics problem is solved with this heuristics. As the scenarios showed, cooperation makes it possible to increase energy efficiency through minimization of energy consumption.
Depending on the different constraints, different energy savings can be achieved. In the case of package delivery service providers, the time frame and the loading capacity of the package delivery trucks are important constraints, as the mentioned scenarios show, and they are influencing their reliability, availability, flexibility, and economic footprints.
The described model framework and the optimization approach makes it possible to support managerial decisions; not only the operation strategy of the running trucks but also the cooperation strategy of different package delivery service providers is influenced by the results of the above described contribution. Some recommendations for possible future studies are as follows: it would be helpful to develop approaches that beyond analyzing scheduling and assignment possibilities also consider other areas of interest, like human resource strategies, delivery truck sizing, or outsourcing possibilities. Another research direction is the analysis of stochastic models and the development of new heuristic methods to decrease the computation time of the algorithm for large-scale systems.
Funding: This research received no external funding.

Conflicts of Interest:
The author declares no conflict of interest.

Conclusions
It is common in logistics and supply chain that the objective of decreasing fuel consumption and increasing the energy efficiency is targeted at the level of operation of the supply chain's members. The importance of cooperation has not been fully explored, but Industry 4.0 technologies and the Internet of Things paradigm led to the improvement of hyperconnected logistics and the abovementioned objective is targeted at strategic level. Energy efficiency is not extensively researched in the case of cooperative supply chain solutions. To try to fill this gap, this work has developed a methodology based on heuristic optimization of real-time scheduling of last mile logistics to minimize energy consumption, which allows to improve energy efficiency.
The model of first mile and last mile logistics focuses on the energy efficiency of cooperative package service providers. The described model represents an integrated optimization problem including assignment of open tasks to scheduled routes, scheduling of open tasks and rescheduling of existing delivery routes. The optimization problem, which is described by an objective function representing the minimization of energy consumption and constraints including loading capacity limits and time frame, is an NP-hard problem. For the solution of this problem, a black hole optimization-based heuristics was developed. The developed heuristic is an improved version of the standard black hole optimization; its increased performance is validated with benchmarking functions. The integrated optimization model of real-time scheduling of last mile logistics problem is solved with this heuristics. As the scenarios showed, cooperation makes it possible to increase energy efficiency through minimization of energy consumption.
Depending on the different constraints, different energy savings can be achieved. In the case of package delivery service providers, the time frame and the loading capacity of the package delivery trucks are important constraints, as the mentioned scenarios show, and they are influencing their reliability, availability, flexibility, and economic footprints.
The described model framework and the optimization approach makes it possible to support managerial decisions; not only the operation strategy of the running trucks but also the cooperation strategy of different package delivery service providers is influenced by the results of the above described contribution. Some recommendations for possible future studies are as follows: it would be helpful to develop approaches that beyond analyzing scheduling and assignment possibilities also consider other areas of interest, like human resource strategies, delivery truck sizing, or outsourcing possibilities. Another research direction is the analysis of stochastic models and the development of new heuristic methods to decrease the computation time of the algorithm for large-scale systems.