Introduction

The amount of concrete needed in the construction of projects is enormous, requiring transportation of concrete from the mixing station to the construction site by trucks. The concrete dispatching in construction is, however, chaotic and causes grievous waste due to the tight construction schedule, heavy tasks, and improper transport vehicle dispatching by the constructor1,2,3,4. Hence, it is necessary to develop a proper optimization plan to realize trucks' rational dispatching conveniently.

Mathematically, the dispatching of trucks is a mixed-integer. It is a programming problem, which constitutes an NP-hard problem academically that is difficult to solve. Bionic algorithms that imitate various ecosystems in nature can get better results in solving many complex optimization problems, which are practical, versatile, flexible, and efficient. Therefore, bionic algorithms have become an important direction and research hotspot for solving optimization problems in recent years5,6.

Kennedy and Eberhart, inspired by the foraging behavior of birds in nature, proposed a particle swarm optimization (PSO) algorithm in 19957. Because of its simple structure and fast convergence, PSO is widely used to solve optimization problems. There have been numerous modified PSO algorithms focusing on different aspects of the algorithm by far. The standard PSO algorithm (PSO-S) is as follows8,9,10,11:

$${\varvec{v}}_{p}^{t + 1} = \omega {\varvec{v}}_{p}^{t} + c_{1} {\varvec{r}}_{1} \left( {{\varvec{pbest}}_{p}^{t} - {\varvec{x}}_{i}^{t} } \right) + c_{2} {\varvec{r}}_{2} \left( {{\varvec{gbest}}^{t} - {\varvec{x}}_{p}^{t} } \right)$$
(1)
$${\mathbf{x}}_{p}^{t + 1} = {\mathbf{x}}_{p}^{t} + {\mathbf{v}}_{p}^{t + 1}$$
(2)

where, p = 1, 2, … N is the population size; w is the weight of inertia; \({{\varvec{v}}}_{p}^{t}\) and \({{\varvec{x}}}_{p}^{t}\) are the velocity and position and direction vectors of particle p in the t-th generation; \({{\varvec{p}}{\varvec{b}}{\varvec{e}}{\varvec{s}}{\varvec{t}}}_{p}^{t}\) and \({{\varvec{g}}{\varvec{b}}{\varvec{e}}{\varvec{s}}{\varvec{t}}}^{{\varvec{t}}}\) are the individual optimal of particle p of the t-th generation and the global optimal of all particles; c1 and c2 are the individual perceived weights and the overall social weights; r1 and r2 are two random D-dimensional vector parameters evenly distributed in [0, 1].

Scholars have paid attention to vehicle dispatching. Javier et al.1 introduced the balanced dispatching problem in passengers transport services (BDP-PTS) on demand, which seeks a dispatching solution that aims to minimize the variance of the incomes per unit of working time among the drivers. In addition, computational experiments are carried out to compare the proposed online dispatching algorithms and the MIQP model on datasets of real complete instances from a Chilean transport company. Chen et al.2 proposed an approach that allows data-driven and schedule-oriented supply chain coordination in the face of demand fluctuations, and demonstrated the coordination approach through an example project featuring a 5-day in-situ construction of concrete walls. Lin et al.3 described the scheduling operation of ready mixed concrete (RMC) trucks as a circulating job shop problem in a multi-objective programming model, and points out that the total waiting time from the mixing station shall not exceed 1.5 h to maintain the concrete quality during the driving of the ready mixed transport truck. Liu et al.4 focused on the integration of ready mixed concrete production scheduling and truck and pump scheduling in a ready mixed concrete (RMC) plant with multiple mixers, and proposed a spatiotemporal network model that combines RMC production and vehicle scheduling. Ostroukh et al.12 proposed the scientific approach to the problem for automation transportation planning construction materials in the two-tier control system. Yan et al.13 employed problem decomposition and relaxation techniques, with a mathematical programing solver, to develop an algorithm that is capable of efficiently solving the problem. Aleksander14 presented a model for the selection of optimal transportation system inside the precast concrete manufacturing plant, which ensures that the fullest possible use of equipment resources, in this case, rail trolleys capacity, and minimization of their journey number. Srichandum and Rujirayanyong15 built a model based on bee colony optimization (BCO) to find the best dispatching plan that minimizes the total waiting time of ready mixed concrete (RMC) trucks on the construction site. Zeng et al.16 based on the reverse method of PSO, solved the queuing network problem with fuzzy data in a specific transport system. Some scholars focused on the opportunity constraints in concrete vehicle dispatching17, fuel cost minimization dispatching18, and entrusting MAS to solve the constraint problems19. Kim et al.20 proposed a dynamic model for PC production scheduling by adopting a discrete-time simulation method to respond to due date changes in real time and by using a new dispatching rule that considers the uncertainty of the due dates to minimize tardiness. Rau et al.21 proposed a discrete multi swarm particle swarm optimization (PSO) algorithm and a heuristic optimization algorithm to generate the Pareto set of mocgirp, and applied various sensitivity analysis settings of multiple parameters (available vehicles, vehicle capacity, vehicle fuel efficiency, warehouse capacity and warehouse energy consumption) to MT and St routing methods. Some methods consider the influence of some influencing factors to the objective function considers and some consider minimal constraints. However, their applicability is poor, such as order modification and vehicle failure are not considered, and the problem of minimizing the waiting time of vehicles and mixing stations is not fully considered, which is often important for the construction site.

This study analyzed each influencing factor in detail, proposed a more realistic objective function in the dispatching algorithm and offered a solution to the rational dispatching of trucks for different waiting times based on actual problem requirements. Meanwhile, it described and improved the initialization and iterative process in the calculation process in detail. It also provided solutions to the dynamic changes of temporarily increasing or canceling orders and increasing or decreasing the number of available trucks.

Algorithm model optimization

Modeling

Combined with the problem of truck dispatching, the worksite is selected as the updated position of the particle swarm (x). Then, the concrete demand sites were numbered sequentially (1, 2, 3, … xmax). By counting the total demand for concrete, the total number of departures (Ngc) required to complete the task was calculated. Then, the solution to this problem has Ngc-dimensional coordinates; namely, each particle p corresponds to Ngc-dimensional data. For example:

$${\mathbf{x}}_{p} = \left[ {x_{1} ,x_{2} , \ldots x_{{N_{{{\text{gc}}}} }} } \right]$$
(3)

where, \({x}_{1}\) is the sequence number of the worksite selected for the first departure, and \({x}_{{N}_{\text{gc}}}\) is the sequence number of the worksite selected for the last departure.

Since x is only an integer, the particle velocity should also be taken as an integer, and Eq. (1) is modified as follows:

$${\mathbf{v}}_{p}^{t + 1} = \left\langle {\omega {\mathbf{v}}_{p}^{t} + c_{1} {\mathbf{r}}_{1} \left( {{\mathbf{pbest}}_{p}^{t} - {\mathbf{x}}_{p}^{t} } \right) + c_{2} {\mathbf{r}}_{2} \left( {{\mathbf{gbest}}^{t} - {\mathbf{x}}_{p}^{t} } \right)} \right\rangle$$
(4)

where, 〈 〉 represents an integer after rounding. The value range of velocity is an integer in [\(-{x}_{\text{max}}\), \({x}_{\text{max}}\)], and \({x}_{\text{max}}\) is the maximum value for the sequence number of the worksite. When the velocity exceeds the boundary, the boundary value shall be taken.

In PSO algorithms, the inertia weight w reflects the global searchability. When it is larger, the global searchability is stronger; conversely, the local searchability is more potent22,23,24. Generally, in the initial stage of iterative calculation, it is hoped that the search range of particles is wider; and in the later stage of the search, it is hoped that particles can search accurately within a smaller range. In addition, the inertia weights of different particles should be different under the same number of iterations to enhance the searchability of the particles. Therefore, the inertia weight can be calculated as follows:

$$w = w_{\max } - \frac{{\left( {w_{\max } - w_{\min } } \right) \cdot t}}{{t_{\max } }} + \frac{Rnd}{3}$$
(5)

where, \({w}_{\text{max}}\) is the maximum value of w, and 0.9 is recommended; \({w}_{\text{min}}\) is the minimum value of w, and 0.4 is recommended; \({t}_{\text{max}}\) represents the maximum number of iterations; t is the number of iterations of the current calculation step; Rnd represents a random number in [0,1].

Equation (4) can be used to obtain the corresponding velocity value, and according to Eq. (2), the updated position of the particle, that is, the worksite number selected by the truck, can be calculated. When the updated particle position crosses the boundary (i.e., x < 1 or x > \({x}_{\text{max}}\)), a worksite is randomly selected until a position that does not cross the boundary is found. Calculations can be performed as follows:

$$x_{p} = \left\{ {\begin{array}{*{20}l} {\left\langle {Rnd \cdot x_{\max } + 0.5} \right\rangle ;} \hfill & {\left( {x < 1} \right) \vee \left( {x > x_{\max } } \right)} \hfill \\ {x;} \hfill & {1 \le x \le x_{\max } } \hfill \\ \end{array} } \right.$$
(6)

where, “\(\vee\)” represents an “or” set; “;” represents the function is a piecewise function, when the conditions after the semicolon are satisfied, the function takes the value before the semicolon.

Furthermore, since the completion time of pour at different worksites varies, the particles are likely to select the worksites that have completed the pour in the iterative process, which will produce too many invalid solutions, increase the amount of calculation, and reduce the convergence. Therefore, based on bionic algorithms, the sequence number of the selected worksite is increased by 1 (vp > 0) or decreased by 1 (vp < 0) for the location of the selected worksites which have completed the pour according to the positive or negative velocity, until there is a worksite that has not completed the pour. In the process, when the worksite selected is out of bounds, take the symmetric boundary value: when xp > \({x}_{\text{max}}\) and vp > 0, then x = 1; similarly, when xp < 1 and vp < 0, then x = \({x}_{\text{max}}\).

Initialization (first iteration)

The velocity of the first dimensional coordinate of each particle p (i.e., the first departure in the solution) is 0. To avoid the initial velocity from being too large and resulting in a local optimum, the velocity of the coordinates in the remaining dimensions is calculated as follows, taking an integer in [\(-2\cdot {x}_{\text{max}}/3\), \(2\cdot {x}_{\text{max}}/3\)].

$$v_{p} = \left\langle {\frac{{2 \cdot \left( {2 \cdot Rnd - 1} \right)}}{3} \cdot x_{\max } } \right\rangle$$
(7)

Except for the first dimensional coordinate of each particle p, the working points of the other-dimensional coordinates are randomly selected and calculated as follows:

$$x_{p} = \left\langle {Rnd \cdot x_{\max } + 0.5} \right\rangle$$
(8)

To avoid too many locally optimal solutions and invalid solutions, the sequence number of the first dimensional coordinates of the particle is determined according to the start time of each worksite and the cycle time of completing a pour task. Obviously, when the number of the earliest worksite is one, to ensure that the worksite is started in time, it is considered as the worksite of the first dimensional coordinate of the particle; when the number of the earliest worksites is more than one, to ensure the maximum utilization of the truck, the worksite with the shortest cycle time is selected as the worksite of the first dimensional coordinates of the particles.

Iterative process

As the worksite for the first departure has been determined according to the start time of each worksite and the cycle time of completing a pour task, the velocity of the first dimensional coordinate of each particle (i.e., the first departure in the solution) is 0; the velocity of the other dimensions is calculated according to Eq. (4). When the velocity exceeds the boundary, take the boundary value.

The worksite of particles is calculated according to Eq. (2), and when the position is out of bounds, it is calculated according to Eq. (6). Similar to the procedure described in the Initialization section, if the worksite has completed the pour, the sequence number of the selected worksite is increased or decreased by 1 according to the positive or negative velocity, until there is a worksite that has not completed the pour.

Determination of the objective function

For dispatching problems, the objective function usually takes the waiting time; that is, the shorter the waiting time, the better the solution. For the engineering dispatching problem to be solved in this paper, generally, eight waiting times need to be considered. First, there are two waiting times after each truck has been poured at worksite i, namely, the waiting time of the worksite when the n-th truck leaves (\({TDgd}_{i,n}\)) and the waiting time of the truck (\({TDgc}_{i,n}\)). There are two cumulative waiting times of the worksite i after the pour task is completed, namely, the total waiting time of worksite (\({Tgd}_{i}\)) and the total waiting time of truck (\({Tgc}_{i}\)). Then, there is a longest total waiting time for any worksites (\({TMgd}_{i}\)) and trucks (\({TMgc}_{i}\)). Correspondingly, there are two total cumulative waiting times, namely, the total cumulative waiting time of all worksites (\({TS}_{\text{gd}}\)) and trucks (\({TS}_{\text{gc}}\)). They can be calculated as follows:

$$\begin{aligned} & Tgd_{i} = \sum\limits_{n = 1}^{{NSVgd_{i} }} {TDgd_{i,n} } ,Tgd_{i} = \sum\limits_{n = 1}^{{NSVgd_{i} }} {TDgc_{i,n} } {\kern 1pt} \\ & TMgd_{i} = \max \left\{ {TDgd_{i,1} ,TDgd_{i,2} , \ldots TDgd_{i,n} , \ldots } \right\} \\ & TMgc_{i} = \max \left\{ {TDgc_{i,1} ,TDgc_{i,2} , \ldots TDgc_{i,n} , \ldots } \right\} \\ & TS_{{{\text{gd}}}} = \sum\limits_{i = 1}^{n} {Tgd_{i} } ,TS_{{{\text{gc}}}} = \sum\limits_{i = 1}^{n} {Tgc_{i} } \\ \end{aligned}$$
(9)

where, \({NSVgd}_{i}\) refers to the total number of trucks needed at worksite i.

Taking worksite waiting for trucks as an example, according to the actual situation of the project, it is assumed that there are 3 worksites, and worksites A, B, and C require 3, 4, and 5 trucks to complete the pour task, respectively. See Table 1 for details. In addition, the situation of truck waiting for worksite is the same.

Table 1 Waiting time corresponding to different schemes (unit: min).

Judging from the Table 1, the shortest \({TS}_{\text{gd}}\) of all the worksites is found in plans I and II, and the \({Tgd}_{i}\) of worksites A, B, and C in the two plans is the same. The \({TMgd}_{i}\) of worksite C are also the same. In the two plans, comparing the waiting time of each departure (\({TDgd}_{i,n}\)) at worksite A, the number in plan I is more even, and there is no extreme long or short waiting time. In this case, plan I is better than plan II. Similarly, comparing the \({TDgd}_{i,n}\) at worksite B, the level is more even in plan II, so plan II is better. From the above analysis, it is not easy to judge which plan is better. Nonetheless, comparing the \({TMgd}_{i}\) of each worksite in the two plans, plan I is more even, which can avoid the longer or shorter waiting time of trucks at some worksites in the plan. In this term, plan I is better than plan II. In summary, the more even the \({TMgd}_{i}\) of all worksites, the better the plan (that is, the \({TMgd}_{i}\) of any plans is not greater than those in other plans).

Comparing the \({TMgd}_{i}\) of each worksite in plans I and III, it is evident that plan III is better than plan I. The \({Tgd}_{i}\) of worksites A and C in plan III is, however, longer than that in plan I, meaning that this plan III is not optimal, and the \({TS}_{\text{gd}}\) is not optimal. Therefore, the \({Tgd}_{i}\) and the \({TS}_{\text{gd}}\) cannot be regarded as the main controlling factors of the objective function; instead, the \({TMgd}_{i}\) should be deemed the main controlling factor.

In addition, the \({TMgd}_{i}\) of worksites in plans III and IV is the same. The \({Tgd}_{i}\) of worksite C in plan IV is shorter, and the \({TS}_{\text{gd}}\) is also shorter. In this sense, plan IV is better than plan III. Therefore, the objective function needs to consider the influence of the \({TS}_{\text{gd}}\) and each worksite's \({Tgd}_{i}\). Generally speaking, while ensuring that the \({TMgd}_{i}\) of the worksite is optimal, the \({TS}_{\text{gd}}\) is directly proportional to the \({Tgd}_{i}\). To simplify the calculation of the objective function, only the \({TS}_{\text{gd}}\) is used as the controlling factor of the objective function.

In terms of the \({TMgd}_{i}\), plan IV is significantly better than plan I, while the \({TS}_{\text{gd}}\) of plan IV is longer than that of plan I. Therefore, the \({TS}_{\text{gd}}\) needs to be revised when considered. For engineering projects, due to the construction schedule and project quality requirements, the waiting time of the worksite generally does not exceed 60 min, and the waiting time of the truck generally ranges from 120 to 150 min as restricted by the initial setting time of the concrete. The waiting time of the worksite is more critical than the waiting time of the truck in this problem, and the main controlling factor of the \({TMgd}_{i}\) has ensured that the waiting time of the truck will not be too long. Hence, only the worksite's \({TS}_{\text{gd}}\) is considered an influencing factor of the objective function, which can fully satisfy the requirements.

In summary, the objective function needs to satisfy the following requirements: the \({TMgd}_{i}\) and \({TMgc}_{i}\) is not longer than that of other plans, and the \({TS}_{\text{gd}}\) is less than 1.2 times that of other plans where 1.2 is the correction coefficient. As mentioned earlier, it is to ensure that all possible optimal solutions are taken into account in the solution set.

Therefore, for each particle, the individual optimal solution of particle p can be obtained through the Algorithm 1.

figure a

The globally optimal solution can be obtained through the Algorithm 2 for the entire particle swarm.

figure b

Solutions to static dispatching

Departure time of the first truck

To ensure the maximum utilization of trucks and avoid affecting the starting time of the worksite, it is necessary to comprehensively consider factors such as the starting time of the mixing station, the loading and unloading time of the truck, the starting time of the worksite, the number of trucks required, and the time required for a truck cycle to determine the departure time of the first truck (\({TI}_{1}\)).

Usually, if the truck arrives at the worksite later than the starting time of the worksite, the departure is carried out according to the usual starting time of the mixing station; otherwise, the departure will be determined according to the starting time of the worksite. When there are multiple earliest starting worksites and second earliest starting worksites, the \({TI}_{1}\) should be moved forward by \(\Delta t\) to ensure a simultaneous start and minimize waste of truck resources. Moreover, since the initial setting time of concrete is limited, it is necessary to consider the maximum amount of time that the truck can wait to avoid affecting the quality of the concrete. The \({TI}_{1}\) can be calculated as follows:

$$TI_{1} = \left\{ {\begin{array}{*{20}l} {T_{{{\text{bhz}}}} ;} \hfill & {TC - \left( {T_{{{\text{bhz}}}} + t_{{{\text{zc}}}} + t_{{{\text{ar}}}} } \right) - \Delta t \le 0} \hfill \\ {TC - \left( {T_{{{\text{bhz}}}} + t_{{{\text{zc}}}} + t_{{{\text{ar}}}} } \right) - \Delta t;} \hfill & {TC - \left( {T_{{{\text{bhz}}}} + t_{{{\text{zc}}}} + t_{{{\text{ar}}}} } \right) - \Delta t > 0} \hfill \\ \end{array} } \right.$$
(10)

where, Tbhz is the starting time of the mixing station; TC is the starting time of the earliest worksite; tzc is the time required to load the concrete; tar is the shortest time required for a single cycle of the truck at the earliest worksite; \(\Delta t\) is time difference corrected by factors such as the time and number of earliest starting worksites and second earliest starting worksites and the maximum waiting time of trucks.

If only one worksite requires concrete, it can be calculated according to Eq. (10), and \(\Delta t\) = 0. If there are multiple earliest starting worksites and second earliest starting worksites, the destination of the first truck should be the worksite with the shortest tar. Then, it is necessary to determine the \(\Delta t\) based on the total number of trucks available in the mixing station (NSVbhz), the total number of trucks required for all worksites (NSVsygd), the longest (TRzc) and the shortest times (TRzd) of a single cycle of all worksites, and the loading (tzc) and unloading times (txc).

If there is only one earliest starting worksite (i.e., NSEgd = 1), the number of second earliest starting worksites is NSCgd (i.e., NSCgd > 0). When NSCgd = 1, if the time the truck to return from the earliest starting worksite to the mixing plant is earlier than the starting time of the second earliest worksite, then it is not necessary to correct the departure time of the first truck (it indicates that some trucks have returned to the mixing station before the starting time of second earliest starting worksites). If the NSVbhz is greater than the sum of the number of trucks required at the earliest and second earliest starting worksites, then there is no need to adjust the time (it suggests that the number of trucks is sufficient to meet the needs of the trucks at the earliest and second earliest starting worksites). When the NSVbhz is insufficient, and the earliest time a truck returns to the mixing station is later than the starting time of the second earliest starting worksites (TCs), it is necessary to advance the departure time by the difference between the TC and TCs. When NSCgd > 1, the departure time can be adjusted according to the value of NSCgd. It can be calculated as follows:

$$\Delta t = \left\{ {\begin{array}{*{20}l} {0;} \hfill & {\left[ {NSV_{{{\text{bhz}}}} \ge NSV_{{{\text{sygd}}}} } \right] \vee \left[ {\left( {TR_{{{\text{zd}}}} + t_{{{\text{zc}}}} + t_{{{\text{xc}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSC_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} < \left( {TC_{{\text{s}}} - TC} \right)} \right]} \hfill \\ {\left( {TR_{{{\text{zd}}}} + t_{{{\text{zc}}}} + t_{{{\text{xc}}}} } \right) - \left( {TC_{{\text{s}}} - TC} \right) + \left( {NSV_{{{\text{bhz}}}} - NSC_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} ;} \hfill & {\left[ {NSV_{{{\text{bhz}}}} < NSV_{{{\text{sygd}}}} } \right] \wedge \left[ {\left( {TR_{{{\text{zd}}}} + t_{{{\text{zc}}}} + t_{{{\text{xc}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSC_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} \ge \left( {TC_{{\text{s}}} - TC} \right)} \right]} \hfill \\ \end{array} } \right.$$
(11)

where, “\(\bigwedge\)” represents an “and” set.

If there are multiple earliest starting worksites (i.e., NSEgd > 1), when NSCgd = 1, the departure time can be calculated by Eq. (12); when NSCgd > 1, it can be calculated by Eq. (13).

$$\Delta t = \left\{ {\begin{array}{*{20}l} {0;} \hfill & {\left( {NSV_{{{\text{sygd}}}} \le NSV_{{{\text{bhz}}}} } \right)} \hfill \\ {\left( {TR_{{{\text{zc}}}} - TR_{{{\text{zd}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSC_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} ;} \hfill & {\left( {NSV_{{{\text{sygd}}}} > NSV_{{{\text{bhz}}}} } \right) \wedge \left[ {\left( {TR_{{{\text{zc}}}} - TR_{{{\text{zd}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} - \left( {TC_{{\text{s}}} - TC} \right) \le 0} \right]} \hfill \\ {2 \cdot \left[ {\left( {TR_{{{\text{zc}}}} - TR_{{{\text{zd}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} } \right] - \left( {TC_{{\text{s}}} - TC} \right);} \hfill & {\left( {NSV_{{{\text{sygd}}}} > NSV_{{{\text{bhz}}}} } \right) \wedge \left[ {\left( {TR_{{{\text{zc}}}} - TR_{{{\text{zd}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} - \left( {TC_{{\text{s}}} - TC} \right) > 0} \right]} \hfill \\ \end{array} } \right.$$
(12)
$$\Delta t = \left\{ {\begin{array}{*{20}l} {0;} \hfill & {\left( {NSV_{{{\text{sygd}}}} \le NSV_{{{\text{bhz}}}} } \right)} \hfill \\ {\left( {TR_{{{\text{zc}}}} - TR_{{{\text{zd}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} - NSC_{{{\text{gd}}}} + 2} \right) \cdot t_{{{\text{zc}}}} ;} \hfill & {\left( {NSV_{{{\text{sygd}}}} > NSV_{{{\text{bhz}}}} } \right) \wedge \left[ {\left( {TR_{{{\text{zc}}}} - TR_{{{\text{zd}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} - \left( {TC_{{\text{s}}} - TC} \right) \le 0} \right]} \hfill \\ {2 \cdot \left[ {\left( {TR_{{{\text{zc}}}} - TR_{{{\text{zd}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} } \right] - \left( {TC_{{\text{s}}} - TC} \right) + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} - NSC_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} ;} \hfill & {\left( {NSV_{{{\text{sygd}}}} > NSV_{{{\text{bhz}}}} } \right) \wedge \left[ {\left( {TR_{{{\text{zc}}}} - TR_{{{\text{zd}}}} } \right) + \left( {NSV_{{{\text{bhz}}}} - NSE_{{{\text{gd}}}} + 1} \right) \cdot t_{{{\text{zc}}}} - \left( {TC_{{\text{s}}} - TC} \right) > 0} \right]} \hfill \\ \end{array} } \right.$$
(13)

In addition, due to the limitation of the initial setting time of concrete, the maximum waiting time of the truck cannot exceed the given maximum allowable waiting time (TWgc). Therefore, it is necessary to calculate the correction time (∆t′) as follows according to the initial setting time limit.

$$\Delta t^{\prime} = \left\{ {\begin{array}{*{20}l} {TW_{{{\text{gc}}}} - t_{{{\text{zc}}}} ;} \hfill & {TC - TR_{{{\text{zd}}}} - T_{{{\text{bhz}}}} - TW_{{{\text{gc}}}} \ge 0} \hfill \\ {TC - TR_{{{\text{zd}}}} - T_{{{\text{bhz}}}} - t_{{{\text{zc}}}} ;} \hfill & {TC - TR_{{{\text{zd}}}} - T_{{{\text{bhz}}}} - TW_{{{\text{gc}}}} < 0} \hfill \\ \end{array} } \right.$$
(14)

Finally, compare the correction time (Δt) and (∆t′), and choose the smaller of the two.

Departure time of the other trucks

If the truck’s selected worksite has already been dispatched for a truck (namely, this truck is not the first truck to be dispatched to the worksite), the departure time of the truck is calculated according to the number of trucks currently available at the mixing station, as shown in the following equations:

$$TI_{m} = \left\{ {\begin{array}{*{20}l} {TI_{m - 1} + t_{{{\text{zc}}}} ;} \hfill & {NSVC_{{{\text{bhz}}}} \ge 1} \hfill \\ {TBF_{m} ;} \hfill & {NSVC_{{{\text{bhz}}}} = 0} \hfill \\ \end{array} } \right.$$
(15)

where, \({TI}_{m}\) is the departure time of the m-th truck; TBFm is the soonest time for all trucks in transit returning to the mixing station after TIm−1; NSVCbhz is the number of trucks currently available at the mixing station after TIm−1.

If no truck has been dispatched for a selected worksite i (namely, this is the first truck to be dispatched to the worksite), it is necessary to estimate the departure time by the following equation based on the starting time of the worksite i (TCi), the time required from the mixing station to the worksite (TRGi), and the loading time:

$$TI_{m} = TC_{i} - TRG_{i} - t_{{{\text{zc}}}}$$
(16)

where, TRGi is the time required from the mixing station to the worksite (i is the worksite selected by the m-th truck).

If the result of Eq. (16) is less than the result of Eq. (15) (namely, the regular departure time is later than the departure time estimated based on the start time of the worksite), the departure should be carried out based on the result of Eq. (15). Suppose the result of Eq. (16) is much greater than the result of Eq. (15) (namely, the start time of worksite i is very late). In that case, if the departure is carried out according to the result of Eq. (15), the waiting time of the truck is very long, which may exceed the initial setting time of concrete, and the utilization rate of the truck is inadequate. Moreover, if the departure is carried out based on the result of Eq. (16), the subsequent departure will be affected, resulting the truck will wait for the order at the mixing station for a long time, which will cause waste of the truck and affecting other worksites. Therefore, to avoid local optimum or too many invalid solutions, if the result of Eq. (16) is greater than the result of Eq. (15), there is a need to re-select the worksite. According to the time difference (\(\Delta {t}_{m}\)) between Eqs. (15) and (16), and the average loading time, after extensive trial calculation based on the number of worksites (\({NS}_{\text{gd}}\)), the number of worksite re-selection (NAG) can be calculated by the following equations:

$$NAG = \left\langle {\left( {NS_{{{\text{gd}}}} - 1} \right) \cdot \frac{{\vartriangle t_{m} }}{{4 \cdot t_{{{\text{zc}}}} }}} \right\rangle$$
(17)

Moreover, this paper compares Δtm with the possible times after all trucks depart to refine possible departure times.

  1. (1)

    If Δtm < tzc, then calculate \({TI}_{m}\) using Eq. (15).

  2. (2)

    Suppose Δtm ≥ tzc and Δtm < NSgd∙(0.8∙tzc) + TMgdi, then it is necessary to re-select the worksite according to the procedure described in “Iterative proces”, and then recalculate \({TI}_{m}\) until it reaches the upper limit of the number of recalculations (the number of recalculations is determined by Eq. (17)). If \(\Delta {t}_{m}\le {TW}_{\text{gc}}\), then calculate TIm using Eq. (16); if \(\Delta {t}_{m}>{TW}_{\text{gc}}\), then calculate TIm using Eq. (18).

    $$TI_{m} = \left\{ {\begin{array}{*{20}l} {TC_{i} - TRG_{i} - t_{{{\text{zc}}}} ;} \hfill & {\frac{{NSVC_{{{\text{bhz}}}} }}{{NSVgd_{i} }} \ge 1} \hfill \\ {TC_{i} - TRG_{i} - t_{{{\text{zc}}}} - \left\langle {TW_{{{\text{gc}}}} \cdot \frac{{NSVC_{{{\text{bhz}}}} }}{{NSVgd_{i} }}} \right\rangle ;} \hfill & {0.5 \le \frac{{NSVC_{{{\text{bhz}}}} }}{{NSVgd_{i} }} < 1} \hfill \\ {TC_{i} - TRG_{i} - t_{{{\text{zc}}}} - TW_{{{\text{gc}}}} } \hfill & {\frac{{NSVC_{{{\text{bhz}}}} }}{{NSVgd_{i} }} < 0.5} \hfill \\ \end{array} } \right.$$
    (18)
  3. (3)

    If Δtm ≥ tzc and Δtm ≥ NSgd∙(0.8∙tzc) + TMgdi, it is also necessary to re-select the worksite according to the procedure described in “Iterative proces”, and then recalculate \({TI}_{m}\) until it reaches the upper limit of the number of recalculations. If \(\Delta {t}_{m}\le {TW}_{\text{gc}}\), then calculate TIm using Eq. (15); if \(\Delta {t}_{m}>{TW}_{\text{gc}}\), then calculate TIm using Eq. (18).

Since the NSVbhz is certain and the trucks can be dispatched multiple times, the time for different trucks to return to the mixing station (TBj) changes where j [1, NSVCbhz] represents the serial number of different trucks. The updated process is calculated using Algorithm 3.

figure c

Where, TRLm is the time when the m-th truck returns from the worksite to the mixing station; \({N}_{\text{j}}\) is the serial number of the truck that returns to the mixing station the quickest among all trucks.

The truck number (j) is numbered according to the departure sequence. When all trucks depart, the numbering of all trucks is completed. After that, the departure will be arranged according to the quickest return to the mixing station, and the j corresponds to it, which is calculated by the following equation.

$$j = \left\{ {\begin{array}{*{20}l} {m;} \hfill & {m \le NSVC_{{{\text{bhz}}}} } \hfill \\ {N_{{\text{j}}} ;} \hfill & {m > NSVC_{{{\text{bhz}}}} } \hfill \\ \end{array} } \right.$$
(19)

Determination of waiting time of worksites and trucks

After the \({TI}_{m}\) is determined, the arrival time of the truck to the worksite can be determined based on the time required for the truck to reach the worksite from the mixing station (the time can be calculated according to the real-time data of maps, considering the road conditions, general speed, distance, weather, etc.), which can be shown as follows:

$$TA_{m} = TI_{m} + TRG_{i} = TAgc_{i,n}$$
(20)

where, TAm is the time when the m-th truck arrives at the worksite from the mixing station; TAgci,n is the time when the n-th truck arrives at worksite i.

When the truck starts pouring, it is necessary to consider whether other trucks are pouring or waiting in line. Therefore, we need to first calculate the waiting time of the truck according to the following equation:

$$TD_{m} = \left\{ {\begin{array}{*{20}l} {TLAgc_{i,n - 1} - TAgc_{i,n} ;} \hfill & {NSVA_{i} > 0} \hfill \\ {TC_{i} - TAgc_{i,n} ;} \hfill & {NSVA_{i} = 0} \hfill \\ \end{array} } \right.$$
(21)

where, TDm is the waiting time of the m-th truck from the mixing station; TLAgci,n−1 is the moment when the n − 1-th truck leaves worksite i after pouring; NSVAi is the number of trucks arranged for worksite i.

If the TDm is greater than or equal to 0, it means that the truck is waiting while the worksite is not waiting; if the TDm is less than 0, it means that the truck is not waiting while the worksite is waiting. The corresponding waiting time is calculated as follows:

$$\begin{array}{*{20}l} {TDgc_{i,n} = TD_{m} ,TDgd_{i,n} = 0;} \hfill & {TD_{m} \ge 0} \hfill \\ {TDgc_{i,n} = 0,TDgd_{i,n} = - TD_{m} ,TDS_{m} = - TD_{m} ;} \hfill & {TD_{m} < 0} \hfill \\ \end{array}$$
(22)

where, TDSm is the waiting time of the worksite after the m-th truck from the mixing station leaves the worksite.

The calculation of the time when the worksite starts pouring, the time when the truck leaves the worksite, and the time when the truck returns to the mixing station is detailed in Eq. (23).

$$\begin{gathered} TSAgc_{i,n} = TAgc_{i,n} + TDgc_{i,n} {\kern 1pt} \hfill \\ {\kern 1pt} {\kern 1pt} TLAgc_{i,n} = TSAgc_{i,n} + t_{{{\text{xc}}}} \hfill \\ {\kern 1pt} TRBgc_{i,n} = TLAgc_{i,n} + TRB_{i} \hfill \\ \end{gathered}$$
(23)

where, TSAgci,n is the moment when the n-th truck arrives at worksite i and starts pouring; TRBgci,n is the moment when the n-th truck arrives at worksite i and returns to the mixing station; TRBi is the time required for the truck to return to the mixing station from worksite i.

Correction to the departure time by dual-machine blanking

Moreover, the mixing station is commonly equipped with dual-machine mixing, which can load two trucks simultaneously. The departure time of the truck is corrected according to the vacancy of the mixer. It can be calculated as follows:

$$TI^{\prime}_{m} \left\{ {\begin{array}{*{20}l} {TI_{m} ;} \hfill & {\left( {N_{{{\text{mo}}}} = 2} \right){\kern 1pt} \vee \left[ {\left( {TI_{m} - t_{{{\text{zc}}}} - TBF_{m} = 0} \right) \wedge \left( {0 \le N_{{{\text{mo}}}} < 2} \right)} \right]} \hfill \\ {TI_{m} - t_{{{\text{zc}}}} ;} \hfill & {\left( {TI_{m} - TBF_{m} \ne 0} \right) \wedge \left( {0 \le N_{{{\text{mo}}}} < 2} \right)} \hfill \\ \end{array} } \right.$$
(24)

where, TI′m is the departure time of the m-th truck from the mixing station after correction; Nmo is the number of mixers currently occupied.

Solutions to dynamic dispatching

During the dispatching of concrete, there are often dynamic changes, such as temporary increase or cancellation of orders and an increase or decrease in the number of trucks. In this case, it is necessary to rearrange the static dispatching and form a new dispatching list, while ensuring that the completed orders are not disrupted (including the complete concrete pouring at the worksite and the information of available trucks). Since emergencies are unpredictable, it is difficult and unfeasible to directly build a calculation model for dynamic dispatching. However, by recalling the static calculation model at different times, dynamic dispatching can be easily and quickly achieved.

Based on the static dispatching model, the trucks in the dispatching process are divided into two parts: the first part is the number of trucks available at the mixing station (NSV1bhz); the second part is the number of trucks that depart from the mixing station but do not return (\({NSV2}_{\text{bhz}}\)) and the estimated time of each truck returning to the mixing station (TBSk) (k  [1, NSV2bhz]). When recalling the static dispatching model, the start time of the mixing station (Tbhz) described in “Solutions to static dispatching” should be the current moment (Tcur); the start time of the worksite (TCi) should be the moment when the last truck that have been dispatched to the worksite completes the pouring (TLAgci,k) (If there is no truck on the way at the worksite, that is, the worksite has not yet started at the moment, then the start time remains unchanged). The total number of trucks required for worksite i (NSVgdi) is adjusted according to the actual volume of concrete poured (based on the volume of concrete completely poured by all trucks dispatched to the worksite before the recalculation time). It is calculated as follows:

$$NSVgd_{i} = \left\langle {\frac{{VC_{i} - NSVA_{i} \cdot VT}}{VT}} \right\rangle$$
(25)

where, VCi is the total demand of concrete at worksite i, dimension L3; VT is the capacity of the truck, dimension L3.

In addition, in the calculation with the static dispatching model, the quickest time for the truck that returns to the mixing station (\({TBF}_{m}\)) needs to be corrected according to \({TBS}_{k}\) and calculated by Eq. (26).

$$TBF_{m} = \min \left\{ {TB_{{N_{{\text{j}}} }} ,TB_{{N_{{\text{k}}} }} } \right\}$$
(26)

where, \({TB}_{{N}_{\text{j}}}\) is the soonest time of \({NSV1}_{\text{bhz}}\) trucks available returning to the mixing station; \({TB}_{{N}_{\text{k}}}\) is the soonest time of \({NSV2}_{\text{bhz}}\) trucks available returning to the mixing station. The time when different trucks return to the mixing station (\({TB}_{j}\)) is updated according to Algorithm 3.

Determination of the j: first, determine the number (NSV3bhz) of trucks returning to the mixing station before the departure time of the earliest worksite according to the return time of the NSV2bhz trucks on the way; then, number the NSV1bhz + NSV3bhz trucks based on the departure sequence; finally, number them sequentially according to the quickest return time of the remaining trucks on the way. The calculations are defined as:

$$j = \left\{ {\begin{array}{*{20}l} {m;} \hfill & {m \le \left( {NSV1_{{{\text{bhz}}}} + NSV1_{{{\text{bhz}}}} } \right)} \hfill \\ {N_{{\text{j}}} ;} \hfill & {\left[ {m > \left( {NSV1_{{{\text{bhz}}}} + NSV1_{{{\text{bhz}}}} } \right)} \right] \wedge \left( {TB_{{N_{{\text{j}}} }} \le TB_{{N_{{\text{k}}} }} } \right)} \hfill \\ {N_{{\text{k}}} ;} \hfill & {\left[ {m > \left( {NSV1_{{{\text{bhz}}}} + NSV1_{{{\text{bhz}}}} } \right)} \right] \wedge \left( {TB_{{N_{{\text{j}}} }} > TB_{{N_{{\text{k}}} }} } \right)} \hfill \\ \end{array} } \right.$$
(27)

Regarding the number of trucks currently available at the mixing station (NSVCbhz), for each truck sent out from the mixing station, there is one less truck available at the mixing station; conversely, for each truck returning to the mixing station, there is one more truck available at the mixing station. Additionally, NSVCbhz needs to be corrected according to TBSk. See Algorithm 4 for the specific calculation process.

figure d

Calculating example analysis

Suppose three worksites require concrete, namely, A, B, and C. The corresponding parameters are shown in Table 2.

Table 2 Corresponding calculation parameters of each worksites.

There are currently 10 trucks at the mixing station, with a tank capacity of 8 m3. The average loading time of the mixing station is 5 min and the average unloading time is 10 min. In the calculation, the individual perceived weight (\({c}_{1}\)) and the overall social weight (\({c}_{2}\)) are taken as 2.5 and 1.45, respectively; the particle swarm size is taken as 50, and the number of iterations is 600; the mixing station is equipped with dual-machine to loading the truck; the start time of the mixing station is 07:30 a.m.

The calculation results are shown in Table 3. The cumulative waiting time of all worksites (TSgd) is 73 min, the longest waiting time of worksites is 24 min (the 18th departure), and the cumulative waiting time of all trucks (TSgc) is 473 min; the longest waiting time of worksite A (TMgdi) is 20 min and the longest waiting time of the truck (TMgci) is 30 min, TMgdi is 24 min and TMgci is 23 min for worksite B, TMgdi is 10 min and TMgci is 26 min for worksite C. All the above meet the construction requirements.

Table 3 The calculation results.

Judging from the departure time (TIm), when the mixing station has sufficient trucks, the departure time is every 5 min; when the start time of the selected worksite is late (m = 6), the model (see “Departure time of the first truck”) will automatically match a more appropriate departure time rather than 7:54 a.m. (otherwise, it will increase the waiting time of the truck); similarly, when a different worksite is selected and the truck is dispatched for this worksite for the first time (m = 6, 25), the departure time is also corrected and adjusted according to the start time of the worksite (see “Departure time of the first truck”). When there is no available truck at the mixing station (such as after the 10th departure), the optimization model will determine the departure time based on the time when the truck returns to the mixing station (see “Departure time of the other trucks”). For example, when Truck 8 (m = 17, j = 8) returns to the mixing station earlier than Truck 7 (m = 18, j = 8), Truck 10 will be dispatched for the 17th departure and the departure time is the same as the return time to the mixing station. Similarly, the 20th and 21st departures are also arranged based on the time when the truck returns to the mixing station. The calculation time of the program is 18.5 s.

Assuming that at 9:00 a.m., the concrete demand of worksite A is adjusted to 116 and worksite B temporarily cancels, then the dispatching at this time needs to consider the tasks that have been completed before 9:00 a.m. According to Tables 2 and 3, a total of 10 trucks are arranged to worksite A before 9:00 a.m., and the time when the pouring is completed is 10:10 (m = 13), and the pouring volume is 80 m3. Then, the start time of worksite A is adjusted to 10:10 a.m., and the demand quantity is 36 m3. Since worksite C has not yet started, adjustments may not need to be made for this worksite. At this time, the number of available trucks at the mixing station (NSV1bhz) is 0, and NSV2bhz = 10, and the return time to the mixing station is shown as \({TRBgc}_{i,n}\) (m = 4–13) in Table 3. The start time of the mixing station is adjusted to the current time 9:00 a.m. The model described in “Solutions to dynamic dispatching” is used to calculate the parameters, and the results are shown in Table 4. The number j' corresponds to j in Table 3. The calculation time of the program is 9.2 s.

Table 4 The calculation results after order adjustment.

The calculation results show that dynamic dispatching (“Solutions to dynamic dispatching”) can realize the rescheduling without affecting the previously completed tasks. According to Eq. (27), three trucks have returned to the mixing station before 9:39 a.m. at the departure time of the earliest worksite (m = 4–6 in Table 4). Therefore, in the first three departures (m = 1–3), the truck number is the same as the departure number, while the departure number of the remaining seven trucks is related to the given return time to the mixing station. The cumulative waiting time of all worksites (TSgd) is 0 min, and the cumulative waiting time of all trucks (TSgc) is 602 min, indicating that the number of trucks is sufficient.

Based on the above situation, suppose that trucks with truck numbers 1, 2, 3, and 10 will no longer be assigned tasks after completing the task (e.g., the number of trucks is adjusted from 10 to 6), then the calculation results are shown in Table 5. The number j' corresponds to j in Table 3. The calculation time of the program is 8.2 s.

Table 5 The calculation results after the order and the number of trucks are adjusted.

The cumulative waiting time of all worksites (TSgd) is 20 min, and the cumulative waiting time of all trucks (TSgc) is 123 min, suggesting that the number of trucks is sufficient. Comparing Table 5 and Table 4, after the number of trucks is reduced, the waiting time of trucks decrease significantly, while the waiting time of worksites increases accordingly; the first six departure times are consistent with the results in Table 4; for the 7th departure, the departure time is the same as the quickest return time to the mixing station (m = 1) because there is no available truck at the mixing station. In addition, with the reduction in the number of trucks, the overall time to complete is the time when the n − 1-th truck leaves worksite i after pour task at all worksites increases by 20 min (e.g., the completion time in Table 5 is 14: 20 p.m. and the completion time in Table 4 is 14:00 p.m.).

Conclusions

This paper builds a theoretical model for intelligent dispatching of transport vehicles by reviewing the existing literature and actual engineering data and exploring a particle swarm optimization promotion strategy suitable for the dynamic dispatching of transport vehicles in linear engineering projects. This model improves the inertia weight and boundary processing. It also elaborates on the initialization and iterative process, and the improvements in the process are more suitable for actual problems. In addition, the paper analyzes various influencing factors for different waiting times, considering the actual problem's requirements. It proposes a new objective function in the dispatching algorithm that dramatically improves particle swarm convergence speed and minimizes the influence of local optimum on global optimum.

Taking into consideration factors such as the starting time of the mixing station, the loading and unloading time of the truck, the starting time of the worksite, the number of trucks required, and the time required for the truck to cycle once, this study also makes fine-tuned adjustments to the various parameters in the calculation process, making the calculation result more accurate. In addition, the dispatching for dynamic changes such as adding or canceling orders, increasing or reducing the number of available trucks can be conveniently realized, and the situation of dual-machine blanking at the mixing station is also considered.

This study provides an overall solution supported by the new generation of information technology for the concrete transportation dispatching management of the engineering project, and will greatly improve the economic benefits of mixing station and concrete transport vehicles.