Professional Documents
Culture Documents
net/publication/235614449
CITATIONS READS
5 171
2 authors:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Labed Said on 26 February 2016.
11
International Journal of Computer Applications (0975 – 8887)
Volume 34– No.2, November 2011
pbestiD) and the best position obtained by its informants. Thus the 4. MULTIDIMENSIONAL KNAPSACK
equations for updating the velocity and position of particles are
presented below [5]: PROBLEM
vid(t)= ω vid (t-1) + c1 r1 (pbestid (t-1) - xid (t-1)) + c2 r2 (gbestd (t-1) The knapsack problem (KP) is one of the easier NP-hard
- xid (t-1)) (1) problems [8]. It can be defined as follows: Assuming that we
have a knapsack with maximum capacity C and a set of n
xid (t)= xid (t-1) + vid (t) (2) objects. Each object i has a profit pi and a weight wi. The
problem consists to select a subset of objects that maximize the
ω is an inertia coefficient. (xid (t), xid (t-1)), (vid (t), vid (t-1)): knapsack profit without exceeding the maximum capacity of the
Position and Velocity of particle i in dimension d at times t and knapsack. KP can be formulated as:
t-1, respectively. pbestid (t-1), gbestd(t-1) : the best position
n
obtained by the particle i and the best position obtained by the
swarm in dimension d at time t-1, respectively. c1, c2: two Maximize ∑ pi xi (5)
i =1
constants representing the acceleration coefficients. r1, r2:
random numbers drawn from the interval [0,1[. vid (t-1), c1 r1
(pbestid (t-1) - xid (t-1)), c2 r2 (gbestd(t-1) - xid (t-1)): the three
n (6)
Subject ∑ wi xi ≤ C
components mentioned above, respectively.
i =1
The PSO algorithm begins by initializing the size of the swarm xi ∈ {0,1}
and the various parameters. Assign randomly to each particle an
Many variants of the knapsack problem were proposed in the
initial position and velocity. Initialize pbestid, then calculate the
literature including the Multidimensional Knapsack Problem
fitness f(xid) of particles in order to calculate the best position
(MKP). MKP is an important issue in the class of knapsack
found by the swarm (gbestd). At each iteration, particles are
problem. It is a combinatorial optimization problem [9] and it is
moved using equations (1) and (2). Their objective functions are
also a NP-hard problem [9, 10]. In the MKP, each item xi has a
calculated and pbestid, gbestd are updated. The process is repeated
profit pi like in the simple knapsack problem. However, instead
until the satisfaction of stopping criterion. A pseudo PSO
of having a single knapsack to fill, we have a number m of
algorithm is presented in our previous work in [1].
knapsack of capacity Cj (j = 1 ... m). Each xi has a weight wij
3. BINARY PARTICLE SWARM that depends of the knapsack j (example: an object can have a
weight 3 in knapsack 1, 5 in knapsack 2, etc.). A selected object
OPTIMIZATION (BPSO) ALGORITHM must be in all knapsacks. The objective in MKP is to find a
The first version of the Binary Particle Swarm Optimization subset of objects that maximize the total profit without
(BPSO) algorithm (The Standard BPSO algorithm) was exceeding the capacity of all dimensions of the knapsack. MKP
proposed in 1997 by Kennedy and Eberhart [6]. In the BPSO can be stated as follows:
algorithm, the position of particle i is represented by a set of bit.
The velocity vid of the particle i is calculated from equation (1). n
vid is a set of real numbers that must be transformed into a set of Maximize ∑ pi xi (7)
probabilities, using the sigmoid function as follows: i =1
1 n
sig (vid ) = (3)
Subject ∑ wij xi ≤ C j j = 1...m
1 + exp(−vid )
i =1 (8)
Where sig (vid) represents the probability of bit xid takes the
value 1. xi ∈ {0,1}
To avoid the problem of the divergence of the swarm, the
The MKP can be used to formulate many industrial problems
velocity vid is generally limited by a maximum value Vmax and a
such as capital budgeting problem, allocating processors and
minimum value -Vmax, i.e. vid ∈ [-Vmax, Vmax]. The position xid databases in a distributed computer system, cutting stock,
of particle i is updated as follows: project selection and cargo loading problems [10]. Due to its
1 if r < Sig (vid) importance and its NP-Hardness, MKP has received the
xid= attention of many researches. It was treated by several methods
(4) for examples, Chu and Beasley [10] proposed a genetic
0 Otherwise
algorithm for the MKP, Alonso et al [11] suggested an
Where r is a random number taken from the interval [0, 1[. evolutionary strategy for MKP based on genetic computation of
Two main parameter problems with BPSO are discussed in [7]. surrogate multipliers, Drexl [12] proposed a simulated annealing
First, the effect of velocity clamping in the continuous PSO is approach for the MKP, Stefka Fidanova [13] applied the ant
opposite of that in the binary PSO (BPSO). In fact, in the colony optimization to solve the MKP, Li et al [14] suggested a
continuous PSO the maximum velocity of the particle encourage genetic algorithm based on the orthogonal design for MKP,
the exploration, but it limits the exploration in the binary PSO Zhou et al [9] suggested a chaotic neural network combined
[7]. The second problem is the difficulties with choosing proper heuristic strategy for MKP, Angelelli et al [15] proposed Kernel
values for inertia weight. In fact, w < 1 prevents convergence search: A general heuristic for MKP, Kong and Tian [16]
[7]. proposed a particle swarm optimization to solve the MKP and so
one.
12
International Journal of Computer Applications (0975 – 8887)
Volume 34– No.2, November 2011
13
International Journal of Computer Applications (0975 – 8887)
Volume 34– No.2, November 2011
Begin
Crossover Algorithm
Input : Tow particles x1 and x2
Output : One particle xi Initialization of S, xid, pbestid
1. Choose a step p
2. Choose two random positions c1 and c2 from x1
and x2 : c1, c2∈{1 , . . . , D-p} Apply PRA on each infeasible solution
3. Swap elements of x1 from c1 to c1+p with those of and calculate the fitness particles
x2 from c2 to c2+p
4. Swap elements of x1 from c2 to c2+p with those of
x2 from c1 to c1+p Calculate pbestid and gbestd
5. Calculate the fitness of new particles and select the
best one.
Calculate xid using equation (10)
14
International Journal of Computer Applications (0975 – 8887)
Volume 34– No.2, November 2011
Table1 shows the experimental results of our MHPSO algorithm Table 2. Results and Comparison of MHPSO with PSO-P
with some instances taken from the literature. The first column for mknap1 instances.
indicates the instance name, the second and third columns
indicate the problem size i.e. number of objects and number of best MHPSO PSO-P
knapsack dimensions respectively. The fourth column indicates N° n M
known Best AVG Best AVG
the best known solution from OR-Library. Column 5 record the
1 6 10 3800 3800 3800 3800 3800
best results obtained by the MHPSO. Table1 shows that the
proposed algorithm is able to find the best known result of all 2 10 10 8706,1 8706,1 8706,1 8706,1 8570.7
instances. 3 15 10 4015 4015 4015 4015 4014.7
Table2 shows experimental results of our MHPSO algorithm 4 20 10 6120 6120 6120 6120 6118
and the PSO-P algorithm with 7 benchmarks taken from mknap1
instances. The first column indicates the problem index, the 5 28 10 12400 12400 12386 12400 12394
second and third columns indicate the problem size i.e. number 6 39 5 10618 10618 10566 10618 10572
of objects and number of knapsack dimensions respectively. The
7 50 5 16537 16537 16460 16537 16389
fourth column indicates the best known solution from OR-
Library. Column 5 and 6 record the best and average (AVG)
results obtained by the MHPSO and PSO-P during 30
independent runs for each instance. Table 3. Experimental Results of MKP with mknapcb1 and
mknapcb4 instances
Table2 shows that our algorithm is able to found the best
solution of all the mknap1 instances. Compared with PSO-P Benchmark Problem Best
MHPSO
algorithm which utilized penalty function technique to deal with Name size known
the constrained problems, the MHPSO algorithm gives better 5.100.00 24381 24329
averages (AVG) in most cases. The found results are very 5.100.01 24274 24149
encouraging. They prove the efficiency of the proposed
mknapcb1 5.100.02 23551 23494
algorithm.
5.100.03 23534 23370
Table 1. Experimental results with some instances from the
literature. 5.100.04 23991 23889
10.100.00 23064 22983
best
Instance n m MHPSO 10.100.01 22801 22657
known
HP1 28 4 3418 3418 mknapcb4 10.100.02 22131 21853
HP2 35 4 3186 3186 10.100.03 22772 22511
PB5 20 10 2139 2139
10.100.04 22751 22614
PB6 40 30 776 776
PB7 37 30 1035 1035
SENTO1 60 30 7772 7772
SENTO2 60 30 8722 8722 7. CONCLUSION
WEING1 28 2 141278 141278 In this paper, we have proposed a new hybrid particle swarm
WEING2 28 2 130883 130883 optimization algorithm that we have called MHPSO. In the
WEING3 28 2 95677 95677 MHPSO, we have combined some principle of the particle
WEING4 28 2 119337 119337 swarm optimization and the crossover operation of the genetic
WEING7 105 2 1095445 1095445 algorithm. In opposite to the original PSO algorithm that is
WEISH01 30 5 4554 4554 designed for solving continuous optimization problems, the
WEISH06 40 5 5557 5557 main feature of the proposed algorithm is that is can be applied
WEISH10 50 5 6339 6339 to solve all type of optimization problems (continuous, discrete
WEISH15 60 5 7486 7486 and discrete binary optimization problems) by the appropriate
choose of the population type. In the aim to verify and prove the
WEISH18 70 5 9580 9580
performance of our new algorithm, we have tested it on some
WEISH22 80 5 8947 8947
MKP benchmarks taken from OR-Library. Experimental results
show a good and encouraging solution quality obtained by our
Finally, Table 3 shows the experimental results of our MHPSO proposed algorithm. Based on this promising result, our
with some hard instances of mknapcb1 and mknapcb4. Column fundamental perspective is to use the proposed algorithm to
1 shows the benchmark name. Column 2 indicates the problem solve other NP-hard and combinatorial optimization problems.
size and columns 3 and 4 indicate the best known and the
MHPSO solutions respectively. Obtained results in table 4 allow 8. REFERENCES
saying that MHPSO algorithm gives good results. However, the [1] A. Gherboudj, S. Chikhi. BPSO Algorithms for Knapsack
performances of MHPSO can be increased by the introduction Problem. A. Özcan, J. Zizka, and D. Nagamalai (Eds.):
of other specified knapsack heuristic operators utilizing WiMo/CoNeCo 2011, CCIS 162, pp. 217–227, 2011.
problem-specific knowledge. Springer (2011)
15
International Journal of Computer Applications (0975 – 8887)
Volume 34– No.2, November 2011
[2] J. Olamaei, T. Niknam, G. Gharehpetian. Application of [11] C-L. Alonso,F. Caro, J-L. Montana. An Evolutionary
particle swarm optimization for distribution feeder Strategy for the Multidimensional 0-1 Knapsack Problem
reconfiguration considering distributed generators. Appl. Based on Genetic Computation of Surrogate Multipliers.
Math. Comput., 201(1-2):575-586. (2008) In: Proc. J. Mira and J.R. Alvarez (Eds.): IWINAC 2005,
[3] Carlos Cotta, Jose Ma Troya: A Hybrid Genetic Algorithm LNCS 3562, pp. 63–73, 2005.Springer (2005)
for the 0-1 Multiple Knapsack Problem. Artificial Neural [12] Drexl A. A simulated annealing approach to the
Nets and Genetic Algorithms 3, New York (1998) 250-254 multiconstraint zero–one knapsack problem. Computing
[4] J. Kennedy, R.C. Eberhart. Particle Swarm Optimization. 1988; 40:1–8.
In: Proc. IEEE Int. Conf. On Neural Networks, WA, [13] Stefka Fidanova. Ant Colony Optimization for Multiple
Australia, pp. 1942–1948 (1995) Knapsack Problem and Model Bias Z. Li et al. (Eds.): NAA
[5] Shi. Y, R. Eberhart. Parameter Selection in Particle Swarm 2004, LNCS 3401, pp. 280–287, Springer (2005).
Optimization. Proceedings of the 7th Annual Conference on [14] H. Li, Y-C.Jiao, L. Zhang, Z-W. Gu. Genetic Algorithm
Evolutionary Programming, pp. 591-600, LNCS 1447, Based on the Orthogonal Design for Multidimensional
Springer (1998) Knapsack Problems. In: Proc. L. Jiao et al. (Eds.): ICNC
[6] J. Kennedy, R.C. Eberhart. A discrete binary version of the 2006, Part I, LNCS 4221, pp. 696–705, 2006.Springer
particle swarm algorithm. Proceedings of the World (2006)
Multiconference on Systemics, Cybernetics and [15] E. Angelelli, R. Mansini, M.G. Speranza. Kernel search: A
Informatics, pp. 4104-4109, NJ: Piscatawary (1997) general heuristic for the multi-dimensional knapsack
[7] Khanesar. M-A, Teshnehlab. M and Shoorehdeli. M-A. A problem. Computers & Operations Research 37 (2010)
Novel Binary Particle Swarm Optimization. In proceedings 2017–2026. Elsevier (2010).
of the 15th Mediterranean Conference on Control & [16] M. Kong, P. Tian. Apply the Particle Swarm Optimization
Automation, July 27 – 29, 2007, Athens – Greece. to the Multidimensional Knapsack Problem. In: Proc. L.
[8] Pisinger, D.: Where are the hard knapsack problems? Rutkowski et al. (Eds.): ICAISC 2006, LNAI 4029, pp.
Computers and Operations Research, Vol.32, N°. 9, pp. 1140–1149, 2006. Springer (2006)
2271-2284, 2005. [17] J H. Holland. Adaptation in natural and artificial system.
[9] Y. Zhou, Z. Kuang, J. Wang. A Chaotic Neural Network Ann Arbor, The university of Michigan Press, (1975).
Combined Heuristic Strategy for Multidimensional [18] OR-Library, J.E. Beasley, http: // www.
Knapsack Problem. In: Proc. L. Kang et al. (Eds.): ISICA people.brunel.ac.uk/mastjjb/jeb/orlib/mknapinfo.html
2008, LNCS 5370, pp. 715–722, 2008. Springer (2008)
[10] P.C. Chu, J.E. Beasley. A Genetic Algorithm for the
Multidimensional Knapsack Problem. Journal of
Heuristics, 4: 63–86 (1998).
16