The same as IMCRO, OBLIMCRO has three stages, initialization, iteration, and finalization, as shown in
Figure 1. The general procedure is described in Algorithm 1, while the stages of the framework are detailed in the following subsections.
Algorithm 1 Framework of OBLIMCRO |
Input: Sets of populations.
- 1:
Initialization of parameters, such as buffer, Initial KE, PopSize, KELossRate, MoleColl, and . - 2:
Create PopSize number of random molecules - 3:
Calculate opposite molecules of random molecules - 4:
Mix random molecules and opposite molecules - 5:
Select PopSize molecules with lowest potential energy from the mix set - 6:
while the stopping criteria is not met do - 7:
Generate - 8:
if then - 9:
Randomly select one molecule m - 10:
if ( then - 11:
Trigger Decomposition - 12:
else - 13:
Trigger On-wall Ineffective Collision - 14:
end if - 15:
else - 16:
Randomly select two molecules and - 17:
if then - 18:
Trigger Synthesis - 19:
else - 20:
Trigger Inter-molecular ineffective collision - 21:
end if - 22:
end if - 23:
Check for new better solution - 24:
Calculate opposite molecule - 25:
Choose the solution with lower PE from the solution and its opposite molecule - 26:
Update population with the chosen solution - 27:
end while Output: Best solution.
|
3.2.1. Initialization Stage
Initialization is the first stage of OBLIMCRO, where the molecules are initialized. Initial values of molecules include PopSize, KELossRate, MoleColl, buffer, Initial KE, , and . Therein, Popsize is the number of all feasible solutions, KELossRate is the maximum percentage of KE reduction, MoleColl is used to determine whether the chemical reaction is inter-molecule or uni-molecule, KE is the initial kinetic energy of the molecule, and and are the thresholds for intensification and diversification.
Molecules in the initial population group are generated with OBL. First, the initial molecule group,
, is randomly generated; then, its opposite group,
, is generated with the function obl based on the OBL mechanism. Afterwards, the random and opposite group are mixed as MX, where
. The individuals in MX are sorted according to their potential energy and the PopSize molecules with the lowest potential energy are selected to form the initial population, denoted as IX.
Figure 2 shows an example of the initialization process, where the number of molecules in RX, OX, MX, and IX is PopSize.
The construction of RX, OX, MX, and IX takes place in the initialization stage. RX is constructed with a random inserting operation, as depicted in
Figure 3. Therein, the initial superstring C is randomly generated as an array the elements of which are composed of letters in the string alphabet. The element of
is randomly inserted into C, where
is one string of the input string set S and
. This random inserting operation is performed on all strings in S to obtain the initial population with PopSize molecules. For further processing, each supersequence is encoded as a set of integer values. For instance,
is an alphabet set and
. It is encoded as
, where each element of
is encoded as an integer in I in the corresponding position of the set. Then, the set
can represent the supersequence
, as shown in
Figure 4.
OX is obtained by the OBL mechanism after the initialization of RX. For each molecule X with n elements in RX, where
, its opposite molecule OX is obtained using the function
, as defined in Formula (
1). Therein, the function
obtains the inverse number of the integer x. For a real number x the feasible region of which is [a,b], its inverse number ox is defined in Formula (
2). Taking a molecule
with a feasible region [0,3] as an example, according to Formula (
1), the opposite molecule is
.
After obtaining RX and OX, MX is obtained by performing the collective union operation on RX and OX, where with the scale as 2*PopSize. The molecules are sorted according to the molecular potential energy of the molecules in MX. Half of the molecules in MX with the lowest potential energy are selected to construct IX, which is the initial molecule population.
3.2.2. Iteration Stage
The iteration stage consists of two subtasks, reaction and repair. There are four main operators used in the action subtask: on-wall ineffective collision, decomposition, inter-molecular ineffective collision, and synthesis. On-wall ineffective collision is realized by the collision of a single molecule. Then, one element of the molecule is randomly selected and changed to form a new molecule. The operator is used for local search. Decomposition refers to a molecule colliding with the wall and splitting into two or more molecules, and is usually used for global search. Inter-molecular ineffective collision is similar to on-wall ineffective collision. Synthesis is the combination of two molecules into a new molecule, which is equivalent to the inverse reaction of decomposition.
The four operators fall into two types, uni-molecule reaction and inter-molecule reaction. Therein, uni-molecule reactions include on-wall ineffective collision and decomposition, while inter-molecule reactions include inter-molecular ineffective collision and synthesis. The four operators in this stage are the same as those defined in [
12].
At the start of each iteration step, a parameter t is randomly generated. This parameter determines whether uni-molecule reactions or inter-molecule reactions are triggered. In particular, uni-molecule reactions are triggered when ; otherwise, inter-molecule reactions are triggered. The specific operator is further determined according to values of and . In uni-molecule reactions, decomposition is triggered if ; otherwise, on-wall ineffective collision is triggered. In inter-molecule reactions, synthesis is triggered if ; otherwise, inter-molecular ineffective collision is triggered.
Through the processing of the chemical operators a new molecule,
, is created based on the molecule
and an updating process is triggered, as shown in Algorithm 2. First, the opposite molecule,
, is created according to Formula (
1). The potential energy of
and
are compared and the molecule with lower potential energy is chosen to be returned to the initial population for updating.
Algorithm 2 Update based on OBL. |
Input: new molecule . = obl();
- 2:
PE() = f(); -
PE() = f(); - 4:
if PE() then; -
; - 6:
else -
= ; - 8:
end if -
if matches stopping criteria then - 10:
output ; -
else - 12:
put into IX to update the initial group; -
end if
|
Similar to that in IMCRO, a repair function to check this solution is triggered when a solution is obtained. If the requirement of the problem is satisfied, the obtained solution is repaired by a repair algorithm until the termination condition is met. Then, it enters the final stage, where the best solution is output and returned when the stopping criteria are met; otherwise, iteration is triggered again and the reactions are repeated.