I am implementing Genetic Algorithm (GA).
There are 43
numbers [Ambulance Locations] to choose from (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39)
, I choose 3
places since I have 3
ambulances.
I can only put my ambulance in 3
locations among 1-39 locations
(Restriction).
A chromosome sample: [000010000000000000100000000000100000000]
. This represents that I want to put my Ambulance on the 5th, 19th, and 31 positions.
The bits against positions 5th
, 19th
, and 31
are 1
and rest positions are 0
. In other words, I am turning on 5-bit, 19-bit, and 31-bit
.
Let's say
Candidate solution 1 (111000000000000000000000000000000000000)
and
Candidate Solution 2 (000000000000000000000000000000000000111)
My candidate solutions are encoded in 39-bits,I want to do a cross-over these 39-bits. Above two candidates solutions are a bit weird. What can be done here?
What can be a good approach to perform cross-over while puting ambulances in 3
locations among 1-39 locations
?