## 3 Methodology
### Production Scheduling Using DES  
DES is a very useful tool for industrial entities. It can be used to estimate the effects of possible changes in the production process on the production line performance before applying those changes in real life. These changes can be as simple as changing worker's assignment, number of machines or even the positioning of machines within the production line itself. To use DES efficiently, a simulation framework must be used to make sure that the result is consistent with the real-life case study. The proposed DES framework used in this work is an adapted version from the one presented in [23], it consists of eight phases: problem definition, production line analysis, data collection, initial layout construction, model building, model testing, experimentation, and finally results analysis and conclusion. The proposed DES framework is shown in Figure 2.  
In phase one, a clear problem definition must be determined early on to make sure that the researcher fully understands the required output. The aim of this work DES is to produce a dynamic production schedule for a flexible flow-shop production line of a specific industrial case study. This production schedule must be of the minimum makespan possible. The second phase includes analysis of the production line, after the problem is defined, a thorough analysis must be done to completely understand the production line. This must be achieved after defining the boundaries of the system, which machines to study and which products scope to work on. The production line analysis is done by creating a simple model to represent the real-life one. This can be achieved through stating the production line specs, such as:  
* Machines number
* Workstations number
* Weekly work-shifts number
* Work-shifts duration
* Products type
* Production line manufacturing type (manual labor or automated)
* Workers' tasks per workstation
* Products routing
* Transportation methods per workstation (forklift, crane, trolley, etc.) * Processing time of each product on every machine  
Figure 2: Proposed DES Framework. The third phase is collecting the data based on the production line analysis. The nature of the required data depends on the production line specs mentioned above. The data required can be collected from two methods either through historical data that was already collected earlier manually or through installed sensors and observation methods. The second method is through the conduction of a time and motion study. The fourth phase includes the construction of the initial layout to show how the production line works. This is achieved using the data collected from phase three. This initial layout serves as representation of the real-life case and represents the data collected from phase three in a graphical manner. This simplifies the process of understanding how the production line works. The fifth phase includes the building of the simulation model based on the initial layout and the data collected from the production line analysis. The simulation model is constructed using the software tool available and the data collected from the production line analysis is used as input. In this work, FLEXSIM software for this task. The sixth phase includes validation and verification of the simulation model. To verify the simulation model, either static or dynamic testing is used. For this paper, static testing is used where every entity used through the simulation model was observed by a peer to determine whether it behaves the same as seen in the initial layout produced or not, correctness action is taken if there was an entity within the simulation model that did not follow the concept model. An initial model is constructed for the validation process, an old production schedule formerly used by the factory is used to validate that the simulation model produces the same makespan of the old schedule. This was done to test the level of accuracy of the simulation model and how close it represents the real case.