Research Article

Forecasting Electrical Energy Consumption of Equipment Maintenance Using Neural Network and Particle Swarm Optimization

Algorithm 1

The pseudocode of the main PSO algorithm for evolving the ANN.
(1) Randomly initialize a main swarm of particles, each of which representing the number of the
 hidden nodes and the connection density of an ANN;
(2) Let ; set the pbest of each particle to its original position;
(3) For to do
(4)  For to do
(5)   Use the sub PSO procedure to evolve the th ANN on the training set;
(6)   Move the th solution in the main search space according to (4) and (5);
(7)   Update the pbest of the th solution;
(8)  Update the gbest of the main-swarm;
(9)  Update the control parameters of the outer loop according to (6)~(9);
(10) Use the sub PSO procedure to evolve the gbest of the main-swarm on the training set together
 with the validation set;
(11) return the gbest of the main-swarm;