# Embedded PSO for Solving FJSP on Embedded Environment (Industry 4.0 Era)
## 1 Introduction  
Industry 4.0 refers to the fourth industrial revolution that is currently taking place in manufacturing companies. We can explain the fourth revolution (Industry 4.0) as being the implementation of new technologies and techniques (sensor, cloud, analysis of big data, etc.) in order to obtain better communication between the different objects and/or resources (people, machines, products, customers, etc.) that have a link with production for the purpose of connecting in real time to all of its resources. Figure 1 presents some Industry 4.0 pillars. Industry 4.0 refers to a new way of organizing manufacturing processes, with the goal of establishing so-called \"smart factories\". Capable of increased production agility and resource allocation efficiency, these \"smart factories\" are setting the path for a new industrial revolution. The Internet of Things (IoT) and cyber-physical systems (CPS) are its technological foundations. The goal of this study is to improve the performance of the particle swarm optimization (PSO) in an embedded context for addressing the Flexible Job Shop Scheduling Problem (FJSP) in smart factories. FJSP is a variant of the standard job shop scheduling problem in which each operation can be performed on many machines, each of which can perform multiple operations. The scheduling problem entails assigning processes to machines andordering their start times while minimizing a specific objective function, such as the total machining time or the maximal completion time of all operations. A FJSP model can be used to model a wide range of real-world challenges. The FJSP is NP-hard in the strong sense [1]. Many studies have been conducted in an attempt to solve the FJSP. For example, in [2], the authors propose an integrated and enhanced method of a dispatching algorithm based on fuzzy AHP (FAHP) and TOPSIS. In [3], the authors present a dispatching algorithm to solve a real-world case of the flexible job-shop scheduling problem with transfer batches and the objective of minimizing the average tardiness of production orders. Papers in [4; 5] contain extensive research studies on the application of precise and metaheuristic techniques for solving the FJSP. Many metaheuristics are used to solve this problem. For example, in [6], an algorithm based on the principles of genetic algorithm (GA) with dynamic two-dimensional chromosomes is proposed. In [7], the authors propose a GA approach that utilizes a multi-chromosome to solve the FJSP. In a semiconductor production setting, the authors in [8] analyze stochastic flexible job-shop scheduling with limited spare resources and machine-dependent setup time, using a learning-based grey wolf optimizer. In [9], the authors use a batch-oblivious approach to solve a multiobjective complex job-shop scheduling problems. Again, in [10], a multi-objective GA is used for FJSP. Despite the fact that any metaheuristics can theoretically be applied to the FJSP, PSO is substantially easier to install and control because of its fewer parameters. PSO uses a population of particles that move around in the search space, according to simple mathematical formulae expressing the particle's position and velocity to find good, if not optimal, solutions to a problem. Each particle has a subset of particles with which it can communicate; this subset is known as swarm topology, and it can be a completely linked topology, a ring topology, a Von Neumann topology, and so on. A particle's movements are guided by its best-known position in the search space, as well as by the best-known positions of its neighbors. Particle Swarm Optimization was originally presented as an optimization technique for static environments; however, many real-world issues are dynamic, meaning that the environment and global optimal characteristics might change over time. In this paper, we fixed the research to the dynamic environments case (i.e., embedded environment or cyber-physical systems).