Research Article

Learning Whale Optimization Algorithm for Open Vehicle Routing Problem with Loading Constraints

Algorithm 1

Learning whale optimization algorithm.
(1)Input:
(2)Let the number of customers be .
represents the total number of items required by the customer .
be the current number of iterations; the maximum number of iterations is .
is the individual of generation , and the population size is .
is the search factor.
The update times of three-dimensional matrix is .
The vehicle number is .
indicates the item of the customer
(3)Let , , ,
(4)begin:
(5)Population initialization: using rule1 and rule2 in Section 3.1.1 to generate an individual and using rule3 to generate individuals.
(6)for each do
(7)for each do
(8)  ifthen
(9)   update by equation (21)
(10)  else
(11)   update by equation (20)
(12)  end if
(13)end for
(14)end for
(15)for each do
(16) Choosing the best individuals to construct the three-dimensional matrix
(17) Update the population by the three-dimensional matrix
(18)end for
(19)Choosing the best individual as
(20)Loading initialization: Initialize the loading sequence of all customers using rules 1 and 2 in 3.4.1.
(21)for each do
(22)for each do
(23)  for each do
(24)   Loading the customer’s goods into the carriage through the loading strategy in Section 3.4.2
(25)  end for
(26)end for
(27)end for
(28)Output:
(29)return