
138 Chapter Four—Evolutionary Computation Implementations
{ // end of the cycle
cur_pso = 0; // move to the first pso
}
PSO_current_state = PSO_UPDATE_PBEST_EACH_CYCLE;
// move to the next state
psos[cur_pso].popu_index = 0;
}
}
The PSO UPDATE INERTIA WEIGHT State
In this state, the current PSO updates its inertia weight according to its inertia weight
updating method. The state transitions to the state
PSO_EVALUATE. The index of
the population is set to 0 to start from the first individual. The state handler routine
is shown in Listing 4.32.
Listing 4.32
The PSO UPDATE INERTIA WEIGHT state handler routine.
static void PSO_update_inertia_weight (void)
{
iw_update_methods(psos[cur_pso].env_data.iw_method); ...