Partial flexible job shop scheduling considering preventive maintenance and priorities

In this paper, a new mathematical programming model is proposed for a partial flexible job shop scheduling problem with an integrated solution approach. The purpose of this model is the assignment of production operations to machines with the goal of simultaneously minimizing operating costs and penalties. These penalties include delayed delivery, deviation from a fixed time point for preventive maintenance, and deviation from the priorities of each machine. Considering the priorities for machines in partial flexible job shop scheduling problems can be a contribution in closer to the reality of production systems. For validation and evaluation of the effectiveness of the model, several numerical examples are solved by using the Baron solver in GAMS. Sensitivity analysis is performed for the model parameters. The results further indicate the relationship between scheduling according to priorities of each machine and production scheduling.


Introduction
The job shop problem is one of the major issues in production planning. In the flexible job shop problem, it is assumed that each operation is allowed to be processed on a set of available machines. Flexible job shop scheduling is much more difficult than job shop scheduling because in this case there is the problem of assigning operations to machines.
To cite this article: Farahani, Ameneh; Tohidi, Hamid; Khalaj, Mehran; Shoja, Ahmad (2020). Partial flexible job shop scheduling considering preventive mainte-nance and priorities WPOM-Working Papers on Operations Management,11 (2), 27-48. doi: https://doi.org/10.4995/wpom.v11i2.14187 Wang and Yu (2010) considered a flexible job-shop scheduling problem with machine availability constraints. Each machine is subject to preventive maintenance during the planning period and the starting times of maintenance activities are either flexible in a time interval or fixed time point. Rajkumar, Asokan, and Vamsikrishna (2010) consider a flexible job shop scheduling problem with maintenance at a time interval, and uses the greedy randomized adaptive search procedure (GRASP) algorithm. Moradi, Ghomi, and Zandieh (2010) consider a flexible job shop scheduling problem with preventive maintenance over a time interval. In this paper, makespan is considered as an optimal criterion for this problem, and has used a learningable genetic architecture to solve the problem. Moradi, Ghomi, and Zandieh (2011) provide a hybrid problem of flexible job shop scheduling and preventive maintenance by the multiobjective optimization approach. In this paper, the number of preventive maintenance and maintenance interval is not fixed. Dalfard and Mohammadi (2012) present a new mathematical modeling for the multi-objective flexible job shop problem with parallel machines and maintenance over a time interval. Li and Pan (2012) proposed an effective discrete chemical-reaction optimization algorithm for solving a flexible job shop scheduling problem with consideration of maintenance activity. In this paper, a time interval is considered for performing maintenance. Li, Pan, and Tasgetiren (2014) presented a discrete artificial bee colony algorithm to solve a flexible job shop scheduling problem with maintenance. A time interval is considered to carry out the maintenance. Ziaee (2014) considers the problem of flexible job shop scheduling with preventive maintenance. The preventive maintenance has to be is executed within a given time interval and only one maintenance operation is performed on each machine. Mokhtari and Dadgar (2015) present a mixed integer linear programming model for flexible job shop scheduling problem with maintenance. A time interval is considered to carry out the maintenance. Thornblad et al. (2015) consider the problem of flexible job shop scheduling with preventive maintenance activities. The start time of maintenance is not a fixed time and each preventive maintenance operation has to be is executed within a given time interval. They propose a fast-iterative approach to solve the problem. Ye and Ma (2015) propose a multi-objective integrated op-timization model based on the concept of flexible job shop and preventive maintenance that minimizes the maximum completion time and maintenance cost per time unit. Zandieh, Khatami, and Rahmati (2017) developed the problem of flexible job shop scheduling with condition-based maintenance. In this paper, the start time of the maintenance is based on the conditions and their time length is different. El Khoukhi, Boukachour, and Alaoui (2017) present the problem of flexible job shop scheduling with preventive maintenance. A fixed time is considered to carry out the maintenance. The objective is to minimize the makespan.
According to the literature review presented in present paper and the search, in none of the models, priority is not given to choosing the machine and allocations are made only by the competence of the machine. In real production environments, there are always priorities in the select of machines for assignment to activities as well as the length of time the machine is turned on and the number of setups of each machine. These priorities can be due to the costs imposed on the production system by each machine, the difficulty of setting up, the difficulty of working with a machine and the quality of the products produced by each machine. In the present study, the priorities are considered to choosing machines so that the proposed model is closer to the reality of production environments. In papers that have investigated the flexible job shop scheduling problem with preventive maintenance, they assume the start time of preventive maintenance is either a fixed time point or a time interval. In the actual production environments, taking a fixed time point for maintenance, interrupted production operations to perform repairs at a certain point in time, and sometimes rework operation on product are both costly and time-consuming. Also, considering a time interval for maintenance regardless of priority for any point time in this interval is far from the reality of maintenance. Therefore, the following points can be counted as the contribution of this paper in the partial flexible job shop scheduling problems: (1) The preferred time to repair is a fixed time point. However, a time interval is considered for positive or negative deviation from this time point. A penalty has been set for the positive or negative deviation from this point within this time interval (2) For each machine, three priorities are considered, including the length of time the machine is turned on in the system, the type of operation assigned to each machine and the number of setups for each machine. There is a penalty for deviating from every of the preferred items of each machine. This assumption makes this model applicable to industrial environments.
The rest of the paper is presented as follows. Section 2 describes the proposed model. In section 3, several numerical examples are solved and sensitivity analysis is performed and the results are analyzed. In the end, section 4 will present a summary of the paper and conclusions and future suggestions.

Description of proposed model
In this paper, the problem of flexible job shop scheduling with preventive maintenance is studied. Hypotheses considered in this paper are summarized as follows: • The time for production operations varies by different machines available for that operation; • There is a setup time for each machine when the product is changed; • After starting a production operation on a machine, there is no possibility of interrupting for other production operation or preventive maintenance activity; • All machines and jobs are available at the beginning of the schedule; • Each maintenance task has a fixed time for performing and a predefined time interval, in which the starting time of the preventive maintenance can be changed within it; • There are three priority items for each machine, which includes the duration that each machine is turned on, the operation assigned to each machine and the number of setups; • For different machines, the preventive maintenance interval, the duration of maintenance and the number of maintenance can be different; • Each machine during the planning horizon is assigned to stages that each stage occurs when the state of a machine or the type of operation or the type of product is changed. • For a machine that is turned on, there are four states in each stage that the machine can be assigned to one of the states in each stage. At each stage, either the machine is idle or the machine performs the production operation or preventive maintenance is done or the machine is in setup state; • The setup state is considered either when changing jobs on each machine or when the machine is in idle state at the stage p and is assigned to a production operation at the stage p+2, then that machine should be in the setup state at the stage p+1; • Each machine can be started only once during the planning period; • Each machine can only perform a production operation at each stage and each production operation is performing only by a machine; The purpose of this mathematical model is to allocate production operations to machines and determine the sequence of production operations on each machine, in order to minimize production costs and costs of deviation from preferences for each machine, and the cost of deviation from the pre-set point for preventive maintenance in a time interval, and minimize the total delay time of the delivery of jobs. First, we introduce the indices, sets, parameters, and variables of the model, and in the following, the objective function and the constraints of the model are presented. : Set of machine stages; Npm j : Set of preventive maintenance assigned to the machine j ; P s : Set of stages allowed to start the activity of each machine; J ik : Set of machines that can perform the operation o ik ; Ifev j : Set of production operations that are preferred for machine j ; Iafe j : Set of production operations that are non-preferred for machine ; : Set of the Latest operations of job ; Partial flexible job shop scheduling considering preventive maintenance and priorities Ameneh Farahani, Hamid Tohidi, Mehran Khalaj, Ahmad Shoja

Parameters
: The cost per time unit when the machine is turned on; : The cost of turning on the machine ; : The cost per time unit for the assignment of the machine to the production operation ; : The cost per time unit for the idle time of the machine ; : The cost per time unit for the setup time of the machine ; : The cost per time unit for the duration of preventive maintenance of the machine ; : Penalty for each positive deviation unit from the number of setups preferred for machine ; : Penalty for each negative deviation unit from the number of setups preferred for machine ; ℎ : Penalty for each positive deviation unit from duration preferred to turn on the machine ; ℎ : Penalty for each negative deviation unit from duration preferred to turn on the machine ; : Penalty for each unit of positive deviation from the start time of preventive maintenance of step machine ; : Penalty for each unit of negative deviation from the start time of preventive maintenance of step machine ; : Penalty for assigning the machine to the production operation that the machine can do it (depending on whether that production operation is preferred for that machine or that production operation is nonpreferred for that machine); : Penalty for each time unit delayed delivered of the product ; : The number of idle stages allowed for the machine ; : The maximum total time of idle allowed for the machine ; : The time of operation on the machine ; : The earliest allowed start time for the preventive maintenance of the step machine ; : The latest allowed start time for the preventive maintenance of the step machine ; Partial flexible job shop scheduling considering preventive maintenance and priorities Ameneh Farahani, Hamid Tohidi, Mehran Khalaj, Ahmad Shoja

Variables
: The total time length when the machine is turned on; : The total length of time when the machine is assigned to the production operation ; : The total length of time when the machine is idle at the production center; : The total time of setup of the machine ; : The total time length of setup of the machine when changing product; : The total time length of setup of the machine when changing from idle state to the assignment to the production operation; : The total time length of preventive maintenance of the machine ; : The positive deviation from the number of setups preferred for the machine ; : The negative deviation from the number of setups preferred for the machine ; ℎ : The positive deviation from the time of turning on preferred of machine ; ℎ : The negative deviation from the time of turning on preferred for machine ; : The positive deviation from the start time of preventive maintenance of the step of the machine; : The negative deviation from the start time of preventive maintenance of the step of the machine; : Total number of operations assigned to machine (for preferred operation, negative sign and for nonpreferred operation, positive sign is considered); : The number of machines are turned on in stage ; : Total time of delayed delivery of product ; : The time length of the stage of the machine ; : Binary variable that it is one if the machine is turned on at the ∈ stage and zero otherwise.
: Binary variable that it is one if the machine is turn on at the stage and zero otherwise; : Binary variable that it is one if the machine is assigned to the production operations at stage and zero otherwise; : Binary variable that it is one if the machine is idle at stage and zero otherwise.
: Binary variable that it is one if the machine is assigned to preventive maintenance in stage and zero otherwise; : Binary variable that it is one if the machine is assigned to the setup state at stage and zero otherwise; : Binary variable that it is one if the machine is assigned to activity in stage and zero otherwise; : Binary variable that is one if the machine is assigned to activity at stage after an idle stage and zero otherwise; : Binary variable that is one if the machine is assigned to preventive maintenance of the step in stage and zero otherwise; ′ ℎ : Binary variable that is one if the machine is assigned to the setup state in the change of the operation on product to the operation ′ ℎ on the product ′ and zero otherwise; : Binary variable that is one if the machine is assigned to the setup state in the change of the product and zero otherwise; : Binary variable that is one if the machine is assigned to the setup state after an idle stage and zero otherwise; : The start time of the stage of the machine ; : The start time of the operation on the machine ; ′ ℎ : The start time of the setup operation in the change of the operation on the product to the operation ′ ℎ on the product ′ of the machine ; : The start time of the setup state in the change from the idle state to the production operation.
: The start time of the preventive maintenance of the step on the machine ; : The start time of idling of machine in the stage ; : The number of setup of the machine ; : The deviation from the delivery time of the product (Both positive and negative); : Binary variable that it is one if preventive maintenance of the step of the machine should be assigned to that machine and zero otherwise; : The idle time of the machine in the stage ; : The objective function

The objective function
The objective function is consisting of a sum of eleven functions. All functions are of cost type.
= 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 (1) Which are as follows: 1-The cost of the time length is turning on the machine at the production center: 2-The cost of the number of machines that are started: 3-The cost of assigning machines to production operations: 4-The idle cost for machines: 5-The cost of setup for machines: Partial flexible job shop scheduling considering preventive maintenance and priorities Ameneh Farahani, Hamid Tohidi, Mehran Khalaj, Ahmad Shoja 6-The cost of preventive maintenance of machines: And the penalty of deviation from the preference of each machine include: 7-The penalty resulting from the deviation (positive or negative) from the number of preferred setup of each machine: 8-The penalty resulting from the deviation (positive or negative) of the time length of the turning on preferred for each machine (if it is turned on): 9-The penalty imposed by the assignment of machines to the production operations: 10-The penalty for the deviation (positive or negative) from the start time of preventive maintenance of the step of each machine: 11-Penalty for delayed delivery of each product:

Constraints
1. The number of machines that start their activity at each allowed stage; 2. Each machine can start its activity only once during each production period; 3. A machine can be turn on in the first stage if it starts its activity in this stage;

4.
A machine can only be turn on at the stages allowed to get started (other than the first period), which is either turned on at that stage or has been turned on in the previous period; Partial flexible job shop scheduling considering preventive maintenance and priorities Ameneh Farahani, Hamid Tohidi, Mehran Khalaj, Ahmad Shoja 5. Except for the stages allowed to start, a machine can only be turn on at each stage, if it is turned on at the previous stage; 6. If a machine turns on at each stage, must be in one of four states include assigned to production operations, set up, preventive maintenance and idle state;

7.
A machine is at the state at each stage, which is assigned to one of the production operations that it has the ability to do it at that stage; 8. A machine is in the state at each stage, which is assigned to one of the preventive maintenance steps of the machine at that stage; 9. A machine is in the state at each stage, which, that machine is assigned to a production operation on a product in the previous stage, and in the next stage it is assigned to a production operation on another product or that it is in the previous stage in idle state and in the next stage it is assigned to a production operation on a product; 10. A machine is in the state at each stage, which in the previous stage, it is assigned to a production operation on a product, and then it is assigned to a production operation on another product in the next stage; 11. A machine is in the state at each stage, which is in the previous stage in idle state and then it is assigned to a production operation on a product in the next stage.
12. The start time of each machine depends on the stage that is turned on; Partial flexible job shop scheduling considering preventive maintenance and priorities Ameneh Farahani, Hamid Tohidi, Mehran Khalaj, Ahmad Shoja 13. All the production operations must be done; 14. The start time of the preventive maintenance of each step is equal to the start time of the stage that the machine is assigned to the maintenance of that step; 15. The start time of preventive maintenance should be within a certain range; 16. The number of idle stages assigned to each machine should not exceed the permitted number; 17. The time length of idle for each machine at each stage should not exceed the maximum allowed idle time; 18. The total idle time of each machine should not exceed the maximum allowed idle time; 19. The time length of each stage for each machine is calculated as follows: 20. The start time of each stage assigned to each machine, with the exception of the first stage, is equal to the sum of the start time of the previous stage plus the time length of that stage; 21. The start time of each production operation on each machine is calculated as follows: 22. The start time of setup activity in the change of the operation to ′ ℎ on the machine is calculated as follows: 23. The start time of setup activity is calculated on each machine, when the state of the machine changes from the idle state to production operations state.
Partial flexible job shop scheduling considering preventive maintenance and priorities Ameneh Farahani, Hamid Tohidi, Mehran Khalaj, Ahmad Shoja 24. The start time of the idle for each machine at each stage, is calculated as follows: 25. The sequence of the start time of production operations of a product on a machine is ensured if both activities are assigned to a machine; 26. The sequence of the start time of production operations of a product on different machines is ensured; 27. The sequence of the production of different products on a machine according to the time length of setup is ensured; 28. The sequence of successive production operations of a product on a machine is ensured; 29. The sequence of successive production operations of a product on different machines is ensured;

30.
A machine is assigning to the state at each stage if the product has been changed on the machine; 31. The total time of the assignment of each machine to the production operations; Partial flexible job shop scheduling considering preventive maintenance and priorities Ameneh Farahani, Hamid Tohidi, Mehran Khalaj, Ahmad Shoja 32. The total time of the assignment of each machine to the preventive maintenance; 33. The total time of the setup of the machine ; 34. The total time is assigned to the setup state for each machine when the product is changed.
35. The total time of the assignment of each machine to the setup state in the change from idle state to production operations is computed; 36. The total time of idle is calculated for each machine after it is turned; 37. The total time of turning on is computed for each machine; 38. The number of setups assigned to machine is calculated; 39. The positive or negative deviation of the turning on time preferred for each machine (if it is turned on) is computed; 40. The positive or negative deviation of the number of setups preferred for each machine (if it is turned on) is calculated; 41. The positive or negative deviation from the start time of each step of preventive maintenance for each machine is computed; Partial flexible job shop scheduling considering preventive maintenance and priorities Ameneh Farahani, Hamid Tohidi, Mehran Khalaj, Ahmad Shoja 42. If the preventive maintenance of step , it should be assigned to that machine because of the machine being turned on at this time, this assignment must be done in one of the stages; ≤ ∑ ∈ ∀ ∈ , ∀ ∈ (55) 43. These constraints ensure that if the preventive maintenance is assigned to a machine, the machine is turn on at the start time of the maintenance; 44. This constraint calculates the total desirable or undesirable operations assigned to each machine; 45. The minimum time of turning on for a machine (if the machine is turned on); 46. This constraint calculates the deviation of the delivery time of each product; 47. This constraint calculates delayed delivery of each product (earlier delivery is not considered);

Results and discussion
In this part, several numerical examples are solved to evaluate the model and sensitivity analysis is performed on the costs and penalties of the model. There is a production system with five machines and three products that are being produced in this system. The sequence of production operations and the duration of each operation are given in Table1.1. The "N" in Table1.1. indicates that the machine is not capable to performing that operation. For the proposed model, the program is written in the GAMS software (version 24.9.1) and solved using the Baron solver. The optimum object function value is equal to 2143 and the solution time is 483 seconds. The scheduling is in accordance with Table 1.15. The delivery time of products is equal to 120, 185 and 155. Sensitivity analysis is performed to illustrate the effect of the parameter on optimal decisions. In the sensitivity analysis, the parameters that have been changed include the various costs and penalties listed in Table 1.16. The variation of parameters of the sensitivity analysis are also presented in Table 1  As seen in Table 1.17., the following can be noted: • Variation in penalties for machines' priorities: As the penalties increases, the scheduling moves towards more satisfying these priorities. So that the penalties resulting from these deviations in the objective function are reduced. The object function, despite the doubling of penalties, is reduced. Because the number and value of deviations have decreased. Also, by the reduction of penalties for machines' priorities, the objective function has decreased, while the number of deviations has increased from the priorities of machines, which is logical. • Variation of the costs: The variation of the cost affects both the delivery delay of the product and the total penalties for machines' priorities. As the costs increase, the total penalties for machines' priorities and the penalties for delayed delivery increase and scheduling and delivery of product are done in accordance with reduced costs. • Variation in penalties for delayed delivery: As the penalties for delayed delivery increase, the scheduling tends to reduce delayed delivery of products. Total penalties of machines' priorities and total costs have been changed in accordance with decreasing penalties for delivery delay of products.
The results of the sensitivity analysis show that the model responds logically to variations of the parameters of the problem. The change in input parameters affect the scheduling and the time of delivery of products and it reflects the relationship between scheduling with priorities and production scheduling.
The combination optimization problems are known as NP-hard problems. Due to the complexity and difficulty of solving these problems, the solution time increases exponentially as the dimensions of the problem increase. In the following, several problems with small and medium dimensions have been solved according to the data of Table 1.18. to show the efficiency of the model, and the results have been given according to the solution time. For these examples, the same parameters defined in the numerical example are used, but the number of machines and jobs are multiplied by two, three, four, and five, respectively. To solve these models, an Intel (R) Core (TM) i7CPU processor computer with 32 GB of memory has been used. As can be seen in Table 1.18., the solution time increases nonlinearly by increasing the dimensions of the problem. To solve a problem with 30 machines and 18 products, the program showed an out-of-memory message. According to Table 1.18., the time to solve these problems may be acceptable for small problems, but given that in production centers, there are a large number of machines and production operations that must be solved in a short and fast time. Exact methods are not acceptable for large-scale prob-

Conclusion
This paper presents a new mathematical programming model for partial flexible job shop scheduling with preventive maintenance. The purpose of this model is to allocate production operations to machines with the goal of simultaneously minimizing operating costs, penalties of delays in delivery, deviations from the fixed time point of preventive maintenance of each step of each machine and deviations of priorities for each machine. The contribution of this paper is to develop a model for the integrated optimization of the partial flexible job shop scheduling, considering the delayed delivery penalty, the penalty of the deviation from the start time of each step of preventive maintenance for each machine and the penalty of the deviation from the preferred priorities of each machine. The goal is to reduce costs per time unit. Also, in this model, the start time of each step of preventive maintenance for each machine is a fixed time point, but with the imposition of penalty it can change within a time interval.
Several numerical examples are presented to evaluate the model, and the sensitivity analysis shows the dependence between the scheduling and preferences for each machine.
These assumptions make this model applicable to industrial environments, in real production environments, there are always priorities in the select of machines for assignment to activities as well as duration of turning on and the number of setup of each machine. Despite this fact, this issue has not been considered in the literature on the partial flexible job shop scheduling problem with preventive maintenance. Also, considering a fixed time point for each step of maintenance on each machine, and considering the allowed time interval with the imposition of the penalty for the deviation from the fixed point is more consistent with the reality of maintenance. These research gaps are considered in this paper and these assumptions make this model closer to the reality of production environments. Partial flexible job shop problem is a combination optimization problem, In future research, it is suggested that this model be solved by meta-heuristic algorithms in order to complete evaluation of the model's capability. It is also recommended to incorporate quality control and human resource planning policies in this model, considering the selective priorities for each worker. The simultaneous optimization of production planning, preventive maintenance and quality control with regard to priorities can be done in future research.