Вы находитесь на странице: 1из 16

908 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 20, NO.

6, DECEMBER 2016

Memetic Search for the Generalized Quadratic


Multiple Knapsack Problem
Yuning Chen and Jin-Kao Hao

Abstract—The generalized quadratic multiple knapsack prob- C = {C1 , C2 , . . . , Cr } where Ci ∩ Cj = ∅ for each i, j,
lem (GQMKP) extends the classical quadratic multiple knapsack 1 ≤ i = j ≤ r, and a set of m knapsacks M = {1, 2, . . . , m}.
problem with setups and knapsack preference of the items. The Each knapsack k (k ∈ M) has a capacity Bk . Let R =
GQMKP can accommodate a number of real-life applications
and is computationally difficult. In this paper, we demonstrate {1, 2, . . . , r} be the class index set, ni = |Ci | be the num-
the interest of the memetic search approach for approximating ber of objects of class Ci ∈ C ( ri=1 ni = n), σi be the
the GQMKP by presenting a highly effective memetic algorithm set of knapsacks to which the items of Ci can be allocated
(denoted by MAGQMK). The algorithm combines a backbone- [∀(i, j), 1 ≤ i = j ≤ r, σi and σj can be overlapped],
based crossover operator (to generate offspring solutions) and and βi (1 ≤ βi ≤ m) be the maximum number of knap-
a multineighborhood simulated annealing procedure (to find
high quality local optima). To prevent premature convergence sacks for which the items of Ci can be selected. Cij ∈ N
of the search, MAGQMK employs a quality-and-distance (QD) (i ∈ R, j ∈ {1, 2, . . . , ni }) denotes the index of the jth object of
pool updating strategy. Extensive experiments on two sets of 96 the ith class. Each class Ci is associated with a setup resource
benchmarks show a remarkable performance of the proposed consumption si which is generated when any item of Ci is
approach. In particular, it discovers improved best solutions in assigned to knapsack k (k ∈ M, only one si is needed when
53 and matches the best known solutions for 39 other cases. A
case study on a pseudo real-life problem demonstrates the effi- more than one object of Ci are assigned to knapsack k). Each
cacy of the proposed approach in practical situations. Additional object i (i ∈ N) has a weight wi , and a knapsack-dependent
analyses show the important contribution of the novel general- profit pik with respect to knapsack k (k ∈ M) which indi-
exchange neighborhood, the backbone-based crossover operator cates its knapsack preference. Each pair of objects i and j
as well as the QD pool updating rule to the performance of the (1 ≤ i = j ≤ n) generates a profit qij which contributes to the
proposed algorithm.
optimization objective when these two objects are allocated to
Index Terms—Constrained quadratic optimization, heuristics, the same knapsack. Additionally, let xik be the decision vari-
knapsack problem, population-based search. able such that xik = 1 if object i is allocated to knapsack k,
xik = 0 otherwise; let yuk be the decision variable such that
I. I NTRODUCTION yuk = 1 if at least one object of class u is allocated to knapsack
HE GENERALIZED quadratic multiple knapsack prob- k, yuk = 0, otherwise. Then the GQMKP can be formulated
T lem (GQMKP), as an extension of the classical quadratic
multiple knapsack problem (QMKP) with setups and knap-
as a 0-1 quadratic program

r 
nu 
m 
n−1 
n 
m
sack preferences of the items, is a difficult combinatorial Max xCui k pCui k + xik xjk qij (1)
optimization problem recently introduced in [30]. u=1 i=1 k=1 i=1 j=i+1 k=1
We are given a set of n objects (also called items)
subject to
N = {1, 2, . . . , n} that are classified into r disjoint classes n 
 r u
Manuscript received January 19, 2015; revised July 12, 2015 and xCui k wCui k + yuk su ≤ Bk ∀k ∈ M (2)
January 4, 2016; accepted March 15, 2016. Date of publication u=1 i=1
March 24, 2016; date of current version November 23, 2016. This work was
supported in part by the LigeRo Project (2009–2014) from the Region of 
m
Pays de la Loire, France, and in part by the Programme Gaspard Monge pour xik ≤ 1 ∀i ∈ N (3)
l’Optimisation Project from the Jacques Hadamard Mathematical Foundation k=1
under Grant 2014-0024H. The work of Y. Chen was supported by the China yuk = 0 ∀u ∈ R, k ∈ σu (4)
Scholarship Council (2012–2016). (Corresponding author: Jin-Kao Hao.)
Y. Chen is with the Department of Computer Science, LERIA r
Laboratory, University of Angers, Angers 49045, France (e-mail: yuk ≤ βu ∀u ∈ R (5)
yuning@info.univ-angers.fr). k=1
J.-K. Hao is with the Department of Computer Science, LERIA xCui k ≤ yuk ∀u ∈ R, i ∈ {1, . . . , nu }, k ∈ M (6)
Laboratory, University of Angers, Angers 49045, France, and also
with the Institut Universitaire de France, Paris 75231, France (e-mail: 
nu
hao@info.univ-angers.fr). yuk ≤ xCui k ∀u ∈ R, k ∈ M (7)
This paper has supplementary downloadable material avail- i=1
able at http://ieeexplore.ieee.org and http://www.info.univ-angers.fr/
pub/hao/gqmkp.html.
xik , yuk ∈ {0, 1} ∀i ∈ N, u ∈ R, k ∈ M. (8)
Color versions of one or more of the figures in this paper are available
online at http://ieeexplore.ieee.org. For each knapsack k, constraint (2) requires that the weight
Digital Object Identifier 10.1109/TEVC.2016.2546340 sum of the objects in the knapsack plus the sum of the setup
1089-778X  c 2016 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
CHEN AND HAO: MEMETIC SEARCH FOR THE GQMKP 909

resource consumption must be no larger than its capacity. the machines while satisfying all the underlying constraints.
Constraint (3) ensures that each object can be allocated to The GQMKP may find other applications in areas like man-
at most one knapsack. Constraint (4) indicates that items can- ufacturing systems, computer design, and communications in
not be assigned to the knapsacks where they are not allowed. which a set of tasks needs to be assigned to a number of
Constraint (5) requires that for each class, the number of knap- machines or processors.
sacks to which its items are allocated must be less than or Saraç and Sipahioglu [30] showed the first study deal-
equal to its maximum number. Constraint (6) guarantees that ing directly with the GQMKP and proposed three solu-
yuk receives the value of 1 when at least one object of class tion approaches to this difficult problem. Based on the 0-1
u is allocated to knapsack k. Constraint (7) requires that yuk quadratic model proposed in their paper, the first approach
receives the value of 0 when no object of class u is allocated is based on the general Gams/Dicopt framework for solv-
to knapsack k. Constraint (8) requires that each variable takes ing mixed-integer nonlinear programming (MINP) models by
the value of 0 or 1. integrating a nonlinear programming (NLP) or mixed-integer
Notice that the above model is modified from the binary programming (MIP) solver that runs under the Gams system.
quadratic model described in [30] and has the advantage of The second approach is a genetic algorithm (GA). The GA
being more concise. randomly initializes a population and uses a two-tournament
The GQMKP is NP-hard in the strong sense, since it method for selection. It employs a specialized uniform-based
generalizes the well-known NP-hard quadratic knapsack prob- operator for crossover and two dedicated operators based on
lem (QKP) [26]. Indeed, the GQMKP degenerates to the QKP local exchange and greedy construction for mutation. The
when the number of knapsacks equals 1, the number of classes GA generates solutions satisfying all the constraints except
equals the number of objects (i.e., r = n) and the setup of each for constraint (5) which is allowed to be violated. To eval-
class equals 0. The GQMKP is also a generalization of the uate infeasible solutions, the GA uses a penalized fitness
popular QMKP [3], [12]–[14], which is more complicated than function which is defined as the original objective func-
the QKP due to the presence of multiple knapsacks. Compared tion (1) plus the weighted sum of the excess number of
to the classical QMKP, the GQMKP has the following four knapsacks of each class. The last approach is a hybrid algo-
distinguished features. rithm combining modified subgradient algorithm operating on
1) Class Condition: Objects are grouped to different feasible values (F-MSG) and the GA. In this approach, con-
classes. Those in the same class share common features. straint (5) is included in the Lagrangian function to construct
2) Setup Requirement: A knapsack may contain objects the sub-problem of the F-MSG algorithm which is then solved
from different classes. Including more classes in a by the GA.
knapsack requires additional resource consumption, rep- This paper introduces a highly effective population-based
resented by a capacity loss when switching from one memetic algorithm MAGQMK for the GQMKP. The main
class to another class. contributions of this paper can be summarized as follows.
3) Assignment Limitation: Objects from a specific class are 1) From the algorithmic perspective, the proposed approach
allowed to be assigned to a subset of knapsacks rather integrates several original ingredients. First, we devise
than all the knapsacks. a backbone-based crossover operator for generating off-
4) Knapsack Preference: Each object has a knapsack pref- spring solutions. This operator is specifically designed
erence that differentiates the return when it is allocated for the GQMKP and aims to maximally preserve com-
to different knapsacks. mon contributive objects that are shared by parent
As shown in the case study of [30], the GQMKP can be solutions. Second, to explore efficiently the search space
encountered in companies that produce plastic parts that make around an offspring solution generated by the crossover
use of injection machines. In the studied application, jobs operator, we propose a multineighbourhood simulated
are considered as objects; injection machines are regarded as annealing (SA) procedure that relies on three specific
knapsacks and the given planning period is considered as the and complementary neighborhoods. Among these three
capacity of the knapsack. Jobs are first classified to different neighborhoods, the novel general-exchange neighbor-
classes according to the mold they require. Switching molds hood, which is first proposed in this paper, potentially
in a machine requires setup time. Molds are fixed to a limited helps the algorithm to explore the solution space more
number of machines due to technical reasons. A job is pre- efficiently with its large-step move size. Finally, we
ferred to be assigned to certain machines since its associated apply a quality-and-distance (QD) pool updating strategy
mold may not work at the same efficiency at all machines to maintain a healthy diversity of the population.
or the decision maker may have preferences to have this job 2) From the computational perspective, the proposed
assigned to certain machines. Conducting a job in a machine MAGQMK approach shows a very competitive perfor-
takes a certain time that is considered as the weight of the job. mance on two sets of 96 benchmark instances. In partic-
Apart from the profit returned by performing a single job, addi- ular, for the set of 48 small-sized instances, MAGQMK
tional profits can be attained by assembling similar jobs (i.e., discovers six improved best lower bounds and attains
jobs from the same class) to the same machine for the sake the best known result for other 39 instances. More
of reducing setup times, which reflects the quadratic nature of importantly, for the set of 48 large-sized benchmarks,
this problem. The purpose of this problem is to determine the MAGQMK is able to improve all previous best lower
jobs to be performed and to decide the assignment of jobs to bounds with only one exception. Finally, a successful
910 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 20, NO. 6, DECEMBER 2016

application of the MAGQMK to a pseudo real-life Algorithm 1 Pseudo-Code of MAGQMK for the GQMKP
problem demonstrates its effectiveness in handling large- 1: Input: P: a GQMKP instance; p: population size; maxTry: max
scale practical cases. number of trials to generate a nonclone solution;
2: Output: the best solution S∗ found;
The remainder of this paper is organized as follows. { Population initialization, Section II-B}
Section II describes the proposed approach in detail. 3: POP ← Pool_Initlialization(p, maxTry);
Section III reports the computational results of MAGQMK on 4: p ← |POP|; /*p is reset to the number of distinct individuals
the benchmark instances and shows comparisons with respect eventually obtained.*/
to the state-of-the-art approaches. Section IV is dedicated to an 5: S∗ ← Best(POP); /* S∗ records the best solution found so far. */
{ Main search procedure}
extensive investigation of the key ingredients of the proposed 6: while stopping condition not reached do
approach to gain a deep understanding of their impacts on the 7: Randomly select two solutions Si and Sj from POP
performance of the algorithm. The conclusions are drawn in 8: Sc ← Crossover(Si , Sj ) /* Apply the backbone-based
Section V. crossover operator to generate an offspring solution Sc , see
Section II-D */
9: Sc ← MNSA(Sc ) /* Improve Sc with the multi-neighbourhood
simulated annealing procedure, see Section II-C */
II. M EMETIC A LGORITHM FOR THE GQMKP 10: if f (Sc ) > f (S∗ ) then
Memetic search is a powerful framework that promotes the 11: S∗ ← Sc
idea of combining evolutionary computing and local optimiza- 12: end if
13: POP ← Pool_Updating(Sc , POP) /* Update POP with a
tion [21]. By offering the possibility for the search process to quality-and-distance based rule, see Section II-E */
effectively explore the space of local optima, memetic algo- 14: end while
rithms have proved to be quite effective in solving a number
of difficult combinatorial optimization problems [4], [8], [15],
[20], [22], [23], [32] and in particular knapsack and quadratic
The quality of any candidate solution S is evaluated directly
problems [5], [16], [29], [31].
by the objective function f of the GQMKP. Given a solution
Algorithm 1 shows the working scheme of the proposed
S = {I0 , I1 , . . . , Im }, the objective value f (S) is calculated by
memetic algorithm MAGQMK for the GQMKP. The algo-
the following formula:
rithm generates an initial population of solutions that are first
⎛ ⎞
ameliorated by the multineighborhood SA (MNSA) procedure   
described in Section II-C. Then it repeats an evolution process f (S) = ⎝ pik + qij ⎠. (9)
to improve the population until a predefined stop condition k∈M i∈Ik i,j∈Ik ,i=j
(typically a fixed number of generations) is verified. At each
generation, the algorithm randomly selects two parent solu- This function defines a total order over the solution
tions from the population and recombines them to generate an space. Given two solution S1 and S2 , S2 is better than S1
offspring solution using a backbone-based crossover operator if f (S2 ) > f (S1 ).
(see Section II-D). This newly generated solution is further
improved by the MNSA procedure. Finally, a QD-based rule B. Population Initialization
(see Section II-E) is applied to decide if the improved off- The MAGQMK algorithm uses a randomized greedy con-
spring solution can be inserted into the population. We present struction method (RGCM) to create the initial solutions (indi-
the components of the proposed MAGQMK in the following viduals) of its population. RGCM follows the spirit of the
sections. GRASP approach [28] which is able to generate a differ-
ent solution for each run thanks to its randomized property.
A. Search Space, Solution Representation, and RGCM relies on the notions of contribution and object density
Evaluation Function whose definitions are given below. Notice that our object den-
sity extends the classical bang-for-buck ratio of ordinary linear
For a given GQMKP instance, the search space visited
knapsack problems and aims to identify the attractiveness of
by our MAGQMK algorithm is composed of all possible
items in the GQMKP setting.
allocations of objects to knapsacks such that the constraints
1) Contribution: Given a solution S = {I0 , I1 , . . . , Im }, the
of (2)–(8) are satisfied. In other words, MAGQMK visits only
contribution of object i (i ∈ N) to knapsack k (k ∈ M)
feasible solutions.
with respect to S is given by
To encode a feasible solution, we adopt an integer vector
S ∈ {0, 1, . . . , m}n where n is the number of objects and m is 
VC(S, i, k) = pik + qij . (10)
the number of knapsacks. In this representation, value S(i) = j∈Ik ,j=i
k (k ∈ M) indicates that object i is allocated to knapsack
k, whereas S(i) = 0 indicates that object i is not allocated 2) Density: Let ci(i) denote the class index of object i.
to any knapsack. Such a solution representation can also be The density of object i (i ∈ N) with respect to knap-
considered as a partition of the set of n objects into m + sack k (k ∈ M) is defined as its contribution VC(S, i, k)
1 groups {I0 , I1 , . . . , Im } such that each Ik (k ∈ M) is the divided by its weight wi if another object of its class
set of objects allocated to knapsack k while I0 contains the Cci(i) is already included in knapsack k, or its contribu-
unallocated objects. tion divided by the sum of its weight and the setup of
CHEN AND HAO: MEMETIC SEARCH FOR THE GQMKP 911

its class sci(i) if object i is the first one of its class to be Algorithm 2 Pseudo-Code of the MNSA Procedure
included in knapsack k. Formally, we have 1: Input: P: a GQMKP instance; S0 : initial solution; T0 : initial
⎧ temperature; cr: cooling ratio; nl: number of loops; nsl: number

⎨VC(S, i, k)/wi of sub-loops
2: Output: the best solution S∗
D(S, i, k) = if ∃j = i ∈ Cci(i) such that j ∈ Ik S ← S0


3:
VC(S, i, k)/(wi + sci(i) ), otherwise. 4: S∗ ← S0 /* S∗ records the best solution found so far */
5: T ← T0 /* Initialize temperature */
(11)
6: for i = 1 to nl do
7: T ← T ∗ cr /* Temperature cooling */
Starting from an empty solution S and from the first knap-
8: for j = 1 to nsl do
sack (i.e., k = 1), RGCM iteratively and randomly selects an 9: for each N ∈ {NR , NSW } do
unallocated object i (i ∈ I0 ) from a restricted candidate list 10: for k = 1 to n do
RCL(S, k) and assigns it to knapsack k. Let R(S, k) denote 11: Search the neighborhood N(S, k) for feasible moves
the set of unselected objects that can fit into the knapsack k. and accept moves to replace S according to the prob-
ability function (Eq. 12); Update the best solution
To build RCL(S, k), we first sort all the objects in R(S, k) in
S∗
descending order of their density values [calculated by (11)], 12: end for
and then we put the first min{rcl, |R(S, k)|} (rcl is a parameter) 13: end for
objects into RCL(S, k). Each time RCL(S, k) becomes empty 14: for k = 1 to m do
for the current knapsack, the next knapsack is examined. The 15: for each class c in knapsack k do
16: Search the neighborhood NGE (S, c, k) for feasible
construction process is repeated until the last knapsack (i.e.,
moves and accept moves to replace S according to the
k = m) is examined. probability function (Eq. 12); Update the best solution
The solution constructed by RGCM is further improved by S∗
the SA procedure (see Section II-C). The ameliorated solu- 17: end for
tion is either inserted into the population if it is not a clone 18: end for
19: end for
of any other individual in the population, or discarded if it
20: end for
appears already in the population. The population initializa-
tion procedure is iterated until the population is filled with p
(population size) distinct individuals or no eligible individual
has been generated for maxTry consecutive times. After the to Pr{S → S } (i.e., rd ≤ Pr{S → S }). In what follows, we
initialization procedure, p is reset to the number of distinct introduce the three dedicated neighborhoods.
individuals eventually obtained. 1) Two Traditional Neighborhoods: There are two tra-
The time complexity of constructing one solution is ditional small-sized neighborhoods (denoted by NR and
bounded by O(n2 log n). The whole population initialization NSW ), which are defined by two basic move operators:
procedure takes O(p ∗ maxTry ∗ n2 log n) time in the worst 1) REALLOCATE (REAL for short) and 2) SWAP. These
case. But for most of the instances we used in this paper, it two neighborhoods were first introduced to address the related
is easy to obtain p distinct solutions, which makes the time QMKP [3], [12], [13] and we adapt them to the GQMKP
complexity of initialization procedure close to O(p ∗ n2 log n). considered in this paper.
For an object i, let ki ∈ {0, 1, . . . , m} be the knapsack to
which the object is allocated, let S ⊕ OP denote the neigh-
C. Multineighborhood Simulated Annealing Procedure
boring solution generated by applying move operator “OP”
The importance of local search within a memetic to S. Our REAL and SWAP move operators are described as
algorithm has been recognized for a long time follows.
(see [1], [15], [21], [24], [25]). Our local optimization 1) REAL(i, k): This move operator displaces an object i
procedure is based on the popular SA method [18] from its current knapsack ki ∈ {0, 1, . . . , m} to another
(see Algorithm 2). Being the first time applied to the knapsack k (k = ki , k = 0). All neighboring solutions
GQMKP problem, our MNSA procedure is characterized of a given object i0 induced by this move operator are
by its combined use of three different and complementary given by
neighborhoods (NR , NSW , NGE ). MNSA basically performs
 
nl cycles of temperature cooling and for each temperature, NR (S, i0 ) = S : S = S ⊕ REAL(i0 , k), k ∈ M \ {ki0 } .
MNSA runs nsl iterations while at each iteration, it succes-
sively explores its three neighborhoods in a sequential way. 2) SWAP(i, j): This move operator swaps a pair of objects

The acceptance of each sampled solution S is subject to a

(i, j) where 1) one of them is an assigned object and the
probability test Pr{S → S } which is given by other is not assigned or 2) both of them are assigned but
 belong to different knapsacks. All neighboring solutions
1, if f (S ) > f (S)
Pr{S → S } = ( f (S )−f (S))/T (12) of a given object i0 induced by the SWAP operator are
e , if f (S ) ≤ f (S) given by
where T is a temperature value. Precisely, a neighboring solu- 
NSW (S, i0 ) = S : S = S ⊕ SWAP(i0 , j), j = i0 ∈ N,
tion S is accepted to replace the incumbent solution S if a 
randomly generated value rd (rd ∈ [0, 1]) is less than or equal ki0 = kj ∈ M ∪ {0} .
912 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 20, NO. 6, DECEMBER 2016

some cases in which a transition from one solution


to another requires numerous combinations of SWAP
and REAL operators, GENEXC can realize the transi-
tion much more easily, making the neighborhood search
more focused and straightforward. This benefit fun-
damentally comes from the fact that exchanging two
classes of items from two different knapsacks never vio-
lates constraint (5) (a class of items can be assigned
only to some knapsacks), which is a hard constraint of
the GQMKP. Then the neighboring solutions of a given
knapsack ki0 and a given class ci0 induced by the
Fig. 1. Example for GENEXC neighborhood. GENEXC operator are given by

    
2) New General-Exchange Neighborhood for the GQMKP: NGE S, ki0 , ci0 = S : S = S ⊕ GENEXC ki0 , ci0 , kj , cj ,

The above two neighborhoods are small-sized in the sense kj = ki0 ∈ M, cj = ci0 ∈ R .
that they include those neighboring solutions that require at
most two changes to the incumbent solution. However, we
In Section IV-B, we will investigate the effectiveness of
observed that MNSA with merely these small neighborhoods
these three neighborhoods and show the particular role of the
does not perform well for the highly constrained GQMKP. To
NGE neighborhood.
reinforce the search ability of MNSA, we introduce a novel
large-sized neighborhood NGE based on the general-exchange
operator (GENEXC for short), which is specifically designed
for the GQMKP. Unlike REAL and SWAP, GENEXC may D. Backbone-Based Crossover Operator
modify two or more values of the current solution to generate Apart from the local optimization procedure, crossover con-
a neighboring solution. stitutes another key component of our MAGQMK algorithm.
1) GENEXC(ki , ci , kj , cj ): This move operator basically A successful crossover operator is usually expected to incorpo-
exchanges objects of class ci from knapsack ki with rate domain specific heuristics and should be able to transmit
objects of class cj (cj = ci ) from knapsack kj (kj = ki ). meaningful features (building blocks) from parents to off-
However, simply exchanging those objects may possi- spring. To devise a specialized crossover operator with strong
bly result in infeasible solutions. To always maintain “semantics” for our problem, we consider the GQMKP as
feasibility, our GENEXC operator employs a remove- a constrained grouping problem [6], [7]. As described in
construct method to achieve a feasible “exchange” func- Section II-A, a solution of the GQMKP can be viewed as
tionality. Precisely, GENEXC(ki , ci , kj , cj ) removes all a partition of n objects into m + 1 groups. For grouping
the objects of Cci that are currently allocated to knap- problems, it is more natural and straightforward to manip-
sack ki , and removes all the objects of Ccj (cj = ci ) that ulate groups of objects rather than individual objects. Such
are currently allocated to knapsack kj (kj = ki ). Then, an idea of designing crossover operators has been proved to
it greedily fills knapsack ki with unallocated objects of be very successful in solving a number of grouping prob-
class Ccj , which have the highest density values accord- lems, such as graph coloring [9], [19], [27], bin packing [7],
ing to the definition of Section II-B; similarly it greedily and graph partitioning [2], [11]. In our case, we must addi-
fills knapsack kj with unallocated objects of class Cci tionally take into account the various constraints of our
having the highest density values. It checks all the con- problem.
straints before inserting an unallocated item into the Preliminary experiments show that high quality local optima
target knapsack. If the insertion induces infeasibility, it share many grouping objects. It is thus expected that objects
skips this item and tests the next item with the highest that are always grouped together are very likely to be part of
density value. This GENEXC operator allows a tran- a global optimum or a high-quality solution. Following this
sition between structurally different feasible solutions observation, the general idea of our proposed crossover oper-
that cannot be reached by the SWAP and REAL opera- ator is to preserve the contributive identical object groupings
tors in certain cases. To illustrate this, consider a simple (backbone) of maximal size from parent solutions to offspring,
GQMKP instance shown in Fig. 1. The important data and to choose the groupings for the rest objects with equal
of the instance is displayed on the left, and two feasi- probability from two parents.
ble solutions are displayed on the right of the figure. In Definition 1: Given two parent solutions S1 =
this example, a transition from solutions 1 to 2 is by no {I0 , I11 , . . . , Im1 } and S2 = {I02 , I12 , . . . , Im2 }, let H denote
1

means possible by applying the SWAP or REAL opera- the set of common objects that has identical object grouping
tor, which however, can be easily achieved by GENEXC of S1 and S2 , i.e., H = ∪m k=0 (Ik ∩ Ik ). The backbone H
1 2 b

with a single GENEXC(ki = 1, ci = 3, kj = 2, cj = 1) 1 2


of S and S is the subset of H such that each object of
move, i.e., exchange the objects of class 3 in knap- H b is a contributive object to both parent solutions, i.e.,
sack 1 with the objects of class 1 in knapsack 2. For H b = H\(I01 ∩ I02 ).
CHEN AND HAO: MEMETIC SEARCH FOR THE GQMKP 913

Algorithm 3 Pseudo-Code of the Backbone-Based Crossover steps, as illustrated in Algorithm 3. The details of these three
Procedure steps are described as follows.
1: Input: Two parent solutions S1 = {I01 , I11 , . . . , Im 1 } and S2 =
1) Group Matching: In the context of the GQMKP, two
{I02 , I12 , . . . , Im
2}
different groups from two parent solutions that share
2: Output: An offspring solution S0 = {I00 , I10 , . . . , Im
0}
the most common objects typically have different group
/* Step 1: Group matching */ numbers. For example, group one of the first solution
3: Let E = {(g1i , g2j )|i ∈ M, j ∈ M} denote the set of all m×m group
might correspond to group two of the second solu-
(knapsack) combinations of S1 and S2 . Compute the number of tion, with possibly most objects in common. Therefore,
common objects wg1 g2 for each group combination (g1i , g2j ) ∈ E.
i j the first step of the crossover is to properly identify
4: J ← ∅ a perfect matching of the groups in order to find out
5: repeat the largest number of common objects of the two par-
6: Choose the combination (g1i , g2j ) with the largest wg1 g2 from E ent solutions. This amounts to find a maximum weight
i j
matching in a complete bipartite graph G = (V, E),
7: J ← J ∪ {(g1i , g2j )}
where V consists of m left vertices and m right ver-
8: Remove from E all combinations associated with g1i and g2j tices that correspond, respectively, to the groups of the
9: until E = ∅ first and second solutions; each edge (g1i , g2j ) ∈ E is
/* Adjust the group numbering */
10: rd ← random{0, 1} associated with a weight wg1 g2 , which is defined as
i j
11: for each (g1i , g2j ) ∈ J do the number of identical objects in group g1i of solu-
12: if rd = 0 then tion 1 and group g2j of solution 2. The maximum weight
13: Assign label g1i to group g2j of S2 matching problem can be solved by using the clas-
14: else
15: Assign label g2j to group g1i of S1
sical Hungarian algorithm [17]. However, calling this
16: end if algorithm for each crossover application would be too
17: end for computationally expensive (O(n + m3 )) in our case.
/* Step 2: Create a partial solution based on backbone */ Instead, we apply a fast greedy algorithm to seek a
18: for i := 1 to m do near-optimal weight matching. Our greedy algorithm
19: Ii0 = ∅ iteratively chooses an edge (g1i , g2j ) ∈ E with the largest
20: Hib ← Ii1 ∩ Ii2 ; NHi1 ← Ii1 \Hib ; NHi2 ← Ii2 \Hib wg1 g2 , and then deletes from E all edges incident to
21: Ii0 ← Ii0 ∪ Hib i j

22: R1 (S0 , i) ⊆ NHi1 denotes a subset of objects of NHi1 that can vertex g1i and to vertex g2j . This procedure is repeated
fit into Ii0 , R2 (S0 , i) ⊆ NHi2 denotes a subset of objects of until E becomes empty (lines 3–9 of Algorithm 3).
NHi2 that can fit into Ii0 Step 1 ends by adjusting the group numbering. We
23: l←1 randomly select one solution and adjust its group num-
24: while R1 (S0 , i)  = ∅ or R2 (S0 , i)  = ∅ do bering according to the matched groups of the other
25: if l is odd or R2 (S0 , i)  = ∅, then A ← 1, else A ← 2 solution (lines 10–17 of Algorithm 3).
26: Choose an object o with the highest density from RA (S0 , i) 2) Create Partial Solution Based on Backbone H b : Let Ii1
27: Ii0 ← Ii0 ∪ {o}; NHiA ← NHiA \{o}
and Ii2 denote the set of objects of the ith group in
28: Update R1 (S0 , i) and R2 (S0 , i)
29: l←l+1 solutions 1 and 2, respectively; Hib denotes the index
30: end while set of the common objects (backbone) of the ith group,
31: end for i.e., Hib = Ii1 ∩ Ii2 ; NHi1 and NHi2 denote the index set
/* Step 3: Complete the partial solution */ of the unshared objects of the ith group of solutions 1
32: Groups are sorted in random order in SG, R(S0 , i) denotes a and 2, i.e., NHi1 = Ii1 \Hi , NHi2 = Ii2 \Hi . Let Ii0 denote
subset of unselected objects that can fit into Ii0 ;
33: for each i ∈ SG do
the set of objects of the ith group in offspring solution
34: while R(S0 , i)  = ∅ do (Ii0 = ∅ at the beginning). For each pair of matched
35: Choose an object o with the highest density from R(S0 , i) groups, we first conserve the backbone (i.e., all com-
36: Ii0 ← Ii0 ∪ {o} mon objects) to the corresponding group of the offspring
37: Update R(S0 , i) solution, i.e., Ii0 ← Ii0 ∪ Hib . Let R1 (S0 , i) ⊆ NHi1 denote
38: end while a subset of objects of NHi1 that can be allocated to Ii0
39: end for
while satisfying all constraints (2)–(8), R2 (S0 , i) ⊆ NHi2
denotes a subset of objects of NHi2 that can be allocated
to Ii0 while satisfying all constraints (2)–(8). We then
alternatively choose an object with the highest density
This backbone definition excludes the noncontributive from R1 (S0 , i) on odd steps and from R2 (S0 , i) on even
objects (i.e., unallocated objects) of the parent solutions since steps. Once an object is selected and included into Ii0 ,
they are typically small-density and are unlikely to be part of it is removed from the respective set (NHi1 or NHi2 );
optimal solutions. Based on the notion of backbone, we con- R1 (S0 , i) and R2 (S0 , i) are updated accordingly. This
sider, for each parent solution, m groups of allocated objects procedure continues until both R1 (S0 , i) and R2 (S0 , i)
taken from all m + 1 groups for crossover. The proposed become empty. We apply this procedure to all m groups,
backbone-based crossover procedure consists of three main and we finally obtain a partial offspring solution with
914 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 20, NO. 6, DECEMBER 2016

Algorithm 4 QD Pool Updating Procedure


1: Require: A population POP = {S1 , S2 , . . . , Sp } and an offspring
solution S0
2: Ensure: Updated population POP
3: Insert S0 into the population: POP ← POP ∪ {S0 }
4: for each Si ∈ POP do
5: Calculate AvgDisti,POP according to Eq. 14
6: Calculate QDF(Si ) according to Eq. 15
7: end for
8: Identify the worst solution Sw : Sw = argmax{QDF(Si )|Si ∈
POP)}
9: if S0  = Sw then
10: Remove the worst solution from the population: POP ←
POP\{Sw }
11: else
12: Remove S0 from the population: POP ← POP\{S0 }
13: end if

Fig. 2. Illustration of the backbone-based crossover step.

E. Pool Updating Strategy


some groups (knapsacks) possibly far from being fully Avoiding premature convergence is another key issue for
filled (lines 18–31 of Algorithm 3). population-based algorithms. To address this issue, we propose
3) Complete the Partial Solution: In order to complete the a QD pool updating strategy to decide whether S0 , the newly
partial offspring solution, we allocate some of the unas- generated offspring, should be inserted into the population or
signed objects to the groups (knapsacks) based on a be discarded. This QD strategy, as its name implies, considers
greedy construction strategy. Specifically, we put the m both solution quality and distance between individuals in the
groups (knapsacks) in a set SG in random order. Let population to ensure population diversity.
R(S0 , i) denote the set of unselected objects that can be Since the GQMKP can be viewed as a grouping prob-
allocated to Ii0 while satisfying all constraints (2)–(8). lem, the well-known set-theoretic partition distance [10] seems
For each group i ∈ SG, we continue choosing an object quite appropriate. Given two solutions S1 and S2 , the distance
with the highest density from R(S0 , i) until R(S0 , i) between them Dist(S1 , S2 ) can be computed as
becomes empty. This procedure is terminated when all    
knapsacks are examined (lines 32–38 of Algorithm 3). Dist S1 , S2 = n − Sim S1 , S2 (13)
To illustrate the main steps of the backbone-based crossover
operator, we use the case of Fig. 2 as a working exam- where the similarity Sim(S1 , S2 ) is a complementary measure
ple. The example involves an instance of 19 items and of the distance representing the maximum number of elements
three knapsacks, and operates with two parent solutions S1 of S1 that do not need to be displaced to obtain the solution S2 .
and S2 . In the first step, the knapsacks of S1 and S2 are We apply the group matching algorithm used in Section II-D to
matched by using the fast greedy algorithm and the results identify the similarity Sim(S1 , S2 ). Given a population POP =
are: (S1 − k1 matches to S2 − k3 ), (S1 − k2 matches to {S1 , S2 , . . . , Sp } and a distance matrix Dist with Distij denoting
S2 − k1 ), and (S1 − k3 matches to S2 − k2 ). In the sec- the distance between individuals Si and S j (i = j and i, j ∈
ond step, a partial offspring solution is constructed by first {1, . . . , p}), the average distance between Si and any other
conserving the backbone objects (striped objects in Fig. 2), individual in POP is given by
and then alternatively adding objects with the highest den- ⎛ ⎞
sity values from the parent solutions (item 7 from S1 − k1 , 
item 18 from S1 − k2 , item 2 from S2 − k1 , and item 11 AvgDisti,POP = ⎝ Distij ⎠/p. (14)
from S2 − k2 are selected in Fig. 2). In the third step, S j ∈POP,j=i
the partial solution is completed by allocating some unas- The general scheme of our QD pool updating procedure is
signed items (those in virtual knapsack k0 of the offspring described in Algorithm 4. The offspring solution S0 is first
solution) to other knapsacks (items 15 and 16 are allocated inserted into the population. Then all the solutions in the pop-
to k1 ; item 17 is allocated to k2 ; and items 4 and 6 are ulation are evaluated by using the following QD fitness (QDF)
allocated to k3 ). function:
Given that calculating the edge weight and finding the max-
imum weight matching take, respectively, O(n) and O(m2 ) QDF(Si ) = α ∗ OR( f (Si )) + (1 − α) ∗ DR(AvgDisti,POP )
time, our proposed greedy algorithm for group matching can (15)
be realized in time O(n + m2 ) in step 1. In steps 2 and 3,
finding the highest density object takes O(n) time in the worst where OR( f (Si )) and DR(AvgDisti,POP ) represent, respec-
case and this can repeat at most n times. So our backbone- tively, the rank of solution Si with respect to its objective
based crossover procedure can be realized in O(m2 + n2 ) in value and the average distance to the population, and α is
the worst case. a parameter empirically set to α = 0.6. With this parameter
CHEN AND HAO: MEMETIC SEARCH FOR THE GQMKP 915

TABLE I
setting, (15) ensures that the best individual in terms of objec- PARAMETER S ETTINGS OF THE MAGQMK A LGORITHM
tive value will never be removed from the population, which
formalizes the elitism property of our pool-updating strategy.
The worst solution Sw corresponds to the individual with the
largest QDF value. If S0 is different from Sw , we replace Sw
with S0 , otherwise we discard S0 .
The distance matrix Dist is a memory structure that we
maintain throughout the search. Each time a new solution S0
is inserted into the population, the distance between S0 and any
other solution in POP needs to be calculated, which takes O(p∗
(n+m2 )) time [given that the greedy group matching procedure of the four parameters (p, nl, nsl, cr), we tested several poten-
takes O(n + m2 ) time, see Section II-D]. The other distances tial values while fixing the other parameters to our specified
are extracted directly from Dist. The resting operations of the default values, and then chose the value yielding the best per-
pool updating procedure, including calculating AvgDisti,POP , formance. An analysis in Section IV-A explains why the value
QDF(Si ) and identifying the worst solution, take O(p2 + 2 ∗ p) of 200 is chosen for the length of the MNSA chain (nl),
time. Dist is updated if S0 is accepted and Sw is removed which is a critical parameter of MAGQMK. For the initial
which takes O(p) time. According to the above analysis, our temperature (T0 ), we use a formula (see Table I) to determine
pool updating procedure can be realized in O(p ∗ (n + m2 + p)) its value. The formula is identified as follows. Preliminary
time. experiments suggest a quadratic relation between T0 and the
objective value of the initial solution (denoted as f0 ), in the
form of T0 = a ∗ ( f0 + b)2 /c + d. We then selected four rep-
III. C OMPUTATIONAL E XPERIMENTS resentative instances whose initial objective values ( f0 ) range
This section is dedicated to experimental assessment of the from small to large and we tuned manually a best T0 for each
proposed MAGQMK algorithm. For this purpose, we show instance. With four pairs of (T0 , f0 ) values, we obtain the
computational results on 96 benchmark instances available in formula by solving four simultaneous equations. In summary,
the literature and make comparisons with the current best per- the parameter values of Table I are used in all the experiments
forming algorithms. To complete this section, we also show reported in this section even if fine-tuning the parameters could
a case study on a pseudo real-life problem concerning plastic lead to better results.
parts production with injection machines. Our MAGQMK algorithm was coded in C++1 and com-
piled by GNU gcc 4.1.2 with the “−O3” option. The experi-
ments were conducted on a computer with an AMD Opteron
A. Experimental Settings 4184 processor (2.8 GHz and 2 GB RAM) running Ubuntu
1) Test Instances: The 96 GQMKP benchmark 12.04. When solving the DIMACS machine benchmarks2
instances belong to two different sets and are available without compilation optimization flag, the run time on our
at: http://endustri.ogu.edu.tr/Personel/Akademik_personel/ machine is 0.40, 2.50, and 9.55 s, respectively, for graphs
Tugba_Sarac_Test_Instances/G-QMKP-instances.rar. r300.5, r400.5, and r500.5.
1) Set I: This set is composed of 48 small-sized instances
that are characterized by their number of objects n = 30, B. Computational Results of the MAGQMK Algorithm
number of knapsacks m ∈ {1, 3}, number of classes r ∈
In this section, we show computational results obtained by
{3, 15}, and density d ∈ {0.25, 1.00}. Optimal solutions
our MAGQMK algorithm on the two sets of 96 benchmark
are unknown for these instances.
instances under two different stopping criteria: 1) a short time
2) Set II: The second set includes 48 large-sized instances
limit of 100 generations and 2) a long time limit of 500 gener-
with the number of objects n = 300, number of knap-
ations. We use the second stopping criterion to investigate the
sacks m ∈ {10, 30}, number of classes r ∈ {30, 150}, and
long-run behavior of our MAGQMK algorithm on the set of 48
density d ∈ {0.25, 1.00}. Optimal solutions are unknown
large-sized instances. For each stopping criterion and for each
for these instances.
instance, our algorithm was executed 30 times independently.
The above two sets of instances were first generated in [30]
The computational results obtained by our MAGQMK
whereby the authors considered 12 factors that can affect the
algorithm on the instances of sets I and II are displayed,
problem structure. They examined each factor with two lev-
respectively, in Tables A1 and A2 in the supplemen-
els which, if a full factorial experiment is conducted, leads
tary document (available at http://www.info.univ-angers.fr/
to 4096 different types of problems. To sample a subset of
pub/hao/gqmkp.html). In these two tables, columns 1–4 give
problems from such a large number, they selected 32 types of
the characteristics of each instance, including the instance
test problems where all factors are double leveled. With this
identity number (No.), number of knapsacks (k), number of
design, they generated two sets of 96 benchmarks that we use
classes (r), and density (d). Column 5 shows the best known
in this paper.
2) Parameters: To report computational results of our 1 The best solution certificates are available at
MAGQMK algorithm, we adopt the parameter values shown http://www.info.univ-angers.fr/pub/hao/gqmkp.html.
in Table I, which are fixed in the following manner. For each 2 dfmax: ftp://dimacs.rutgers.edu/pub/dsj/clique/.
916 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 20, NO. 6, DECEMBER 2016

Fig. 3. Computational results of the MAGQMK on two sets of benchmark instances. Best results on (a) set I and (c) set II. Average results on (b) set I
and (d) set II.

results3 ( fbk ) which are compiled from the best results of the the best known results for 45 out of 48 (93.75%) cases, includ-
three best performing algorithms reported in [30]. Our results ing seven improved best lower bounds [see values starred
are displayed in the remaining columns, including the over- in Table A1 and the green square points in Fig. 3(a)]. For
all best objective value over 30 runs ( fbest ), the average value 37 out of 48 instances, even our average results are bet-
of the 30 best objective values ( favg ), the standard deviation ter than or equal to the previous best known lower bounds
of the 30 best objective values (sd), the earliest CPU time in [see Fig. 3(b)]. Moreover, MAGQMK has a perfect standard
seconds over the 30 runs when the fbest value is first reached deviation (sd = 0.00) for 38 out of 48 instances, which means
(tbest ), and the average value of the 30 CPU time when the that one run is sufficient for MAGQMK to attain its best solu-
best solution is first encountered in each run (tavg ). tion for these instances. Finally, MAGQMK is computationally
To give a general picture of MAGQMK’s performance with very efficient and reaches the best solution within a very short
respect to the best known results, we also provide four plots computing time (typically less than 1 s). Indeed, across all
of our best and average results for both sets of instances in instances of set I, the average value of the best solution time
Fig. 3. The horizontal axis of these plots shows the instance (tbest ) is 0.07 s and the average value of the average solution
serial number that indicates the order in which the instances time is 0.35 s.
appear in Tables A1 and A2. The vertical axis shows the gap For the 48 large-sized instances of set II, Table A2 and
of our results (either best or average) to the best known results Fig. 3(c) disclose that, within a short time limit (100 gen-
in percentage, calculated as ( f − fbk )×100/fbk , where f is erations), our MAGQMK algorithm performs remarkably by
the best or average solution value. A gap larger than zero improving all the previous best known results except one case
means MAGQMK obtains a new best known result for the (instance 1-2). Moreover, even its average results reach or
corresponding instance. improve the previous best lower bounds for 45 out of 48
For the 48 small-sized instances of set I, Table A1 and cases [93.75%, see Fig. 3(d)]. The average standard devia-
Fig. 3(a) show that our MAGQMK algorithm is able to attain tion is 43.37, which is small with respect to the best objective
values that are more than 10 000 for many cases. Finally, we
observe that these results are obtained within a reasonable
3 When we examine the solution certificates reported in [30] which computing time: the average value of the best solution time is
are provided at http://endustri.ogu.edu.tr/Personel/Akademik_personel/ 601.57 s and the average value of the average computing time
Tugba_Sarac_Test_Instances/G-QMKP-instances.rar, we find that the is 693.02 s.
reported results for instance 10-1 (15 256.01) and instance 10-2 (13 058.94)
correspond to infeasible solutions and consequently they will not be used as When a long time limit is available, our MAGQMK algo-
reference. rithm is able to discover even better results. In particular,
CHEN AND HAO: MEMETIC SEARCH FOR THE GQMKP 917

MAGQMK (500 Gens) discovers 28 improved best lower and the hybrid algorithms that were executed only once, we
bounds [see the magenta square points in Fig. 3(c)] with indicate the obtained best objective value ( f ) and the best CPU
respect to the results of MAGQMK (100 Gens). The aver- time (in seconds) when the best solution is first encountered.
age results of MAGQMK (500 Gens) are more interesting, For GA and MAGQMK that were executed more than one run,
which are better than those of MAGQMK (100 Gens) for 44 we give the average value of the best objective values ( favg )
out of 48 cases [see the magenta square points in Fig. 3(d)]. and the average value of the best CPU times (tavg ). We also
Moreover, MAGQMK (500 Gens) decreases the average value provide the overall best objective value ( fbest ) obtained by GA
of standard deviation (sd) from 43.37 [of MAGQMK (100 and MAGQMK for reference purposes. The entry in bold in
Gens)] to 36.02. The average value of the best solution time each row indicates the best objective value for each instance
is 2673.27 s and the average value of the average computing reached by all the algorithms. The underlined value denotes
time is 3025.82 s, which remain reasonable. the reference fbest value of GA or MAGQMK that matches or
improves on the bold value. In the last two rows, we indicate
for each algorithm, the number of values highlighted (either
C. Comparisons With State-of-the-Art Algorithms in bold or underlined, row #Bests) and the average value of
To further assess the performance of our proposed computing time (row Avg.). Finally, in reference to the results
MAGQMK, we carry out a comparative study between our of the GA algorithm, which was run three times, the last three
algorithm with three best performing algorithms proposed columns of Tables A3 and A4 provide the results of three runs
in [30] that achieve state-of-the-art results. of our MAGQMK algorithm. These results are displayed for
1) Gams/Dicopt Solver [30]: The Gams/Dicopt solver is a the understanding of MAGQMK’s behavior when less runs are
program used for solving MINP problems by integrating applied. From these data, we observe that the average results
an NLP or MIP solver that runs under the Gams system. of MAGQMK vary slightly when the number of runs changes.
The reported results of Gams/Dicopt were obtained by This finding justifies our practice of using average results for
executing one run of the algorithm within a time limit comparative study.
of 13 000 s for each instance. The comparative results are also illustrated using plots in
2) Genetic Algorithm [30]: For each instance, the GA was Fig. 4, which gives the gaps of our average results to the best
run three times wherein each run was imposed a time known results, in comparison with GA’s average results, and
limit of 13 000 s. The reported results include the best the results of the GAM and hybrid algorithms [30].
lower bound, the average value of the three best objec- From Table A3 and Fig. 4(a), we observe that MAGQMK
tive values of three runs and the average value of the attains 37 best results (values in bold in Table A3) on the
three best solution time (in CPU seconds) of three runs 48 small-sized instances of set I, which is the largest among
when the best solution is first encountered. the results of the four algorithms in comparison. Among these
3) Hybrid Algorithm Combining F-MSG Algorithm and 37 best results, seven correspond to the unique best results,
GA [30]: The reported results of the hybrid algorithm which means they were never discovered by the three previ-
were obtained by executing one run of the algorithm ous reference algorithms. As for the CPU time, MAGQMK
within a time limit of 13 000 s for each instance. requires on average 0.35 s across set I, which is much shorter
The evaluation of the above three reference algorithms were than the time required by the hybrid algorithm (2.48 s), and
performed on a PC with an Intel Core i7 processor (2.8 GHz is very competitive to the other two reference algorithms.
and 8 GB RAM). This machine is faster than our computer Moreover, our MAGQMK algorithm displays a very stable
with a factor of 1.16 according to the Standard Performance behavior that is not observed for GA, which was also executed
Evaluation Corporation (www.spec.org). multiple runs. Indeed, MAGQMK achieves a success rate of
Note that the reported results of the three reference algo- 100% (i.e., favg = fbest ) for 39 out of 48 cases (81.25%),
rithms were obtained by executing one run or three runs of the whereas GA has only eight such cases (16.67%). When we
algorithm, whereas our reported results were attained by run- apply the statistical Wilcoxon test with a significance fac-
ning MAGQMK 30 times. Notice also that MAGQMK belongs tor of 0.05 for pairwise comparisons, the resulting p-values
to the family of stochastic algorithms for which executing mul- of 1.97E-4 for MAGQMK versus hybrid, and 1.072E-7 for
tiple runs is a common practice in the literature. Given the MAGQMK versus GA show a clear dominance of MAGQMK
above remarks, to compare our best results over 30 runs to over hybrid and GA. Though the associated p-value of 0.4613
the reference best results of no larger than three runs may be for MAGQMK versus Gams/Dicopt does not disclose a sig-
considered unfair. To make the comparison as fair as possible, nificant difference between these two methods, the superiority
we focus on the average results (instead of the best results) of the positive sum rank (205) over the negative sum rank
obtained by our MAGQMK algorithm for this comparative (146) demonstrates that MAGQMK competes very well with
study. Gams/Dicopt.
The comparative results of MAGQMK with the three ref- An even more favorable comparison is observed in Table A4
erence algorithms on the 48 small-sized instances of set I and Fig. 4(b) for the 48 large-sized instance of set II.
and the 48 large-sized instances of set II are summarized in Specifically, our MAGQMK algorithm is able to attain a
Tables A3 and A4, respectively, in the supplementary docu- unique best result for 46 out of 48 cases (95.83%) while
ment. In these two tables, we list the identity number of the the Gams/Dicopt solver and the hybrid algorithm share the
instance in the first column (column INST). For Gams/Dicopt remaining two cases. Moreover, MAGQMK consumes on
918 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 20, NO. 6, DECEMBER 2016

Fig. 4. Comparative results of the MAGQMK with three state-of-the-art algorithms. Comparative results on (a) set I and (b) set II.

TABLE II
C OMPUTATIONAL R ESULTS OF THE MAGQMK ON THE P SEUDO R EAL -L IFE I NSTANCE

average 693.02 s in terms of computing time, which is involves 124 750 values. Such a large-sized and nonlinear
much less than that consumed by the three reference algo- instance poses a real challenge for any existing GQMKP algo-
rithms (693.02 versus 5184.91 of Gams/Dicopt, 3612.71 of rithm. As stated in [30], the Gams/Dicopt solver even failed
hybrid, and 2598.33 of GA). Our MAGQMK algorithm eas- to find a feasible solution for a problem with such difficulty
ily dominates the GA. Indeed, GA obtains 0 best result while when a time limit of 13 000 s was given. To test the abil-
MAGQMK attains 46. Additionally, the overall best objective ity of our MAGQMK algorithm, we ran it 30 times on the
value ( fbest ) of GA is worse than our average result ( favg ) for pseudo-RLGQMKP instance under the time limits of 100 gen-
46 out of 48 cases. To estimate the validity of our conclu- erations, 60 generations, and 20 generations, respectively. The
sion, we apply the Wilcoxon test with a significance factor of first stopping condition (100 generations) is a standard one that
0.05 to compare MAGQMK with the Gams/Dicopt, hybrid, was used in previous experiments, while the last two stopping
and GA algorithms, respectively. The associated p-values of conditions (60 and 20 generations) are used specifically in
7.816E-13, 6.253E-13, and 1.421E-14 confirm a clear domi- this experiment to meet the potential efficiency requirement
nance of MAGQMK over the three reference algorithms on in real situation. The computational results of MAGQMK on
the instances of set II. the pseudo-RLGQMKP instance are displayed in Table II. For
the purpose of comparison, we also report the results obtained
D. Application of MAGQMK to Pseudo Real-Life Problem by the GA algorithm described in [30]5 for 30 times under
three different stopping conditions that were used in [30].
As indicated in Section I, one real-life application of
The stopping condition of the GA [30] relies on two criteria:
the GQMKP is the plastic parts production with injec-
1) nf (a fixed number of generations) and 2) ni (the num-
tion machines in a plastic production company [30]. In
ber of generations without improvement). From Table II, we
this section, we study the performance of our MAGQMK
observe that the best performance of our MAGQMK algorithm
algorithm on a pseudo real-life GQMKP instance (pseudo-
in terms of both best result and average result is achieved
RLGQMKP). This pseudo-RLGQMKP instance simulates
under the longest time condition (100 generations). However,
closely the real-life problem involving plastic parts pro-
the decrease of the solution quality is marginal when the time
duction used in [30] in terms of both problem size and
limit is reduced. Indeed, when using the shortest time limit (20
characteristics.4 The data file of the pseudo-RLGQMKP
generations), the best and average solution quality decrease by
instance as well as its detailed characteristics are available
only 0.04% and 0.18%, respectively, but with a saving of 28
at http://www.info.univ-angers.fr/pub/hao/gqmkp.html.
min, compared to the results of using 100 generations. Now
The pseudo real-life problem is very large-sized with 500
if we compare the results of our MAGQMK algorithm with
jobs (objects) and 40 machines (knapsacks). Its resulting
those of the GA algorithm, it is clear that MAGQMK easily
mathematical model has 12 840 constraints and 44 000 binary
dominates the reference algorithm. MAGQMK, even with its
decision variables. The pairwise profit parameter qij alone
shortest time limit (20 generations, 901.02 s), outperforms the
4 The data file of the real-life problem in [30] is no longer avail-
able, as confirmed by the authors. We generated the pseudo real-life 5 Since the source code of the GA algorithm [30] is not available to us, we
instance with the instance generator and the problem features provided by have implemented the algorithm strictly following the description presented
Saraç and Sipahioglu [30]. We are grateful to them for this help. in the original paper.
CHEN AND HAO: MEMETIC SEARCH FOR THE GQMKP 919

GA algorithm with its longest time budget (nf /ni = 1200/150, progress steadily. The above observations on the best running
9133.48 s) in terms of average performance. Finally, one notes profiles are also valid for the average profiles. This analy-
that MAGQMK’s results remain more stable than GA’s results sis confirms that the value of 200 is a reasonable choice for
across the three time conditions. This experiment demonstrates parameter nl.
that the proposed MAGQMK algorithm is able to handle Concerning the best running profile of MNSA, we observe
effectively large real-life cases even under a reduced time that even if the best objective value increases sharply at
condition. the beginning, the search soon reaches a point from which
the best objective value can no longer be improved. The
IV. A NALYSIS same is also observed on the average running profile of
MNSA. Even MAGQMK with the least interesting param-
In this section, we perform additional empirical analyses
eter nl = 50 can always obtain a solution that is better
to gain a deeper understanding of the running behavior of
than the best solution obtained by MNSA. Comparing the
the proposed algorithm and the effectiveness of its underly-
running profiles of MAGQMK and MNSA shows a clear inter-
ing mechanisms. Specifically, we explore the running profile
est of the memetic framework and our proposed crossover
of the algorithm, the effectiveness of the three proposed
operator.
neighborhoods and the efficacy of the pool updating strategy.

A. Running Profile B. Effectiveness of the Three Neighborhoods


The best (resp. average) running profile is given by the func- The neighborhood is a critical element that affects the effi-
tion: i → f (i), where i is the number of iterations and f (i) is cacy of a local search procedure. Our proposed MAGQMK
the best (resp. average) objective value known at iteration i. algorithm relies on three dedicated neighborhoods: 1) NR (the
The running profile is a natural way to observe the evolution of neighborhood induced by the REAL operator); 2) NSW (the
the (best or average) objective value during a search process. neighborhood induced by the SWAP operator); and 3) NGE
We mention that the number of loops (nl) of MNSA which (the neighborhood induced by the GENEXC operator), which
represents the search depth of the local optimization proce- are explored in a sequential way in the MNSA procedure.
dure is a critical parameter which affects the performance of In this section, we investigate the influence of each neighbor-
the proposed MAGQMK algorithm. To understand how this hood over the performance of the proposed algorithm. For this
parameter influences the algorithm behavior, we use the run- purpose, we propose six weakened versions of MAGQMK,
ning profile to investigate our MAGQMK algorithm with four including three versions with a single neighborhood and three
different values of the parameter nl: nl = 50, 100, 200, 400. others with double neighborhoods. Except for the disabled
We consider four representative instances selected from set II: neighborhood(s), these MAGQMK variants share the same
3_1, 9_1, 11_2, and 19_2. These instances are of reasonable components as the standard MAGQMK algorithm. For the
size and difficulty, which are characterized by different lev- sake of simplicity, we denote these variants as MA_R, MA_S,
els of k (number of knapsacks), r (number of classes), and d MA_G, MA_RnS, MA_RnG, and MA_SnG, where, for exam-
(density). We mention that the observation below on these four ple, MA_R indicates an algorithm variant with only NR
instances are also valid for other tested instances. For each of neighborhood, and MA_RnS indicates a variant with NR and
the four representative instances and for each value of nl, we NSW neighborhoods. We tested these six variants as well as the
performed 30 runs of MAGQMK, each run being given 22 000 standard MAGQMK algorithm on the 48 large-sized instances
loops (number of temperature cooling). Fig. 5 shows the best of set II. Each algorithm was run 30 times with 100 gener-
and average running profiles of MAGQMK with the four dif- ations per run. We calculate for each instance the BestGap
ferent values of nl. The figure shows also the running profiles and the AvgGap, which are computed as ( f − f ∗ )×100/f ∗ ,
of MNSA alone for comparative purpose. MNSA is also exe- where f is the best or average solution value and f ∗ is the best
cuted 30 times with the parameter values in Table I and initial result found by the standard MAGQMK algorithm. The exper-
solutions generated by the RGCM procedure (Section II-B). imental results are shown in Fig. 6, where Fig. 6(a) and (b)
From Fig. 5, we observe that MAGQMK with nl = 200 and Fig. 6(c) and (d) are dedicated to the one-neighborhood
always attains the best performance in terms of both best variants and the two-neighborhood variants, respectively. The
and average objective value. Such a performance cannot be instances are displayed in the same order as they are presented
reached by using other values of nl for the four representa- in Table A4. Statistical data are summarized in Table III in
tive instances. With nl = 50, MAGQMK typically displays the which for each algorithm variant and for both BestGap and
worst performance. With nl = 100 and nl = 400, the quality AvgGap, we list the minimum and the average value over 48
of the best solution found by MAGQMK changes on different gaps (row MIN and AVG). Notice that gaps are in negative
instances meaning that none of these two values is definitely values and thus a smaller value means a larger gap.
better than the other. We observe also that with nl = 200 Fig. 6 discloses that for each algorithm variant, the gap
and nl = 400, the best objective value increases more quickly values (no matter BestGap or AvgGap) are typically below
at the beginning than with the other two values. Moreover, zero, which means all six algorithm variants perform worse
nl = 200 and nl = 400 preserve a better population diver- than the standard MAGQMK algorithm. Moreover, the perfor-
sity than nl = 50 and nl = 100, which effectively avoids a mance of the one-neighborhood variants always falls behind
premature convergence of the algorithm and makes the search the two-neighborhood variants in terms of both average and
920 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 20, NO. 6, DECEMBER 2016

Fig. 5. Running profiles of the MAGQMK with four different nl values on four representative instances. (a) 3_1 best profile. (b) 3_1 average profile. (c) 9_1
best profile. (d) 9_1 average profile. (e) 11_2 best profile. (f) 11_2 average profile. (g) 19_2 best profile. (h) 19_2 average profile.

minimum gap values (see Table III). These observations Among the three one-neighborhood algorithms, MA_G, which
confirm that each of the three neighborhoods makes a signif- employs the single NGE neighborhood, attains the best per-
icant contribution to the overall performance of MAGQMK. formance in terms of the average gap value, followed by
CHEN AND HAO: MEMETIC SEARCH FOR THE GQMKP 921

Fig. 6. BestGap and AvgGap of six algorithm variants to the standard MAGQMK. One-neighborhood (a) BestGap and (b) AvgGap. Two-neighborhood
(c) BestGap and (d) AvgGap.

TABLE III
S TATISTICAL DATA OF B EST G AP AND AVG G AP data of the computational results. For each algorithm variant,
Table IV lists the average value of the best results over 48
instances (column Avg.fbest ), the average value of the aver-
age results over 48 instances (column Avg.favg ). Table IV also
lists, for the best result and the average result, respectively,
the number of instances where MAGQMK performs better
than MAGQMKPW (column # > 0) and where MAGQMK
performs as equally well as MAGQMKPW (column # = 0).
MA_S and finally MA_R. In the three two-neighborhood
From Table IV, we observe that compared to MAGQMKPW ,
variants, again the two algorithms with NGE as one of
MAGQMK achieves a better average value for both best result
its neighborhoods (i.e., MA_RnG and MA_SnG) show an
(21 882.41 versus 21 849.57) and average result (21 791.55
overall better performance than the one without it (i.e.,
versus 21 781.08) obtained over the 48 instances. Moreover,
MA_RnS). These observations demonstrate that the neighbor-
MAGQMK attains a best result, which is better than or equal
hood NGE , which is specifically designed for the GQMKP,
to that of MAGQMKPW for 43 out of 48 cases (36 bet-
is the most critical one among the three neighborhoods
ter, seven equal), and an average result, which is better than
employed.
or equal to that of MAGQMKPW for 32 out of 48 cases
(30 better, two equal). The above observation indicates that
C. Impact of the Pool Updating Strategy MAGQMK reaches a better performance than MAGQMKPW ,
As described in Section II-E, we employ a QD rule to which confirms the usefulness of our proposed QD pool
update the solution pool so as to maintain a healthy diver- updating strategy.
sity of the population. To evaluate the merit of this strategy, To gain some insights on the inner working of the QD
we compare it to a traditional “pool worst” (PW) strat- pool updating strategy, we provide in Fig. 7 the evolution of
egy, which simply replaces the worst solution in terms of the population diversity in function of the generations on the
objective value in the pool with a new offspring solution. four representative instances that were used in Section IV-A.
We ran two algorithm variants (standard MAGQMK and The population diversity is defined as the average distance
MAGQMKPW ) 30 times on the 48 large-sized instances of between all individuals in the population where the distance
set II. MAGQMK and MAGQMKPW are the same except for measure is the set-theoretic partition distance introduced in
the pool updating strategy. Table IV summarizes the statistical Section II-E. We also provide the diversity evolution of the
922 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 20, NO. 6, DECEMBER 2016

TABLE IV
S TATISTICAL DATA OF T WO P OOL U PDATING S TRATEGIES ON THE 48 L ARGE -S IZED I NSTANCES OF S ET II

Fig. 7. Diversity in function of generations on four representative instances. (a) 3_1. (b) 9_1. (c) 11_2. (d) 19_2.

PW strategy for comparative purpose. From Fig. 7, we can known results whereby seven of them correspond to improved
make two observations: 1) the diversity decreases regularly best known results. For the set of 48 large-sized benchmarks,
for both pool updating strategies and 2) the diversity is bet- our algorithm performs even better by improving all previous
ter preserved with the QD updating strategy compared to the best lower bounds except for one case. We have also compared
PW strategy; indeed, the magenta line (QD updating strategy) MAGQMK with three best performing algorithms published
is generally above the blue line (PW strategy) for all tested very recently [30] and showed that MAGQMK dominates
instances. these reference algorithms both in solution quality and compu-
tational efficiency. An application of the MAGQMK approach
V. C ONCLUSION to a pseudo real-life problem additionally demonstrates the
In this paper, we have presented an effective memetic algo- efficacy of the proposed algorithm for practical cases.
rithm (MAGQMK) for the GQMKP. GQMKP is a useful Furthermore, we have compared MAGQMK and its under-
model in practice while representing a real computational lying SA procedure to show the interest of the population-
challenge. The proposed MAGQMK algorithm combines a based memetic framework and our backbone-based crossover
dedicated backbone-based crossover operator for solution operator. We have illustrated the effectiveness of the proposed
recombination and an MNSA procedure for local optimiza- dedicated neighborhoods (in particular, the novel general-
tion. A QD-based pool updating strategy ensures a healthy exchange neighborhood) and the interest of the proposed QD
diversity of the population. pool updating strategy.
Computational assessments on two sets of 96 benchmark Finally, it is expected that the ideas behind the crossover
instances reveal that the proposed approach is highly effec- operator and the neighborhoods developed in the work would
tive compared to the state-of-the-art methods. For the set of be useful to other constrained knapsack problems and more
48 small-sized instances, MAGQMK is able to attain 45 best generally constrained grouping problems.
CHEN AND HAO: MEMETIC SEARCH FOR THE GQMKP 923

R EFERENCES [27] D. C. Porumbel, J.-K. Hao, and P. Kuntz, “An evolutionary approach
with diversity guarantee and well-informed grouping recombination for
[1] N. K. Bambha, S. S. Bhattacharyya, J. Teich, and E. Zitzler, “Systematic graph coloring,” Comput. Oper. Res., vol. 37, no. 10, pp. 1822–1832,
integration of parameterized local search into evolutionary algorithms,” 2010.
IEEE Trans. Evol. Comput., vol. 8, no. 2, pp. 137–155, Apr. 2004. [28] M. G. C. Resende and C. C. Ribeiro, “Greedy randomized adaptive
[2] U. Benlic and J.-K. Hao, “A multilevel memetic approach for improv- search procedures,” in Handbook of Metaheuristics, vol. 57. Norwell,
ing graph k-partitions,” IEEE Trans. Evol. Comput., vol. 15, no. 5, MA, USA: Kluwer, 2003, pp. 219–249.
pp. 624–642, Oct. 2011. [29] T. Saraç and A. Sipahioglu, “A genetic algorithm for the quadratic
[3] Y. Chen and J.-K. Hao, “Iterated responsive threshold search for the multiple knapsack problem,” in Advances in Brain, Vision, and Artificial
quadratic multiple knapsack problem,” Ann. Oper. Res., vol. 226, no. 1, Intelligence (LNCS 4729). Heidelberg, Germany: Springer, 2007,
pp. 101–131, 2015. pp. 490–498.
[4] X. Chen, Y. S. Ong, M. H. Lim, and K. C. Tan, “A multi-facet survey [30] T. Saraç and A. Sipahioglu, “Generalized quadratic multiple knapsack
on memetic computation,” IEEE Trans. Evol. Comput., vol. 15, no. 5, problem and two solution approaches,” Comput. Oper. Res., vol. 43,
pp. 591–607, Oct. 2011. pp. 78–89, Mar. 2014.
[5] P. C. Chu and J. E. Beasley, “A genetic algorithm for the [31] A. Singh and A. S. Baghel, “A new grouping genetic algorithm for
multidimensional knapsack problem,” J. Heuristics, vol. 4, no. 1, the quadratic multiple knapsack problem,” in Evolutionary Computation
pp. 63–86, 1998. in Combinatorial Optimization (LNCS 4446). Heidelberg, Germany:
[6] E. Falkenauer, “A new representations and operators for genetic algo- Springer, 2007, pp. 210–218.
rithms applied to grouping problems,” Evol. Comput., vol. 2, no. 2, [32] K. Tang, Y. Mei, and X. Yao, “Memetic algorithm with extended neigh-
pp. 123–144, 1992. borhood search for capacitated arc routing problems,” IEEE Trans. Evol.
[7] E. Falkenauer, Genetic Algorithms and Grouping Problems. New York, Comput., vol. 13, no. 5, pp. 1151–1166, Oct. 2009.
NY, USA: Wiley, 1998.
[8] L. Feng, Y.-S. Ong, M.-H. Lim, and I. W. H. Tsang, “Memetic search
with interdomain learning: A realization between CVRP and CARP,”
IEEE Trans. Evol. Comput., vol. 19, no. 5, pp. 644–658, Oct. 2015.
[9] P. Galinier and J.-K. Hao, “Hybrid evolutionary algorithms for graph
coloring,” J. Comb. Optim., vol. 3, no. 4, pp. 379–397, 1999.
[10] D. Gusfield, “Partition-distance: A problem and class of perfect graphs
arising in clustering,” Inf. Process. Lett., vol. 82, no. 3, pp. 159–164,
2002.
[11] P. Galinier, Z. Boujbel, and M. C. Fernandes, “An efficient memetic
algorithm for the graph partitioning problem,” Ann. Oper. Res., vol. 191, Yuning Chen received the B.Eng. and M.Eng.
no. 1, pp. 1–22, 2011. degrees from the National University of Defense
[12] C. García-Martínez, F. Glover, F. J. Rodriguez, M. Lozano, and R. Martí, Technology, Changsha, China, in 2010 and 2012,
“Strategic oscillation for the quadratic multiple knapsack problem,” respectively. He is currently pursuing the Ph.D.
Comput. Optim. Appl., vol. 58, no. 1, pp. 161–185, 2014. degree in computer science with the LERIA
[13] C. García-Martínez, F. J. Rodriguez, and M. Lozano, “Tabu-enhanced Laboratory, University of Angers, Angers, France.
iterated greedy algorithm: A case study in the quadratic multiple His research interests include evolutionary com-
knapsack problem,” Eur. J. Oper. Res., vol. 232, no. 3, pp. 454–463, putation, memetic algorithms, meta-heuristics and
2014. multiobjective optimization for quadratic knapsack
[14] A. Hiley and B. A. Julstrom, “The quadratic multiple knapsack problem problems, and other combinatorial optimization
and three heuristic approaches to it,” in Proc. Genet. Evol. Comput. problems.
Conf. (GECCO), Seattle, WA, USA, 2006, pp. 547–552.
[15] J. K. Hao, “Memetic algorithms in discrete optimization,” in Handbook
of Memetic Algorithms (Studies in Computational Intelligence), vol. 379,
F. Neri, C. Cotta, and P. Moscato, Eds. Heidelberg, Germany: Springer,
2012, Ch. 6, pp. 73–94.
[16] A. Jaszkiewicz, “On the performance of multiple-objective genetic local
search on the 0/1 knapsack problem: A comparative experiment,” IEEE
Trans. Evol. Comput., vol. 6, no. 4, pp. 402–412, Aug. 2002.
[17] H. W. Kuhn, “The Hungarian method for the assignment problem,”
Naval Res. Logist. Quart., vol. 2, no. 1–2, pp. 83–97, Mar. 1955.
[18] S. Kirkpatrick, C. D. Gelatt, Jr., and M. P. Vecchi, “Optimization by Jin-Kao Hao received the degree from the School of
simulated annealing,” Science, vol. 220, no. 4598, pp. 671–680, 1983. Computer Science, National University of Defense
[19] Z. Lü and J.-K. Hao, “A memetic algorithm for graph coloring,” Eur. J. Technology, Changsha, China, in 1982; the mas-
Oper. Res., vol. 203, no. 1, pp. 241–250, 2010. ter’s degree from the National Institute of Applied
[20] P. Merz and B. Freisleben, “Fitness landscapes, memetic algorithms, Sciences, INSA Lyon, Villeurbanne, France, in
and greedy operators for graph bipartitioning,” J. Evol. Comput., vol. 8, 1987; the Ph.D. degree in constraint programming
no. 1, pp. 61–91, 2000. from the University of Franche-Comté, Besançon,
[21] P. Moscato and C. Cotta, “A gentle introduction to memetic algorithms,” France, in 1991; and the Professorship Diploma
in Handbook of Metaheuristics, F. Glover and G. A. Kochenberger, Eds. Habilitation à Diriger des Recherches degree from
Norwell, MA, USA: Kluwer, 2003. the University of Science and Technology of
[22] Y. Mei, X. Li, and X. Yao, “Cooperative coevolution with route distance Montpellier, Montpellier, France, in 1998.
grouping for large-scale capacitated arc routing problems,” IEEE Trans. He is a Distinguished Professor (Professeur des Universits de classe excep-
Evol. Comput., vol. 18, no. 3, pp. 435–449, Jun. 2014. tionnelle) with the Computer Science Department, University of Angers,
[23] F. Neri, C. Cotta, and P. Moscato, Eds., Handbook of Memetic Angers, France, and a Senior Fellow with the Institut Universitaire de France.
Algorithms (Studies in Computational Intelligence), vol. 379. From 2003 to 2015, he was the Head of Computer Science with LERIA
Heidelberg, Germany: Springer, 2012. Laboratory, University of Angers, Angers, France. He has authored or co-
[24] Y. S. Ong and A. J. Keane, “Meta-Lamarckian learning in memetic authored over 200 peer-reviewed publications and co-edited nine books in
algorithms,” IEEE Trans. Evol. Comput., vol. 8, no. 2, pp. 99–110, Springer’s Lecture Notes in Computer Science series. His research interests
Apr. 2004. include design of effective algorithms and intelligent computational methods
[25] Y. S. Ong, M. H. Lim, and X. Chen, “Research frontier: Memetic for solving large-scale combinatorial search problems, bioinformatics, data
computation—Past, present & future,” IEEE Comput. Intell. Mag., vol. 5, science, telecommunication networks, and transportation.
no. 2, pp. 24–36, May 2010. Dr. Hao has served as an Invited Member for over 180 program committees
[26] D. Pisinger, “The quadratic knapsack problem—A survey,” Discr. Appl. of international conferences and is on the editorial board of seven international
Math., vol. 155, no. 5, pp. 623–648, 2007. journals.

Вам также может понравиться