# XOR Binary Gravitational Search Algorithm with Repository: Industry 4.0 Applications
## 7 Conclusions  
In this paper, an analysis of BGSA has been performed on mathematical update formulation for its acceleration term. Using such analysis, we show the fact that the existing acceleration and velocity term is not behaving as expected under certain conditions, and therefore conclude that it is required to modify the acceleration term of BGSA. We then propose the use of an XOR BGSA which benefits from repository. Analysis of this algorithm illustrates that the behaviour of acceleration and velocity terms are as expected. A repository is added to maintain best particle and provide a guideline for the movements of other particles. Complete statistical analysis is provided which demonstrate how the expected value of particles in each dimension converge to the particle selected from repository using the proposed version of XOR BGSA. To test the efficacy of the proposed optimization algorithm, a number of simulation studies are performed against different uni-modal and multimodal optimization problems. Simulation results indicate that the proposed modification outperforms other binary optimization algorithms namely BGSA [16], IBPSO [17], BPSO [15], BGWO [18] and BDA [19]. The proposed algorithm is used to solve a constrained maximization problem namely multi-knapsack problem. It is observed that the proposed algorithm outperforms BGSA [16], IBPSO [17], BPSO [15], BGWO [18] and BDA [19] for this optimization problem as well. Not only the mean value of results obtained during 30 times of optimization is better than other five optimization algorithms, but also the proposed algorithm benefits from a fast convergence rate. Moreover, repeatability of the proposed algorithm is better in most cases than in other investigated algorithms.  
The conclusion made from the first part of simulation is that the proposed XOR BGSA with repository is an effective optimization algorithm to deal with binary optimization problems. Motivated by such results the algorithm is used for task planning of robot performing an assembly task.  
Industry 4.0 emerges the need for robust machine learning and artificial intelligence approaches to be used on the factory floor to determine responses to production changes resulting from continuous design changes. Assembly task planning and path planning in an industrial environment as two frequent tasks are considered. The assembly task planning problem scenario considered in this paper is to find the optimum order of bolts to be fastened to minimize the total distance travelled by robot. Using the proposed optimization algorithm the distance travelled by robot decreased by 16.7%. This is a practical application of the proposed optimization algorithm in flexible manufacturing. In addition, the proposed XOR BGSA with repository is utilized to assist in path planning in a manufacturing environment. Such application would allow the robot to find time optimal path while avoiding obstacles and moving to a desired position. This demonstrated the ability to successfully perform such an operation, while enabling human feedback on results for a final implementation of a real robot.  
Conceptualization, M.A.K. and D.T.B.; Data curation: M.A.K.; methodology, M.A.K.; software, M.A.K.; validation, M.A.K., formal analysis, M.A.K.; investigation, M.A.K.; resources, M.A.K., writing--original draft preparation, M.A.K.; R.B., D.T.B. Writing--review and editing, M.A.K.; R.B.; G.M.-A., D.T.B.; visualization, G.M.-A. supervision, D.T.B.; project administration, D.T.B.; funding acquisition, D.T.B. All authors have read and agreed to the published version of the manuscript.  
This work is funded and supported by the Engineering and Physical Sciences Research Council (EPSRC) under grant number: EP/R021031/1--New Industrial Systems: Chatty Factories.  
The authors declare no conflict of interest.