1 Introduction

High-efficiency and cost-effective logistics and transportation are key for the highly networked businesses of today. However, global supply chains have large carbon footprints. According to recent data from the International Energy Agency, the transportation industry is the third-largest contributor to global carbon emissions, accounting for up to 25% of total emissions. Thus, low-carbon transportation methods must be formulated. The evidence indicates that relying solely on a single mode of transportation is economically inefficient and environmentally damaging [1, 2]. Multimodal transportation—where transport is conducted through waterways, highways, and railways—has thus become foundational to implementing transportation at a global scale. Fundamentally, the challenge in multimodal transport lies in determining the shortest route and selecting the optimal transport mode at each transit node under a given set of constraints, and multimodal transport is thus a nondeterministic polynomial-time (NP)-hard combinatorial optimisation problem.

Researchers have investigated multimodal transport problems and formulated mathematical models that reflect real-world transportation scenarios or local conditions; these models are optimized in terms of route-specific costs, total transportation expenses, delivery times, insurance, and labor costs while accounting for constraints, such as fuzzy demands, time windows, and carbon emissions. Furthermore, a series of methods, ranging from deterministic approaches to evolutionary algorithms, have been employed to obtain viable results. Deterministic approaches, including the breadth-first search algorithm [3], dynamic programming [4], the greedy algorithm [5], and the adaptive large neighborhood algorithm [6], are effective and appropriate for simple cases. Unfortunately, the temporal complexity levels of these exact algorithms increase exponentially in relation to the numbers of transit nodes and constraints. In response to this challenge, evolutionary algorithms have gained increasing attention because of their advantages in complex multimodal transport optimization problems. For instance, Sun et al. [7] and Yang et al. [8] employed a genetic algorithm (GA) to handle multimodal transport tasks and achieved improved convergence and reduced complexity. Guo et al. [9] designed a fast nondominated sorting GA-cellular automata to solve multimodal transport problems and achieved better solutions than those of other approaches in fewer iterations. Wang et al. [10] used triple-phase ant colony optimization (ACO) to generate a multimodal transport route, and the proposed algorithm exhibited effectiveness and feasibility when solving practical multimodal transport cases. Briefly, evolutionary algorithms exhibit excellent performance on large-scale multimodal transport problems due to their powerful search capabilities. However, the existing evolutionary algorithms mainly solve only one of multimodal transport instances in a single run, but, in practice, multimodal transport involves a plurality of interconnected transportation tasks. Nonetheless, a few researchers have investigated the inherent ability of evolutionary algorithms, particularly swarm intelligence methods, to concurrently handle multiple multimodal transport instances.

Multitasking optimization (MTO) [11] is a novel optimization technique in which the inherent parallelism of evolutionary algorithms is used to process multiple tasks. In contrast to traditional evolutionary algorithms, where problems are solved in isolation, MTO provides the necessary means for exploiting the potentially rich stream of knowledge generated during the evolutionary search processes of different optimization tasks. By leveraging such a rich pool of knowledge, different tasks help each other, leading to a significant enhancement in the overall efficiency of the search process for all tasks [11,12,13]. Recently, in the fields of multifactorial optimization (MFO) [11] and multipopulation-based multitasking (MPM) [12], MTO has demonstrated success [14,15,16,17,18,19,20,21,22,23]. However, the existing MTO algorithms also have three limitations, which can be stated as follows.

  1. (1)

    Studies on MTO have indicated that negative information transfer, which compromises multitask performance, is a challenge for MTO [18]. Despite the use of various approaches—such as measuring the correlation of the search space or task similarity [24], establishing a reasonable knowledge transfer point [11, 19], and enhancing intertask information sharing [25]—few studies have focused on negative information transfer from the perspective of population diversity [26].

  2. (2)

    The existing MTO algorithms predominantly employ a random-key unification scheme, wherein each variable of a chromosome is encoded by a real value within a fixed range [0, 1]. Although this representation strategy offers notable flexibility for continuous, discrete, and cross-domain instances [11], it is a suboptimal encoding approach when used to complete a batch of combinatorial optimization tasks [27, 28]. This is principally because an ordering method is utilized to convert real random-key chromosomes into city permutations [11]. This mapping from a continuous domain to a discrete domain may result in additional computational costs in the fitness evaluation stage. Moreover, different real random-key chromosomes may generate the same permutation, leading to a rapid decline in population diversity.

  3. (3)

    The existing MTO methods predominantly rely on algorithms, such as GAs, particle swarm optimization, and firework algorithms, and ACO [29] has rarely been explored for multitask optimization, particularly in multitask combinatorial optimization scenarios.

Motivated by the above analysis, the main contributions of this study are as follows.

  1. (1)

    A measurement of the population diversity observed during the evolution process in a multitasking scenario is formulated, and appropriate parameters are set to control the frequency of information exchange, thereby strengthening the transfer of positive information. Thus, we employ an MPM environment [12], calculating and comparing the diversity of each population with the diversity threshold. Should a population stagnate in terms of evolution due to a lack of diversity, obtaining valuable information from other populations may promote its continued evolution.

  2. (2)

    As an evolutionary algorithm, ACO has the advantages of natural parallelism, global optimization capacity, a lack of problem restrictions, and insensitivity to the initial solution. Compared with other evolutionary algorithms, ACO is superior in terms of finding optimal paths in graphs [29] and can construct a route directly after traversing all nodes, bypassing the aforementioned process of sorting continuous values. These characteristics give ACO a unique advantage in combinatorial optimization problems. Therefore, this article innovatively integrates ACO with MPM and proposes a population diversity-controlled multitask ACO (PDMTACO) algorithms.

  3. (3)

    For the first time, the PDMTACO algorithm is introduced to simultaneously optimize numerous multimodal transport tasks, minimizing the carbon emissions and logistics costs of all tasks.

The remainder of this paper is organized as follows: In Sect. 2, the relevant assumptions and the mathematical model of multimodal transport are presented first, followed by the definition of MTO and a brief introduction to MPM. In Sect. 3, the details of the proposed PDMTACO algorithm are presented, including the evolutionary strategy employed within populations, the methodology for calculating population diversity, and interspecific information transfer processes and a time complexity analysis of the algorithm. In Sect. 4, numerous experiments are conducted and analyzed on typical traveling salesman problem (TSP) and multimodal transport instances to verify the performance of PDMTACO. The conclusion and future work ideas are presented in Sect. 5.

2 Preliminaries

In this section, we first provide a concise overview of the mathematical model for the multimodal transport scenario established in this paper. Next, we introduce the MTO paradigm and the MPM approach.

2.1 Description of Multimodal Transport

Multimodal transport optimization is a permutation-based combinatorial problem that involves selecting the optimal transport mode (e.g., railway, highway, or waterway transportation) at each transit node to minimize, for example, the time taken, money spent, or CO\(_2\) emitted. A general representation of a multimodal transport scenario is presented in Fig. 1.

Fig. 1
figure 1

Schematic of a multimodal transport scenarion

Although many mathematical multimodal transport models have been designed for various scenarios, clear guidelines regarding the number of transit nodes have yet to be established. In this study, multimodal transport specifically refers to the process of planning an optimal path in a multimodal transport network (as illustrated in Fig. 1). All nodes except the starting and ending nodes are considered transit nodes. Therefore, multimodal transport is a type of TSP. However, in contrast with a TSP, the multimodal transport scenario considered here not only accounts for the distances between cities but also involves different transportation modes, several constraints, and various costs. In practical terms, real-world multimodal transport processes are more intricate, and the following assumptions are made.

\(\textcircled {1}\):

The multimodal transport network herein encompasses three transportation modes—railway, highway, and waterway transport, with only one transportation mode allowed between two nodes.

\(\textcircled {2}\):

The freight volume remains constant throughout the entire transportation process.

\(\textcircled {3}\):

Transportation mode switches occur exclusively at nodes, with each node permitted only one transfer.

\(\textcircled {4}\):

Once a transportation mode is selected, the corresponding transport speed remains constant.

\(\textcircled {5}\):

The only pollutant considered in the transportation process is carbon dioxide (CO2).

\(\textcircled {6}\):

Except for the starting and ending nodes, all other nodes are transit nodes, with each node allowed to transit only once during the transportation process.

The notations for the mathematical model are presented in Table 1.

Table 1 Notations used in this study

The objective function is designed to incorporate transportation costs, transportation mode switching costs, transportation carbon emission costs, transportation time costs, transfer-related carbon emission costs, transfer time costs, transportation premiums, and labor costs (as shown in Eq. (1)). Additionally, Eqs. (2) and (3) describe transportation time and carbon emissions constraints, respectively. Consequently, multimodal transport optimization involves minimizing the total cost under these constraints

$$\begin{aligned}&\textrm{Min}C = \sum _{i\in N} \sum _{j\in N} \sum _{k\in H} x_{ij}^k C_{ij}^k d_{ij}^k +\sum _{i\in N}\sum _{k,s\in H} y_i^{ks} C_{i}^{ks}q \nonumber \\&\quad +\left( \sum _{i\in N}\sum _{j\in N}\sum _{k\in H}x_{ij}^k e_k q +\sum _{i\in N}\sum _{k,s\in H}y_i^{ks} r_i^{ks}q\right) r_e \nonumber \\&\quad +\left( \sum _{i\in N}\sum _{j\in N}\sum _{k\in H}x_{ij}^k \frac{d_{ij}^{k}}{v_{ij}^{k}} +\sum _{i\in N}\sum _{k,s\in H}y_i^{ks} \Psi _i^{ks}\right) c \nonumber \\&\quad +\sum _{i\in N}\sum _{j\in N}\sum _{k\in H} I_{ij}^{k} +\sum _{i\in N}\sum _{j\in N}\sum _{k\in H}G_{ij}^k \end{aligned}$$
(1)
$$\begin{aligned}&\sum _{i\in N}\sum _{j\in N}\sum _{k\in H}x_{ij}^{k} e_{k} d_{ij}^{k} q +\sum _{i\in N}\sum _{k,s\in H}y_i^{ks} r_i^{ks}q \le \varepsilon \end{aligned}$$
(2)
$$\begin{aligned}&\sum _{i\in N}\sum _{j\in N}\sum _{k\in H}x_{ij}^k \frac{d_{ij}^{k}}{v_{ij}^{k}} +\sum _{i\in N}\sum _{k,s\in H}y_i^{ks}t_i^{ks}\le \Psi . \end{aligned}$$
(3)

2.2 MTO and MPM Environment

MTO is distinguished by its ability to concurrently address multiple distinct tasks. Consider K distinct single-objective optimization problems that require simultaneous attention. The dimensionality of each task \(T_\omega (\omega =1,2,\ldots ,K)\) is denoted as \(D_\omega \), and the search space and the objective function for task \(T_\omega \) are defined as \(\Omega _\omega \) and \(f_\omega \)(\(f_\omega : \Omega _{\omega }\rightarrow R\)), respectively. If we assume that all K tasks are minimization problems, the objective of MTO can be expressed as follows. Where, \(x_\omega ^{*}\) is the optimal solution for task \(T_\omega \) in \(\Omega _\omega \)

$$\begin{aligned} \{x_1^{*},x_2^{*},\ldots ,x_K^{*}\} =\textrm{armin}\{f_1(x_1),f_2(x_2),\ldots ,f_K(x_K)\}. \end{aligned}$$
(4)

As mentioned above, MTO is designed to simultaneously address a batch of tasks, seeking optimal solutions for all tasks through a continuous information exchange process. Various approaches have been developed to facilitate information sharing by constructing multitasking environments. Two commonly adopted methods are MFO and MPM. Based on the concept of multifactorial inheritance, MFO primarily employs a single population to solve K tasks, implementing assortative mating and selective imitation to achieve vertical gene transfer across the tasks [11]. In contrast, MPM maintains K task-specific populations to address K tasks, each population evolves independently, exchanging information solely at the designated information transfer points [12] (as illustrated in Fig. 2).

Fig. 2
figure 2

MPM environment

MFO and MPM are functionally equivalent in complex systems. Specifically, if both MFO and MPM rely on the same evolutionary algorithm, they can solve multiple tasks in polynomial time, with their spatial complexity levels remaining within the polynomial range [30]. However, the one-to-one mapping between populations and tasks in MPM renders the information exchange process more vivid and intuitive than that in MFO. Therefore, we use MPM to construct the multitask environment.

3 Proposed PDMTACO Algorithm

ACO is integrated with MPM to introduce PDMTACO, which is a methodology for concurrently addressing multiple multimodal transport problems in a single execution. First, K task-specific populations operate in parallel, with ACO simultaneously functioning as the optimizer for each task. Furthermore, to potentially prevent premature convergence in each population, we present a straightforward yet effective pheromone update strategy in Sect. 3.1. Subsequently, we elaborate on the population diversity measurement process in Sect. 3.2. The knowledge transfer process and pseudocode of PDMTACO are detailed in Sect. 3.3. Finally, the temporal complexity of PDMTACO is analyzed in Sect. 3.4.

3.1 Intraspecific Evolution Based on ACO

K task-specific populations are deployed to concurrently address K multimodal transport problems. Each population, denoted by \(P_\omega (\omega =1,2,\ldots , K)\), is assigned to the \(\omega \textrm{th}\) task. The population size of population \(P_\omega \) is m, and the maximum number of iterations for \(P_\omega \) is set to maxiter. \(\alpha (\alpha \in R)\) represents the importance of the pheromone trail,\(\beta (\beta \in R)\) represents the significance of the heuristic information, \(\rho (\rho \in (0,1))\) denotes the pheromone evaporation factor, and \(\tau \) signifies the initial allocation of pheromones on the edges between two nodes. The evolution process of \(\forall P_\omega \) involves the following steps:

Step 1: \(\forall P_\omega (\omega =1,2,\ldots , K)\), a population with m individuals is generated and initialized at random.

Step 2: In each \(P_\omega \), artificial ants depart from the initial city and repeatedly select the next vertex (or city) j in a graph (similar to that shown in Fig. 1) according to the probability formula \(P_{ij}^{\omega , \delta }\) given by Eq. (5) to construct a multimodal transport solution

$$\begin{aligned} P_{ij}^{\omega ,\delta }(t)={\left\{ \begin{array}{ll} \frac{[{\tau _{ij}^{\omega }(t)}]^{\alpha } \cdot [{\eta _{ij}^{\omega }(t)}]^{\beta }}{\sum _{j\in \textrm{allowed}}[\tau _{ij}^{\omega }(t)]^{\alpha } \cdot [\eta _{ij}^{\omega }(t)]^{\beta }} &{}{j\in \textrm{allowed}} \\ 0 &{}{j \notin \textrm{allowed}}, \end{array}\right. } \end{aligned}$$
(5)

where j represents the node chosen by an ant \(\delta \) belonging to the population in \(P_\omega \); and \(\tau _{ij}^{\omega }(t)\) and \(\eta _{ij}^{\omega }(t)\) indicate the pheromone concentration of the path and the heuristic information between node i and j in \(P_\omega \) at generation t, respectively.

Step 3: An adaptive pheromone update strategy is employed once the artificial ants traverse all nodes. The MAX-MIN Ant System (MMAS), an enhanced ACO variant that confines the pheromone on each path within a specified range \([T_\textrm{min},T_\textrm{max}]\), was introduced to ensure that each ant can explore and exploit the search space. However, research has demonstrated that the MMAS is very sensitive to the values of \(T_\textrm{min}\) and \(T_\textrm{max}\), with the evolution speed of a population potentially slowing down if this system is used to initialize the pheromones [31]. In this context, we leverage the advantages of the MMAS and incorporate an adaptive pheromone update strategy to address its limitations.

For each \(P_\omega \), the upper bound of the corresponding pheromone \(T_\textrm{max}^{\omega }\) is set to \(1/f_{gb}^{\omega }(t)\) (as shown in Eq. (6)), where \(f_{gb}^{\omega }(t)\) represents the global minimum of \(P_\omega \) at generation t. In addition, the scale factor scaf is employed to define the lower bound of pheromone \(T_\textrm{min}^{\omega }\) (as shown in Eq. (7))

$$\begin{aligned}&T_\textrm{max}^{\omega }=1/f_{gb}^{\omega }(t) \end{aligned}$$
(6)
$$\begin{aligned}&T_\textrm{min}^{\omega }=T_\textrm{max}^{\omega } \cdot scaf. \end{aligned}$$
(7)

Given that multimodal transport is a minimization problem, the values of \(T_\textrm{max}^{\omega }\) and \(T_\textrm{min}^{\omega }\) gradually increase during each iteration \(P_\omega \). This approach helps prevent premature convergence to some extent in the early stages and accelerates convergence later in the iterative process.

After an ant traverses all nodes, a two-stage pheromone update is performed by following Eqs. (8) and (9). Here, \(\Delta \tau \) represents the pheromone left by the best-so-far ant in \(P_\omega \), and \(\Delta \tau ^*\) denotes the amount of pheromone deposited by the optimal ant in \(P_\omega \) after completing the information transfer step (as discussed in Sect. 3.3). Considering that \(\Delta \tau \) and \(\Delta \tau ^*\) depend on the quality of the current optimal solution \(f_{gb}^{\omega }(t)\), we set \(\Delta \tau (\Delta \tau ^*)=Q/f_{gb}^{\omega }(t)\), where Q is a constant

$$\begin{aligned}&\tau _{ij}^{\omega }(t+1)=(1-\rho ) \cdot \tau _{ij}^{\omega }(t)+\Delta \tau \end{aligned}$$
(8)
$$\begin{aligned}&\tau _{ij}^{\omega }(t+1)=(1-\rho ) \cdot \tau _{ij}^{\omega }(t)+\Delta \tau ^*. \end{aligned}$$
(9)

Step 4: For each \(P_\omega \), ACO terminates when the iterative evolutionary process of the population reaches the specified termination iteration maxiter or when the global optimal solution is determined; otherwise, the process returns to step 2.

3.2 PDMTACO with Population Diversity

Population diversity distinctly characterizes the distribution differences among individuals. Evaluating the diversity of a population can indicate the necessity of information transfer. Variance, as one of the most commonly used indicators for measuring the degree of data dispersion, effectively reflects the deviations between data points and their mean values. Accordingly, for each population (\(\forall P_{\omega }\)), the fitness values of all individuals in \(P_\omega \) and the average fitness of the population \(\overline{f^{P_{\omega }}}\) are utilized to formulate and describe the fitness variance of \(P_\omega \) as follows:

$$\begin{aligned} S_{P_\omega }=\sqrt{\frac{1}{m} \sum _{\delta =1}^{m}{(f_\omega ^\delta -\overline{f^{P_{\omega }}}})^2}, \end{aligned}$$
(10)

where \(S_{P_\omega }\) represents the fitness variance of \(P_\omega \). \(f_\omega ^{\delta }(\delta =1,2,\ldots ,m; \omega =1,2,\ldots ,K)\) denotes the fitness value of the \(\delta \textrm{th}\) ant belonging to \(P_\omega \). At high values of \(S_{P_{\omega }}\), the individuals belonging to \(P_\omega \) exhibit significant differences in their fitness values, indicating high diversity in \(P_\omega \). Conversely, smaller values of \(S_{P_{\omega }}\) indicate low diversity in \(P_\omega \).

Fig. 3
figure 3

Information transfer process in PDMTACO

As mentioned, the setting of the information transfer parameter can directly affect the intensity of the information interactions among tasks. In this context, the mean diversity \(\overline{S_{P_\omega }}\) across successive populations is employed as the knowledge transfer point (as shown in Eq. (11))

$$\begin{aligned} {\left\{ \begin{array}{ll} {\text {Generate information transfer need}}, &{}{\textrm{if} \quad S_{P_\omega }\le \overline{S_{P_\omega }}} \\ {\text {No need for information transfer}}, &{}{\textrm{if} \quad S_{P_\omega }> \overline{S_{P_\omega }}}. \end{array}\right. } \end{aligned}$$
(11)

Empirically, population diversity typically diminishes during the later stages of the population evolution process. Assessing the diversity across all generations can often be computationally expensive and is therefore impractical. Population diversity is measured only when generation t is greater than maxiter/2, ensuring that PDMTACO is computationally feasible.

3.3 PDMTACO with Intertask Information Transfer

Previous research has identified “when to transfer”, “how”, and “what to transfer” as the three crucial issues involved in multitasking [13]. As mentioned earlier, population diversity estimation effectively addresses the “when to transfer” problem. Concerning the “how and what to transfer” aspect of in PDMTACO, a crossover operator is introduced to facilitate information transfer across tasks. Specifically, if \(P_\omega ({\omega =1,2,\ldots , K)}\) generates an information transfer requirement, the best-so-far solutions of the remaining populations are sorted, and the best city permutation among all remaining tasks is selected. This selected permutation is then introduced to the best-so-far route of \(P_\omega \) to execute the crossover operation (as shown in Fig. 3). Additionally, we incorporate the entire information migration process into a simulated annealing (SA) algorithm [32] to iteratively enhance the communication of positive information communication. And the maximum iteration number of SA is set to \(Max_{SA}\).

Notably, different multimodal transport scenarios may involve different dimensions. Consequently, the crossover operation might generate city nodes that do not belong to a specific task during the information transfer process. To address this issue, two different scenarios are considered. Furthermore, a multitasking group with two independent instances named \(T_1\) and \(T_2\) is utilized as an example to analyze these situations. Here, the dimensions of \(T_1\) and \(T_2\) are denoted as \(D_1\) and \(D_2\), respectively. For clarity, we assume that \(D_1 > D_2\).

3.3.1 Information Transfer During Multimodal Transport from Low Dimensions to High Dimensions

Assume that task \(T_1\) triggers an information transfer demand, with the best-so-far solutions for \(T_1\) and \(T_2\) being \(T_{1,best}\rightarrow [1,7,4,0,8,9,3,6,5,2]\) and \(T_{2,best}\rightarrow [5,2,0,7,3,4,6,1]\), respectively.

(1) Select the crossover segment: The starting and ending points are randomly determined to establish the crossover segment for \(T_{1,best}\). For example, nodes 4, 0, 8, and 9 in \(T_{1,best}\) are selected to constitute a crossover segment, which is denoted by \(C_{T1}\) in Fig. 4.

Fig. 4
figure 4

Randomly generated crossover segment for \(T_{1best}\)

(2) Remove nodes outside the low multimodal transport dimensions: Given that \(D_1 > D_2\), nodes 8 and 9 belonging to \(C_{T1}\) are not present in [5, 2, 0, 7, 3, 4, 6, 1]. Therefore, these nodes are excluded, resulting in the final crossover fragment for \(T_{2,best}\) (denoted as \(C_{T2}\) in Fig. 5).

Fig. 5
figure 5

Nodes outside the low-dimensional multimodal transport domain are eliminated

(3) Information transfer: The crossover operation is performed between \(T_{1,best}\) and \(T_{2,best}\), and \(C_{T2}\) is transferred to \(C_{T1}\) to generate a new node (or city) permutation \(T_{1,best}^{new}\rightarrow [1,7,0,4,8,9,3,6,5,2]\). The information transfer process is illustrated in Fig. 6. If the fitness value of \(T_{1,best}^{new}\) is lower than that of \(T_{1,best}\), \(T_{1,best}\) is substituted by \(T_{1,best}^{new}\); otherwise, substitution is not feasible.

Fig. 6
figure 6

Process of information transfer during multimodal transport between low dimensions to high dimensions

3.3.2 Information Transfer During Multimodal Transport Between High Dimensions and Low Dimensions

Assume that task \(T_2\) initiates an information transfer demand, with the best-so-far solutions for \(T_1\) and \(T_2\) being \(T_{1,best}\rightarrow [1,7,4,0,2,9,3,6,5,8]\) and \(T_{2,best}\rightarrow [7,2,1,5,3,4,0,6]\), respectively.

(1) Select the crossover segment: Through a method similar to the aforementioned approach, the starting and ending points are randomly determined to establish the crossover segment for \(T_{2,best}\). For example, nodes 1, 5, 3, and 4 in \(T_{2,best}\) are selected as the crossover segment, which is denoted as \(C_{T_2}^*\) in Fig. 7.

Fig. 7
figure 7

Randomly generated crossover segment for \(T_{2,best}\)

(2) Retrieve city nodes from \(T_{1,best}\) based on \(C_{T2}^*\): Because the crossover segment in Fig. 7 contains cities 1, 5, 3, and 4, city nodes 1, 4, 3, and 5 in \(T_{1,best}\) form a crossover fragment denoted by \(C_{T1}^*\) (as shown in Fig. 8).

Fig. 8
figure 8

Retrieval of nodes from \(T_{1,best}\) based on \(C_{T2}^*\)

(3) Information transfer: The city nodes in \(T_{2,best}\) are rearranged according to the city permutation of \(C_{T1}^*\), and a new node sequence \(T_{2,best}^{new}\rightarrow [7,2,1,4,3,5,0,6]\) is generated (as shown in Fig. 9). If the fitness value of \(T_{2,best}^{new}\) exceeds that of \(T_{2,best}\), \(T_{2,best}\) is substituted by \(T_{2,best}^{new}\); otherwise, substitution is not feasible.

Fig. 9
figure 9

Process of information transfer during multimodal transport from high dimensions to low dimensions

The pseudocode of PDMTACO is presented in algorithm 1 as follows.

Algorithm 1
figure a

PDMTACO

3.4 Temporal Complexity Analysis of the PDMTACO Algorithm

The computational costs of PDMTACO for K tasks include two parts: (1) the computational costs of the independent searches implemented for the K tasks, and (2) the computational cost of performing information transfer among the K tasks. Herein, we assume that the maximum number of PDMTACO iterations is set to maxiter, and the maximum number of SA iterations is set to iterSA. The size of each population \(P_\omega (\omega =1,2,\ldots ,K)\) is m. The dimensionality of each task is \(D_\omega \), and \(D=max\{D_\omega \}\). The specific analysis is as follows.

(1) The computational costs of the independent searches implemented for K populations.

\(\textcircled {1}\) Initialize the pheromones on the construction graph for K tasks, and their total cost is \(O(K \cdot D^2)\).

\(\textcircled {2}\) Calculate the selection probability via (5), and the total cost for K tasks after maxiter iterations is \(O(K \cdot maxiter \cdot m \cdot D^2)\).

\(\textcircled {3}\) Calculate the objective function by (1), and its total cost for K tasks after maxiter iterations is \(O(K \cdot maxiter \cdot m \cdot D)\).

\(\textcircled {4}\) Update the pheromones by (8), and their total cost for K tasks after maxiter iterations is \(O(K \cdot maxiter \cdot m \cdot D^2)\).

\(\textcircled {5}\) Compare and obtain the global minimum, and its total cost for K tasks after maxiter iterations is \(O(K \cdot maxiter \cdot m)\).

Therefore, the total time complexity of the independent searches implemented for the K tasks is \(O(K \cdot maxiter \cdot m \cdot D^2)\).

(2) The computational cost of information transfer among different tasks. Assume that the K populations undergo a total of \(\varphi \) information transfers.

\(\textcircled {1}\) Calculate the population diversity via (10), and its total cost for K tasks after maxiter iterations is \(O(K \cdot maxiter \cdot m)\).

\(\textcircled {2}\) Sort and select the best-so-far solutions from the remaining populations, and the corresponding cost is \(O(\varphi \cdot K \cdot log K)\).

\(\textcircled {3}\) Implement information transfer among the tasks, and the total cost after iterSA is \(O(\varphi \cdot iterSA \cdot D)\).

\(\textcircled {4}\) Calculate the fitness values of the newly generated individuals after performing information transfer, and the total cost after iterSA is \(O(\varphi \cdot iterSA \cdot D)\).

\(\textcircled {5}\) Compare and obtain the global minimum after executing information transfer, and the total cost after iterSA is \(O(\varphi \cdot iterSA)\).

\(\textcircled {6}\) Update the pheromones by (9), and the total cost is \(O(\varphi \cdot m \cdot D^2)\).

From (1) and (2), the total time complexity is \(O(K \cdot maxiter \cdot m \cdot D^2)+ O(\varphi \cdot m \cdot D^2)\). Thus, for \(K \cdot maxiter > \varphi \), the total time complexity of PDMTACO is \(O(K \cdot maxiter \cdot m \cdot D^2)\). That is, our proposed PDMTACO algorithm is able to perform multiple tasks in polynomial time.

4 Experimental Study

We experimentally evaluated of our proposed PDMTACO method on a set of benchmark instances from the TSP family and then applied PDMTACO to multimodal transport, to demonstrate its practical utility. The results demonstrated that the accelerated convergence characteristics and improved solution quality were derived from the use of PDMTACO. Therefore, we conducted performance comparisons between a single-task ACO method without information transfer and the developed PDMTACO algorithm for both on TSP and multimodal transport instances. This comparison emphasized that any performance enhancement achieved by PDMTACO was attributable to the presence of the information transfer process controlled by population diversity. To conduct fair comparisons, the parameters for the baseline single-task ACO and PDMTACO algorithm were set to values that were as identical as possible.

4.1 PDMTACO for Optimizing Benchmark TSP Instances

Because multimodal transport is a type of TSP, we selected eight popular TSP instances, namely, oliver30, ch31, att48, eil51, berlin52, st70, eil76, and rd100, from the TSPLIB repository [33]. The dimensions of these instances were 30, 31, 48, 51, 52, 70, 76, and 100, respectively. We combined them to create nine distinct groups of multitasking instances with diverse dimensions, each comprising two tasks, such as (oliver30, att48), (oliver30, eil51) and (ch31, att48), and so forth. These groups were used to test the effectiveness of PDMTACO. If only a single TSP instance, e.g., oliver30, was addressed by single-task ACO, it is denoted as (oliver30, None). The computational complexity of the TSP increases incrementally with the number of city nodes. Therefore, optimization becomes much more challenging when the constituent TSP tasks have more dimensions.

4.1.1 Experimental Results Analysis for Multitasking TSP Instances

The parameters of multitask PDMTACO and single-task ACO were set as follows: the maximum number of iterations maxiter was 500, and the population size m was fixed at 50. The values of \(\alpha \) and \(\beta \) were 1 and 3, respectively. The exact values of parameters scaf and Q were 0.001 and 1, respectively. Additionally, the parameters for SA, such as the initial temperature \(T_0\) and the maximum number of iterations \(Max_{SA}\), were both set to 100, while the final temperature \(T_{final}\) was set to 0.01.

The best-known optimal tour length, whether in integer or real form, served as a benchmark for comparison with the proposed method. The only difference between the two approaches lied in the use of integer numbers to measure the distances between cities for the integer tour length, while floating-point numbers were employed for the real tour length. Real tour lengths were exclusively utilized throughout the experiments discussed in Sect. 4.1. Table 2 presents the optimal real tour lengths (Opt) for the selected cases.

Table 2 Best-known optimal real tour lengths for the selected TSP instances

Table 3 summarizes the average fitness values (Avg) and global fitness values (Best) produced over 20 independent runs, along with their relative errors, which are calculated as follows:

$$\begin{aligned} {\text {Relative error}}=(Best-Opt)/Opt\cdot 100\%. \end{aligned}$$
(12)
Table 3 Experimental results produced for the multitask TSP instances

As indicated by the data in Table 3, single-task ACO performed well on low-dimensional TSP instances such as (oliver30, None) and (ch31, None). In contrast, our proposed multitasking approach with PDMTACO outperformed its counterparts under city dimensions ranging from 48 to 100. Specifically, PDMTACO achieved the best-known optimal tour length on instances such as (oliver30, att48), (oliver30, eil51), (ch31, att48), (att48, eil51), and (eil51, berlin52). Notably, in the multitasking group (eil51, st70), the global optimum of st70 even surpassed the best-known optimal solution. However, the global optima of multitasking instances such as (eil51, eil76) and (eil76, rd100) were slightly inferior to the best-known optimal solutions. This was due to the higher dimensionality of instances such as eil76 and rd100, making them more challenging to optimize, whereas eil51 could only provide partial information to eil76. A similar phenomenon was observed in (eil76, rd100). In contrast, the average fitness values and global fitness values achieved by PDMTACO on high-dimensional TSP instances were significantly better than those achieved by the baseline ACO algorithm. Specifically, the relative errors induced for single tasks (st70, None), (eil76, None), and (rd100, None) were 5.48, 4.64, and 4.26%, respectively. In multitasking instances, the relative errors for (eil51, st70), (eil51, eil76), and (eil76, rd100) were (1.78%, \(-\) 0.22%), (1.53%, 0.17%), and (1.88%, 0.16%), respectively. These improvements were likely because a stagnant population with a loss of diversity can automatically and consistently exploit valuable information from other tasks, leading to a significantly enhanced solution quality in different multitasking environments. This result was corroborated by the Wilcoxon signed-rank test (Table 4), where PDMTACO was compared with single-task ACO, with the confidence level set to 99%.

Table 3 also shows the average real optimization times required over 20 independent runs when PDMTACO coped with different multitasking TSP instances. Specifically, the running time of PDMTACO was calculated until a global optimum was reached. The computer equipment used to run the programs is described as follows: an 11th Gen Intel(R) Core(TM) i7-1165G7 CPU @ 2.80GHz. Moreover, the running time was measured in seconds. According to the results indicated in Table 3, the real optimization times required for (oliver30, att48), (oliver30, eil51), (ch31, att48), (ch31, eil51), (att48, eil51), (eil51, berlin52), (eil51, st70), (eil51, eil76), and (eil76, rd100) were 95.94 s, 96.54 s, 102.74 s, 106.56 s, 139.52 s, 131.75 s, 292.58 s, 371.11 s and 586.01 s, respectively. That is, as the dimensionality of the multitasking TSP instances increased, the optimization time increased progressively.

Table 4 Wilcoxon signed-rank test results obtained by single-task ACO and multitask PDMTACO for TSP instances

Additionally, Fig. 10 depicts the average convergence trends produced for different TSP instances in both single-task and multitask environments. The convergence performance of our proposed multitasking approach (PDMTACO) significantly surpassed that of single-task ACO in these environments. In contrast, single-task ACO could rapidly converge to global optima in the low-dimensional tasks but was susceptible to being trapped at local optima in the high-dimensional instances, primarily because of the lack of external assistance during the evolutionary stasis process occurring in the single-task population.

Fig. 10
figure 10

Average convergence trends produced for different TSP instances during single-tasking and multitasking

4.1.2 Experimental Results Comparison Among PDMTACO, the MFEA, and dMFEA-II on TSP Instances

To further underscore the effectiveness of the proposed PDMTACO algorithm, we compared it with state-of-the-art multitasking algorithms, such as the MFEA [11] and dMFEA-II [34]. Notably, both the MFEA and dMFEA-II employ similar multitasking engines. Furthermore, dMFEA-II is essentially a discrete version of MFEA-II, implying that it enables MFEA-II to be directly applied to permutation-based discrete optimization problems.

For the selective deletion of multitasking instances [11, 34], the MFEA and dMFEA-II only enumerated three multitasking groups, as shown in Table 5. The best results of each algorithm were considered for comparison purposes, with the label ’–’ denoting ’not available’. As indicated by the data in Table 5, PDMTACO outperformed the MFEA and dMFEA-II on instances (eil51, berlin52), (eil51, st70), and (eil51, eil76). Specifically, the gaps between the MFEA and PDMTACO on TSP instances (eil51, berlin52), (eil51, berlin52) and (eil51, eil76) were (18.63, 585.93), (9.87, 70.59), and (10.94, 50.68), respectively. The gaps between dMFEA-II and PDMTACO on the above-mentioned TSP instances were (21.43, 534.43), (12.67, 44.09), and (13.74, 38.78), respectively. In general, regulating information transfer by varying the diversity of populations in a multitask environment can enhance the solution quality and convergence performance of the utilized model across all tasks.

Table 5 Comparison among PDMTACO, the MFEA, and dMFEA-II
Table 6 Various unit transportation costs for tasks \(T_1\) and \(T_2\)
Table 7 Various transfer costs for tasks \(T_1\) and \(T_2\)
Table 8 Transportation tasks \(T_1\) and \(T_2\)
Table 9 Experimental multimodal transport results obtained by single-task ACO and multitask PDMTACO

4.2 PDMTACO for Multimodal Transport Optimization

Two distinct multimodal transport tasks, \(T_1\) and \(T_2\), were concurrently addressed. \(T_1\) and \(T_2\) had the same unit transportation cost, speed, carbon emissions, transportation premium, and labor cost if the same transport mode was selected (as shown in Table 6). Similarly, \(T_1\) and \(T_2\) had the same transfer cost, transfer time cost, and transfer carbon emissions cost if the same transfer mode was selected (as detailed in Table 7). Additionally, \(T_1\) and \(T_2\) had the same carbon tax, time cost, and freight volume. However, the cities involved in the transportation processes, the carbon emissions limitations, and the time restrictions differed between \(T_1\) and \(T_2\) (as outlined in Table 8).

Task \(T_1\) had 77 cities, and task \(T_2\) had 78 cities. The Mercator projection method was used to convert the longitude and latitude of each city into planar coordinates. Subsequently, the Euclidean distance was used to measure the highway, railway, and waterway distances between each pair of cities. Additionally, the values of \(r_e\), c, and q were set to 1.5, 1.2, and 1, respectively. In the evaluation experiments, the specific PDMTACO algorithm was the same as that presented in the previous section. However, unlike the TSP, multimodal transfer involves certain constraints, which may generate search results indicating infeasible individuals who violate the imposed transportation time and carbon emissions’ constraints. In the fitness evaluation stage, the solutions involving individuals violating any of the constraints were discarded.

In the experiments, the maximum number of iterations maxiter was set to 200, and the values of m, \(\alpha \), \(\beta \), Q, scaf, and \(T_0\), \(T_{final}\), and \(Max_{SA}\) were set to be the same as those listed in Sect. 4.1. The experimental results for multimodal transport results obtained by single-task ACO and multitask PDMTACO over 20 independent runs are listed in Table 9.

Table 10 Wilcoxon signed-rank test results obtained by single-task ACO and multitask PDMTACO in multimodal transport instances
Fig. 11
figure 11

Average convergence trends produced for different multimodal transport instances

Fig. 12
figure 12

Optimal multimodal transport route map for task \(T_1\) and task \(T_2\) during multitasking

The results in Table 9 indicate that the PDMTACO algorithm outperformed its counterparts in terms of multimodal transport optimization. Relative to those of single-task ACO, the time cost, carbon emissions, transportation premium, and total cost of the proposed algorithm for task \(T_1\) were reduced by 5.38 h, 131.47 kg, 25 RMB, and 472.29 RMB, respectively. The corresponding reduction percentages achieved for the time, carbon emissions, transportation premium, and total cost metrics in task \(T_1\) were 3.35%, 5.63%, 0.91%, and 4.06%, respectively.

For task \(T_2\) in Table 9, the time cost, carbon emissions, transportation premium, and total cost were reduced by 40.16 h, 140.16 kg, 60 RMB, and 510.42 RMB, respectively, corresponding to reduction percentages of 12.99%, 1.89%, 1.79%, and 3.43% for the time, carbon emissions, transportation premium, and total cost metrics of task \(T_2\), respectively. Thus, adopting the multitask PDMTACO engine to solve a batch of multimodal transport problems simultaneously could substantially reduce the associated logistics costs and carbon emissions.

Table 9 also presents the average real optimization times required over 20 independent runs. When concurrently addressing two multimodal transport optimization problems with 77 and 78 cities, the average running time was approximately 820.43 s. Due to the problem scale and multiple constraints, the real operation time of a multitask multimodal transport scenario is obviously much longer than that of a TSP instance, but it remains within an acceptable range.

Moreover, Table 10 presents the results obtained for a Wilcoxon signed-rank test with a 99% confidence level applied to the aforementioned experimental multimodal transport results; the results indicated a statistically significant difference between PDMTACO and the baseline ACO method.

The average convergence trends of tasks \(T_1\) and \(T_2\) are depicted in Fig. 11. The curve corresponding to multitasking (\(T_1\), \(T_2\)) or (\(T_2\), \(T_1\))) produced by PDMTACO surpassed the average performance of single-task ACO when (\(T_1\), None) or (\(T_2\), None) were solved in isolation, exhibiting preferable overall convergence features. Because the same intraspecific evolution strategies are utilized in PDMTACO and ACO, this achievement can be entirely attributed to the full exploitation of route information through information transfer. Moreover, calculating the population diversity to determine whether to implement information transfer could prevent ineffective information migration steps. The optimal multimodal transport route maps of tasks \(T_1\) and \(T_2\) are presented in Fig. 12.

4.3 Experimental Summary

In brief, from the experimental results illustrated in Sects. 4.1 and 4.2, we can observe the following. (1) Our proposed PDMTACO algorithm could achieve the optimal real tour lengths for most of the selected TSP instances but was slightly inferior in the high-dimensional TSP instances. (2) In contrast to the baseline ACO algorithm, PDMTACO could simultaneously accelerate the convergence processes of multiple tasks. In addition, PDMTACO could significantly enhance the solution quality of multiple TSP instances and reduce the total cost for each practical multimodal transport optimization problem. (3) PDMTACO exhibited superior performance to that of several state-of-the art evolutionary multitasking algorithms, such as the MFEA and dMFEA-II, on numerous TSP instances. (4) PDMTACO could solve a batch of TSP instances or numerous multimodal transport problems within an acceptable period.

5 Conclusions

This study aimed to address the challenges associated with multiple concurrent multimodal transport optimization problems by introducing a multitasking engine called PDMTACO, which integrates ACO and MPM. In particular, PDMTACO monitors the population diversity of each task-specific population to mitigate the transfer of negative information. When a population becomes trapped in a local optimum due to insufficient diversity, PDMTACO extracts valuable route information from other tasks, enhancing the evolution process of the stagnant population. Experimental results obtained on nine diverse groups of benchmark TSP instances and two entirely distinct multimodal transport problems affirmed that PDMTACO not only provided enhanced solution quality but also accelerates the convergence process. In future work, we aim to extend the applicability of PDMTACO and refine its suitability for addressing more intricate dynamic or multiobjective multitask optimization problems.