**1. Introduction**

The concept of a smart city includes a high degree of information technology (IT) integration and communication, which is the same concept as supply chain management today, which relies on the use of various ITs and techniques. One of the important elements of smart cities is smart logistics, aiming to help manufacturers gain performance from reusable transport packaging, such as pallets, racks, and bins, as well as tracking packages. By building Internet of Things (IoT) monitoring technology, smart logistics IT systems can be integrated into virtually any transportation asset to track its location in real-time, optimize inventory planning, and monitor environmental conditions, especially when the world enters the fifth-generation mobile communication technology or even the six-generation mobile communication technology in the future [1–3]. However, even with advanced IT today, logistics costs are still an important part of a global company's worldwide operation management to construct an enterprise's competitive edge over competitors, especially when dealing with post-COVID-19 supply chain disruptions. Intelligent logistics network functions allow companies to quickly respond to customer requirements and create their own competitive advantage over competitors in the design of smart logistics by using IT, such as radio frequency identification, to track shipments in real-time.

**Citation:** Lo, S.-C.; Chuang, Y.-L. Vehicle Routing Optimization with Cross-Docking Based on an Artificial Immune System in Logistics Management. *Mathematics* **2023**, *11*, 811. https://doi.org/10.3390/ math11040811

Academic Editor: Tao Zhou

Received: 26 December 2022 Revised: 31 January 2023 Accepted: 3 February 2023 Published: 5 February 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Moreover, logistics costs weigh significantly on a company's total costs. The authors of [4] identified the logistics costs from three different aspects of a case company: (1) the share of procurement costs reduced from approximately 0.65 (2013) to 0.45% (2015); (2) the share of production costs increased from approximately 50 (2013) to 65% (2015); and (3) the share of sales costs increased from approximately 7 (2013) to 8.5% (2015). As a result, in order to increase overall profits, lower operational costs, and improve a company's service level, a well-designed and highly cost-efficient logistics mechanism becomes essential. The paper focuses on controlling transport costs by optimizing routes and scheduling of vehicles, which is known as the vehicle routing problem (VRP) [5].

VRPs are a fundamental activity in the fields of transportation systems, distribution channel design, and logistics networks. The study of the VRPs is indeed vital in optimizing the physical flow of goods in the logistics operation in order to reduce transport costs and increase supply chain network performance. Among numerous studies of the VRPs, the problem with optimal routes and scheduling of vehicles, considering both pickup and delivery processes simultaneously, is called the VRP with cross-docking (VRPCD). Kulwiec (2004) pointed out that the cross-docking (CD) facility is an important supply chain strategy. They classified the CD facility into six different types. One of the CD operations is "Truck/Rail Consolidation." [6]. Both suppliers' and retailers' sides of the supply chain have to be considered at the same time in the process of transporting goods. Therefore, CD facilities are an important element in a synchronized supply chain as well as in sustainable logistics management. Generally, there would be no interruption between upstream and downstream operations as long as the physical flow of goods in the pickup process is simultaneously delivered at the CD depot and then delivered to customers after the consolidation process. Therefore, no inventory was stocked, and no delay in customer orders occurred at the facility. As a result, the construction of a CD system in the logistics network makes companies able to: (1) facilitate the efficiency and effectiveness of supply chain management; (2) lower space requirements and reduce transportation costs; and (3) better control the distribution process [7]. Figure 1 shows a simple layout of the CD depot.

Studying an efficient heuristics methodology is essential to acquiring an optimal or near-optimal solution within a reasonable amount of computation time because the VRP is a well-known non-deterministic polynomial-time-hard (NP-hard) problem. As the global pandemic of the new coronavirus (COVID-19) has shaken the world since 2020, the study of the human immune system has piqued the interest of many researchers. The Artificial Immune Systems (AIS) is the simulation algorithm of human body defense systems and is applied to solve many research fields, such as clustering/classification, fault detection, combinatorial optimization, and learning problems [8–12].

The AIS has presented numerous studies on solving optimization problems. The results showed that their algorithm was a feasible and effective method for the VRP. For example, the authors of [13] applied clonal selection to tackle the VRP by using clonal selection operators, super mutation operators, and clonal proliferation to improve global convergence speed. The results indicate that their algorithm has a remarkable reliability of global convergence and avoids prematurity when solving the VRP effectively.

This paper aims to propose a two-phase optimization approach based on an artificial immune system combined with the sweep method, called sAIS, to solve the vehicle routing problem with the CD facilities in the logistics network as an important element of smart city infrastructure. The two-phase approach begins with the grouping method to fulfill vehicle capacity constraints and is followed by the optimization engine to find near-optimal solutions for each truck routing sequence while utilizing a minimum number of trucks. The experimental results showed that the proposed sAIS algorithm is robustly competitive with the GA on the criterion of average solution quality.

The remainder of this paper is organized as follows. Section 2 reviews the related literature, and Section 3 defines the VRPCD formulation. Section 4 details the methodology and procedure of our proposed sAIS heuristic algorithm, following a number of experimentation examples presented in Section 5. Section 6 concludes the research with a summary based on the computational results.

#### **2. Related Works**

The CD system is a lean supply chain model of transporting raw materials or products from pickup to delivery without ever storing them in the warehouse. It can significantly reduce inventory levels, required space, handling costs, and lead times, as well as customer response times. Packages are unloaded from inbound trucks immediately after arriving at the depot, followed by a sorting, repacking, and dispatching process as shown in Figure 2, then loaded onto outbound trucks for delivery to retailers in a distribution channel [14–18]. The primary objective is to avoid a high inventory level and reduce handling costs so that there will be no inventory being stored in the depot. This is the same concept as the Toyota Production System or lean operations. A well-designed CD operation can provide companies with significant benefits, including decreased inventory levels, low storage space requirements, low transportation costs, a fast response to customer requirements, and better control of the distribution process. Both receiving and shipping processes must be considered simultaneously, to enable the CD facility to be integrated into the logistics network effectively. Lee, Jung, and Lee (2006) first proposed that the most important process for CD operations is the pickup phase, in which all trucks must arrive at the depot at the same time in order to control the start time of warehouse operations [17].

**Figure 2.** The selection process of antibodies.

Before the CD system served as a mathematical constraint, Dantzig and Ramaser (1959) initially introduced the VRP concept as a solution to the "Truck Dispatching Problem." In their study, a linear programming model was designed to acquire a near-best solution for the truck scheduling problem, which was concerned with the optimum routing of a fleet of delivery trucks supplied by the terminal [19]. Following that, numerous research proposals were made to address the developing VRPs in their study. The VRPs have been studied for many decades. The VRP is a set of customers with known demands who are serviced by a fleet of trucks from one or more depots to a number of geographically dispersed locations and customers based on optimally designed routes [20–24].

There are many solving methods for variants of the VRP proposed in the literature. The authors of [25] dealt with capacitated VRP and distance restrictions by using an integer programming method that used a constraint relaxation approach and sub-tour elimination. The author of [26] proposed tour-partitioning heuristics to solve the pickup and delivery VRPs, whereas the authors of [27] developed a hybrid heuristic method based on the Genetic Algorithm (GA) with neighborhood search to solve the basic VRPs. They showed that the hybrid GA had a significant improvement over the pure GA and was competitive with the simulated annealing approach [28] and the Tabu search approach [29–31] in their experiment results. The authors of [32,33] proposed hybrid ant colony optimizations (ACOs) to solve the VRPs with time windows and found that they were applicable and effective in practical problems. The authors of [34] used an ACO approach for the multiple VRPs with pickup and delivery along with time windows and heterogeneous fleets and applied it to large-scale problems. The authors of [18] developed a matheuristic approach consisting of two phases: adaptive large neighborhood search (ALNS) and setting partitioning to solve VRPCD. The authors of [35] proposed a particle swarm optimization approach to solve VRPCD and carbon emissions reduction. Moreover, sustainable logistics management is a popular research topic nowadays to follow the United Nations' sustainable development goals [36].

Following the same concept to simulate an ant's behavior as ACO, Jerne (1974) proposed the first AIS model to simulate the immune system as a mathematical formulation to solve optimization problems, which had an interaction network of lymphocytes and molecules that had variable regions [37]. Following Jerne's research, Farmer, Packard, and Perelson (1986) proposed the dynamic immune network, which could simulate and solve classification problems, showing the AIS can be extended to solve big data prediction problems nowadays as machine learning pioneers [38]. Kephart (1994) published a paper on the AIS from a biological point of view to auto-distinguish computer viruses [39]. Hunt et al. (1999) devoted themselves to developing clonal selection algorithms and proposing high-frequency variations [40]. Lately, Mrowczynska et al. (2017) used AIS to predict road freight transportation [41]. Mabrouk, Raslan, and Hedar (2022) proposed an immune system programming with local search (ISPLS) algorithm with a tree data structure to be used in the meta-heuristics programming approach to develop new practical machine learning tools [42]. As a result of many years of development, the AIS has become a well-known meta-heuristic that is widely applied to solve combinatorial optimization and abnormal detection problems.

The AIS mainly simulates the relationship between antigens and antibodies, and the core idea of immune reactions includes antibodies' reproduction, clonal expansion, and immune memory properties in the biological immune system. Organisms have two kinds of immunity: the innate immune system and the adaptive immune system. The innate immune system is capable of recognizing molecular patterns in pathogens and signaling other immune cells to start fighting against the pathogens. Adaptive immune systems can maintain a stable memory of known patterns. Living organisms use the immune system to defend their bodies from invasion by outside substances. Lymphocytes are parts of the immune system, which includes T and B cells. Both types of lymphocytes have surface receptors capable of recognizing molecular patterns present on antigens (binding with epitopes). When the receptors bind to epitopes and exceed a threshold, a lymphocyte becomes activated.

Activation triggers a series of reactions that can lead to the elimination of pathogens. During the infection response, the immune system's B cells produced antibodies. Pathogens are bound by antibodies called antigens. Antigens and antibodies can bind together when complementary shapes exist. After binding, the antibody disables the pathogens so that the immune system can easily destroy them. Figure 2 depicts how to select immune system antibodies [43–46].

There are four types of immune mutations running inside the human body: IgM, IgG, IgE, and IgA [47–50]. In this paper, we simulate each mode having a different mathematical function. First, the calculation of affinity is the total correlations between the antigenantibodies and antibodies-antibodies in our mathematical programming model. If the affinity value of a new string in IgM mode is smaller than that of the old one, a total of four kinds of immune mutations, including IgG mode, IgE mode, and IgA mode, are randomly selected to operate in the next step of mutation in the same generation for optimization purposes.

	- IgM mode: Inverse mutation is used in the IgM mode. In the sequence *s*, randomly selected two positions, *i* and *j*. Inverse the sequence of cells between the *i* and *j* positions in the neighbor of *s*. It should be noted if |*i* − *j*| < 2 it cannot be mutated;
	- IgG mode: Pairwise mutation is used in the IgG mode. In the sequence *s*, randomly selected two positions, *i* and *j*. Swap these two cells in the neighbor of *s*;
	- IgA mode: Insertion mutation is used in the IgA mode. In the sequence s, randomly selected two positions, *i* and *j*. Insert the cell *i* to the position *j* in the neighbor of *s*;
	- IgE mode: Both the swap and insertion mutations are used in the IgE mode. In the sequence *s*, randomly selected two positions, *i* and *j*. A new sequence *s*' is provided by swapping *i* and *j*. Then, in the sequence, *s*' randomly selected *i*' and *j*' to be a cell and a position, respectively. Inserting cell *i* at position *j* in the neighbor of *s*'.

#### 2. Affinity Maturation Simulation Function

Affinity is a positive or negative correlation between an antigen and an antibody. When the affinity is higher, it can generate a better fit between the interacting surfaces of the antibody and antigen. After somatic hypermutation, some variant antibodies with higher affinities may be produced. Then, in the next response, the cells will have a greater affinity. This phenomenon is called affinity maturation;

#### 3. Elimination Simulation Function

The human body's bone marrow generates billions of B cells into circulation every day. Those B cells are saved in a catalog, where there is limited storage space for the B cells. The B cells are dead within a certain period if they meet the specific antigen. Hence, the B-cell catalog is not static, and newly produced antibodies are continually tested against antigen infection. Therefore, new antibodies are generated and old ones are deleted.

#### **3. VRPCD Formulation**

The VRP is traditionally illustrated as a graph network with vertices denoting terminal points and arcs as vehicle routes, as shown in Figure 3. The basic notations for all VRPs are shown as follows:

$$G = (V, E \cup A)\_{\prime\prime}$$

where *V* = {*v*0, ..., *vn*} is a vertex set; *v*<sup>0</sup> represents the central warehouse from which deliveries are made;

**Figure 3.** A simple illustration of the VRP routing network.

*A* = {(*vi*, *vj*): *i* = *j*, *vi*, *vj* ∈ *V*} represents the directed arc set;

*E* = {(*vi*, *vj*): *i* < *j*, *vi*, *vj* ∈ *V*} is a set of undirected edges.

Lee, Jung, and Lee (2006) addressed the constraints of vehicle routing with the one CD warehouse problem. The CD facility plays a key role in synchronizing the distribution process on both sides of the supply chain [17]. As simulated, the CD facility can be treated as the home depot as in the traditional VRPs, except that the model of CD specifies the simultaneous arrival of each vehicle from the receiving trip. Therefore, several assumptions are made. First, we have *n* nodes, denoting a total number of suppliers and retailers, who are serviced by *m* vehicles. Every truck must depart and come back to the depot (*i* = 0), with the simultaneous arrival of trucks from pickup routes. Second, for each customer, only one truck is assigned and associated with a cost amount of *Cij*. Every customer has a homogeneous demand *d*, which is related to the capacity limit *qk* for truck *k*. Additionally, a constraint of the planning time horizon *T* specifies that the total distance traveled by vehicles cannot exceed it. Two types of costs are considered: transportation costs and operational costs. The objective of this research in the mathematical programming model is to find optimized routing solutions by using a minimum number of trucks to service and complete the assignment. The following presents the basic notations of the VRPCD model.

#### **Decision Variables:**

*Xijk*: a binary variable representing the route from *i* to *j* is serviced by vehicle *k*, where

 1, if vehicle *k* is in the tour from *i* to *j*;

*Xijk* = 0, otherwise.
