3. The Proposed BFOA for VRPSDP
3.1.Encoding Method
As mentioned before, BFOA is a population-based search method that imitated the foraging
behavior of the individuals in the swarm as a searching method. In the proposed BFOA, a swarm of S
bacteria is served as searching agent for a specific problem solution. A bacterium’s position (θ
i
)
simply is a sequence of n customer nodes and represents a solution of the problem. The ability of a
bacterium to search for solution is represented by its direction vector φ(j) which drives bacterium
movement. In the BFOA iteration step, every bacterium moves from one position to another position
based on its direction. By moving from one position to another, a bacterium evaluates different
solutions for the problem. An example of encoded and decoded solution are illustrated in Figure 1.
a) Encoded Solution
3–1 2–1 1–1 4–1 9–1 10–2 8–2 5-2 7-2 6-2
b) The Information About Customer Assignments to Routes
Route 1: 0-3-2-1-4-9-0 Route 2: 0-10-8-5-7-6-0
c) Decoded Solution
Figure 1. An Example of Encoded Solution and This Code’s Solution
Considering customer sequence given in Figure 1a, customers are started to be assigned to the first
route. If capacity constraint is violated, a new route is opened and the customers not yet visited are
assigned considering customer sequence. As all customers are assigned to the routes, the depot is
added these routes and the traveled distance is calculated according to the Equation (2).
0
n
ab
a
J c
(2)
J is total traveled distance (objective function value), n is number of customers, cab is distance
between nodes a and b. As long as the solution improves in the algorithm, a memory table which has
nodes is updated for the consecutive pairs of customers. In this table, the values of pairs of customers
are incremented 1 and these values are used in elimination and dispersal loop to increase the
probability of reaching the most appropriate solution. The detailed explanation of the steps is given in
the next sub-sections:
3.2. Initial Solution: The initial route is constructed using the nearest neighborhood heuristic
(NNH) (Gajpal and Abad, 2009). In this study, due to the number of bacteria is large, first customers
can’t be selected randomly. NNH is used for each customer.
3.3. Chemotaxis loop: Bacteria begin to chemotaxis loop with their initial positions and initial
objective function (J) values. The values of direction vector are chosen randomly from the discrete
number sets {-1, 0, +1} and these numbers are assigned to each customer on the customer sequence.
“-1” implies that the customer replaces with the customer located before step length (C). “0” implies
this customer save its position and finally “+1” implies that the customer replaces with the customer
located after step length (C). The customer sequence representing the bacterium is seperated five parts
which have equal lengths and a part is chosen randomly. Defined bacterium direction is used for this
part and bacterium’s position is modified. So the bacterium move along to the defined direction as (C).
If solution improves the bacterium continues to move along the same direction and objective function
(J) is computed according to this direction and the memory table is updated. This is maintained until
the solution doesn’t improve or maximum number of swim steps (Ns) is reached. If one of these two
criteria is met, one chemotactic step finishes. At the end of the chemotactic step bacterium’s objective
3 . เสนอ bfoa สำหรับ vrpsdp
3.1.encoding วิธีดังกล่าวก่อน bfoa เป็นวิธีที่สุขภาพของประชากรค้นหาเลียนแบบพฤติกรรมการหาอาหารของบุคคลในกลุ่มโดยการค้นหาวิธี ในการนำเสนอ bfoa , จับกลุ่มของ S
แบคทีเรีย ทำหน้าที่เป็นตัวแทนสำหรับการแก้ไขปัญหาที่เฉพาะเจาะจง ตำแหน่งของแบคทีเรีย ( θ
ผม
)เป็นเพียงลำดับของลูกค้าโหนด และแสดงถึงทางออกของปัญหา ความสามารถของแบคทีเรียที่จะค้นหาทางออก
จะแสดงทิศทางของเวกเตอร์φ ( J ) ซึ่งทำให้สามารถเคลื่อนไหว
ใน bfoa ทำซ้ำขั้นตอน ทุก ซึ่งย้ายจากตำแหน่งหนึ่งไปยังตำแหน่งอื่น
ตามทิศทางของมัน โดยการย้ายจากตำแหน่งหนึ่งไปยังอีก ซึ่งประเมินแตกต่างกัน
โซลูชั่นสำหรับปัญหา ตัวอย่างของการเข้ารหัสและถอดรหัส โซลูชั่น จะแสดงในรูปที่ 1
) การเข้ารหัสโซลูชั่น 3 – 1 – 2 – 1 1 1 4 – 1 – 1 – 2 8 9 10 – 2 5-2 7-2 6-2
b ) ข้อมูลเกี่ยวกับการมอบหมายลูกค้าเส้นทางเส้นทางที่ 1 : 0-3-2-1-4-9-0
:
b 0-10-8-5-7-6-0 2 เส้นทาง ถอดรหัสแก้ไข )
1 รูป ตัวอย่างของรหัสและโซลูชั่น
วิธีนี้รหัสพิจารณาลำดับในรูปที่ 1A ให้ลูกค้า ลูกค้าจะเริ่มได้รับมอบหมายเส้นทางแรก
ถ้าความจุจำกัดละเมิด , เส้นทางใหม่จะเปิดขึ้น และลูกค้าที่ยังไม่ได้เข้าเยี่ยมชมเป็นลำดับ
มอบหมายพิจารณาลูกค้า เป็นลูกค้าทั้งหมดให้กับเส้นทางนั้น คลังจะ
เพิ่มเส้นทางเหล่านี้และเดินทางระยะทางที่คำนวณตามสมการ ( 2 )
0
n
.a
J C
( 2 )
J ทั้งหมดเดินทางระยะทาง ( ค่าฟังก์ชันวัตถุประสงค์ ) , n คือจำนวนลูกค้าแท็กซี่คือระยะทางระหว่างโหนด A และ B
ตราบใดที่โซลูชั่นที่เพิ่มในขั้นตอนวิธี ความทรงจำที่โต๊ะซึ่งมี
โหนดอัพเดทสำหรับคู่ที่ติดต่อกันของ ลูกค้า ในโต๊ะนี้ ค่าของคู่ค้า
จะสั่ง 1 และค่าเหล่านี้จะใช้ในการตัดและกระจายวงเพิ่ม
ความน่าจะเป็นของถึงโซลูชั่นที่เหมาะสมที่สุด คำอธิบายรายละเอียดของขั้นตอนที่ระบุในส่วนย่อยถัดไป :
. . เริ่มต้นการแก้ไข : เส้นทางเริ่มต้นจะถูกสร้างขึ้นโดยใช้ใกล้ละแวก )
( nnh ไม่เป็น ) ( gajpal และ บัด , 2009 ) ในการศึกษานี้เนื่องจากจำนวนของแบคทีเรียที่มีขนาดใหญ่
แรกลูกค้าไม่สามารถจะเลือกโดยการสุ่ม nnh ไม่เป็นใช้สำหรับลูกค้าแต่ละ .
3 . ข้อตกลงห่วง : แบคทีเรียเริ่ม chemotaxis ห่วงกับตำแหน่งเริ่มต้นของพวกเขาและวัตถุประสงค์การทำงานเบื้องต้น
( J ) ค่า ค่าของทิศทางเวกเตอร์จะสุ่มเลือกจากหมายเลขชุดต่อเนื่อง
{ - 1 , 0 ,1 } และตัวเลขเหล่านี้จะได้รับให้กับลูกค้าแต่ละรายในลำดับลูกค้า .
" - 1 " หมายความว่าลูกค้าแทนที่กับลูกค้าอยู่ ก่อนก้าวยาว ( C ) " 0 " หมายถึง
ลูกค้าบันทึกตำแหน่งและสุดท้าย " 1 " หมายถึงลูกค้าแทนที่กับลูกค้า
ตั้งอยู่หลังความยาวก้าว ( C ) ลูกค้าลำดับของแบคทีเรียที่แยก
5 ส่วนซึ่งมีความยาวเท่ากันและส่วนที่ถูกเลือกแบบสุ่ม ซึ่งใช้สำหรับกำหนดทิศทางและตำแหน่งในส่วนนี้
คือแก้ไข ดังนั้นแบคทีเรียย้ายไปกำหนดทิศทาง ( C )
ถ้าโซลูชั่นช่วยเพิ่มแบคทีเรียยังคงเคลื่อนที่ไปตามทิศทางเดียวกันกับ
ฟังก์ชันวัตถุประสงค์ ( J ) จะคำนวณตามทิศทางนี้และหน่วยความจำตารางการปรับปรุงนี้จะยังคงจนกว่า
โซลูชั่นไม่ปรับปรุงหรือจำนวนสูงสุดของขั้นตอนที่ว่ายน้ำ ( NS ) ถึง ถ้าหนึ่งในสองคนนี้
เกณฑ์กัน หนึ่ง chemotactic ขั้นตอนเสร็จสิ้น ในตอนท้ายของ chemotactic ขั้นตอนที่มีวัตถุประสงค์
การแปล กรุณารอสักครู่..
