SCHEDULE OPTIMIZATION WITH FLEXIBLE DURATIONS SCHEDULE OPTIMIZATION WITH FLEXIBLE DURATIONS

Cost, quality, and time are the pillars of a popular and well known business model. What is also well known about this model is that it is very difficult to be the industry leader in all three categories. This is because these categories are naturally interconnected such that one category cannot be changed without affecting the others. This creates an environment where a balance must be established to determine the appropriate amount of effort to focus on each of these three categories. This current research presents an application for the schedule optimization of operations with flexible durations. The objective of the problem is to find the optimal sequence of jobs to minimize cost, where cost is a function of makespan and work center processing durations. The constraints in the problem include variable job durations and a sequential flow of jobs through multiple successive work centers. Details of the implemented tools chosen in support of the optimization are described followed by a summary of the accuracy, robustness, and scalability of the proposed system on generic case studies. Final results indicate the proposed approach can successfully be applied to scheduling optimization with flexible job processing times. Implementation of this approach proves to be accurate, robust, and scalable when evaluated against other approaches. The system is implemented via a user friendly graphical interface.

The design of the problem will include jobs that will be processed through work centers (WCs).There are a total of j jobs to be processed, s work centers in series, and p work centers in parallel.Each job must sequentially go through every serial work center.A job may sit idle between work centers if there is no subsequent work center available.Figure 1 is a graphical illustration of the design of the scheduling optimization problem with flexible durations.Case studies will be evaluated with different quantities of j, s, and p.The components of profit will include functions of makespan and work center process durations.The total profit will be evaluated to determine the quality of the solution.For manufacturing systems observed by the author, typically there is one order of magnitude quantity of work centers in parallel, one or two orders of magnitude quantity of work centers in series, and anywhere between one to numerous orders of magnitude quantity of jobs.Scheduling optimization becomes increasingly computationally demanding as the size of a manufacturing system increases.

Schedule Optimization
There has been much research related to schedule optimization of manufacturing systems.Balasubramanian and Grossmann (2003) used a mixed integer linear programming (MILP) technique to optimize the minimum makespan of tasks with uncertainty in processing time durations.The approach presented by Balasubramanian and Grossmann worked well where the solution was more heavily structured by certain types of constraints but the models did not perform as well when tested against general problems.Li and Ierapetritou ( 2008) also evaluated schedule optimization with uncertainty in processing time durations but used three formulations of robust optimization (RO).The drawback of the approach taken by Li and Ierapetritou's was that it did not optimize an expected value objective function but rather promised to enforce the feasibility for the entire predefined uncertainty space of the problem.Ant colony optimization was presented by Kumar et. al. (2003) as an effective method of scheduling jobs in a flexible manufacturing system (FMS) but with non-flexible task durations.One of the most popular schedule optimization methods presented in this literature review is genetic algorithm (GA) optimization.Guo et. al. (2008) evaluated GA optimization with tardiness and earliness penalties built into the objective function which performed effectively when evaluated against two-order scheduling problems.Gao et. al. (2006) assessed GA optimization with machine availability constraints and Fanti et. al. (1998) studied GA optimization with a multi-criteria objective function by weighing desired criteria such as makespan, resource utilization, and work in progress (WIP).To the author's knowledge, no specific work relating to schedule optimization with flexible processing durations using GA optimization or any other optimization method is published in literature.

Model Research Applications
There does not seem to be any published research devoted to improving schedule optimization with operations that have flexible durations.This may be due to the fact that scheduling optimization with static work center durations is by itself challenging thus allowing work center durations to be dynamic only increases the difficulty to find the optimal solution.It could also be a consequence of assuming that most of the cost and speed benefits are obtained by solving a scheduling problem with static durations however, under certain circumstances it may be desirable to allow the optimization algorithm to determine task durations to increase profit margins.The remainder of this paper will examine this problem, evaluate the performance of a GA approach against case studies, and conclude with a summary of the results.

Components of Profit
One component of profit (as defined by this paper) is the cost to operate work centers.Maintenance is a significant input to the cost to operate work centers.
Scheduled equipment maintenance (also known as preventative maintenance) is generally correlated with the quantity of occurrences of using a piece of equipment (also known as cycles or intervals).Preventative maintenance is typically scheduled prior to the wear zone which is the point where the probability of corrective maintenance (also known as unscheduled maintenance) becomes increasingly (sometimes exponentially) more likely to occur.Boeing conducted a statistical analysis to evaluate the economics of conducting maintenance on their commercial airplanes (McLoughlin, Doulatshahi and Onorati 2011).This analysis was used to determine the optimal number of cycles (flight hours) to minimize costs associated with preventative maintenance and corrective maintenance.Figure 3 shows an economic analysis of maintenance to determine the optimal maintenance interval for Boeing commercial airplanes by evaluating the total cost of scheduled and unscheduled maintenance.This paper will assume maintenance will occur at the cost optimal quantity of cycles with no direct correlation to time.Given maintenance is correlated to equipment cycles, the cost of maintenance increases per unit of time as the number of cycles increase per that same unit of time.In addition to this maintenance cost, the paper will also assume labor and utilities is a linear addition to the work center cost.
Therefore as a work center production rate increases, so does the cost to run that work center.
Work center cost constitutes half the profit equation whereas the other half comprises of the makespan cost.The components of makespan cost are more indirect than the components of work center cost.The carrying cost of inventory and stock out cost significantly impact the cost of makespan.Some of the components of carrying cost of inventory include taxes, insurance, depreciation, and inventory cost.The cost of inventory is money that is tied up in unfinished product which cannot be used to invest elsewhere until the product is sold (known as cost of capital or the opportunity cost of the money).Therefore, reducing the amount of unfinished product by reducing makespan duration will liquidate inventory assets and allow cash to be invested in something else, such as mutual funds, treasuries, or even money market accounts.
Reducing the amount of unfinished product by reducing makespan duration will also reduce taxes, insurance, and depreciation associated with work-in-progress inventory.
Shorter makespan durations also reduce the risk of long stock out durations because raw materials can be turned into finished product faster.The cost of long stock out durations is a risk based calculation and is correlated with the inventory level of finished goods.
In practice, the cost equations for work centers and for makespan may be a challenge to define and will likely vary between industries and between companies.
However for this paper, the cost equations for work centers and for makespan will be evaluated as quadratic and exponential.

Area of Optimization
Optimization is an attempt to select the best solution out of a collection of solutions, generally bounded by constraints.One area of optimization is schedule optimization which is an area of operations research that can be used widely among commercial industry.Almost every company has to do some form of scheduling in one way or another.Not every scheduling operation necessarily warrants formulating the problem and solving it using an optimization algorithm but when the problem becomes complex and having a sub-optimal solution may significantly impact cost or speed, then it may be appropriate to leverage schedule optimization.

P VS. N
The types of optimization problems are commonly categorized between P and NP.P is any type of problem that can be solved in polynomial time and NP is any type of problem that can be solved by a non-deterministic Turing machine in polynomial time (Garey and Johnson 1979).

Mixed Integer Program Formulation
A formulation is presented in the next subsections for the problem of schedule optimization with flexible durations.The minimum degree of complexity of this formulation is quadratic as a consequence of the product of the inputs parameters and decision variables.This is one of many ways to formulate this problem and depending on how the problem is formulated it may impact the appropriate optimization algorithm to use.For example, there may exist a formulation that replaces the input parameters start and end times with durations, such is the case for the GA approach discussed later in the paper.

Variables and Inputs
Sets and indices: j job index where j 1, 2, 3,…, J p work center in parallel index where p 1, 2, 3,…, P s work center in series index where s 1, 2, 3,…, S

Input parameters:
Maximum end time for all jobs.
, Cost function for the work center in series s.
Cost function for the makespan.

Decision variables:
, , Start time for job j performed in WC in parallel p and in series s.
, , End time for job j performed in WC in parallel p and in series s.

Objective function
The objective function is the equation that the optimization algorithm is going to attempt to maximize or in this case minimize by adjusting the variables.The following is the objective function of the formulation.

Constraints
The constraints establish bounds on the variables included in the objective function.The following are the constraints of the formulation.Similarly, constraint (f) ensures no job can end before time zero and no job can end after the maximum end time.The last constraint (g) ensures the end time for job cannot be later than the end time for job 1. Constraint (g) is enforced through constraint (d) when there is only one work center in parallel but is required when there are more than one work centers in parallel.

Optimization Techniques
There are a vast number of optimization techniques available, some being more appropriate for certain problems than others.Some of these techniques include simplex, combinatorial, iterative methods (e.g.quasi-newton, interior point, gradient descent, etc.), and heuristics (e.g.genetic, hill climbing, ant colony, etc.).Selecting an appropriate optimization technique to obtain a desired level of accuracy and robustness is very much dependent on the class of the problem.It's important to note that not every optimization technique will necessarily provide the optimal solution to a problem but rather an approximate solution relative to optimal.

Algorithm Selection
As mentioned previously, job-shop scheduling typically falls into the complete combinatorial optimization problem which is a category of problem that is challenging to find a method capable of providing the optimal solution.Therefore, it is appropriate to look for heuristic methods for finding a time schedule solution for the problem.In studies, genetic algorithms have been shown to be efficient and robust in comparison with other methods for solving these scheduling problems because of its stochastic nature (Chen, Ihlow and Lehmann 1999) (Biegel and Davern 1990).The author decided to leverage the genetic algorithm for the problem discussed in this paper and implementation of this algorithm is presented in the next subsection.

Algorithm Implementation
The first step for genetic algorithm is to randomly generate N number of time duration ( , , where , , = , , -, , ) vectors to make the population.The durations are for a particular job on a specific work center based on a permutation schedule.A permutation schedule is where the jobs are sequenced (i.e.processing order) the same way for all work centers.These duration vector elements (also known as chromosomes) are then sorted from smallest to largest (shown in Figure 5) and represent the duration for each job for every work center in series.Main genetic processes begin after chromosomes generation.The genetic process iteratively adjusts the work center durations in such a manner that it produces desired results (i.e.lower cost).Crossover (also known as homologous recombination) and mutation are two main processes in natural genetics.Meiosisrate is the size of the randomly selected subset of the main population used to perform crossover.

Meiosisrate is defined as:
| : Homologous recombination is the biological way for exchanging genetic material between parent chromosomes.The genetic diversity will increase by exchanging more genetic information.Figure 7 shows the crossover process in the algorithm for two parent chromosomes.Crossover occurs on two randomly selected chromosomes from chromosomes.There is a quantity of parent chromosomes.
Figure 7. Crossover process within GA.
Mutation is the second main genetic process and is performed on every offspring produced from crossover.In this process the algorithm will randomly select one element from the crossover offspring time duration vector and copy to a randomly selected mutation element within the same chromosome.This process imitates the mutation process of DNA.Mutation may improve the final solution by searching globally rather than diverging to a local optimum.Figure 8 shows the mutation process in the algorithm for one offspring chromosome.The mutated offspring and associated parent chromosomes are evaluated using their relative fitness function values.Mutated offspring with a lower fitness function value than either of the associated parent chromosomes will replace the parent chromosome with the largest fitness function value.This iterative process will continue until the program reaches the termination condition of a predefined number of iterations.Finally, the chromosome with the lowest fitness value (for a minimization problem) will be chosen as the solution for the problem.The optimization engine uses a different seed for the random number generator and thus the solution to the problem may vary between calculation executions.Increasing the number of iterations would increase the likelihood that different calculation instances would produce the same solution and more importantly it would also increase the likelihood of a better solution.The pseudocode of the GA algorithm discussed in this paper is outlined in the appendix.

System Design
A C# graphical user interface (GUI) application was developed to act as the conduit between user inputs and the optimization engine as well as a graphical means to display the results.Using the interface, the user can enter all of the variables of the problem including number of jobs, number of work centers in series, number of work centers in parallel, cost per work center, and cost for makespan.Figure 9 shows the interface for providing the problem inputs with example inputs prepopulated.The C# GUI collects the necessary information to formulate the problem and then sends this information to an embedded python GA script.The GA is then executed with the problem until the termination condition has been meet at which point it then displayed via the Gantt chart.The name of the GUI is called "scheduler."The front end is similar to Microsoft® Project in that time is expanded across the x-axis and resources (equipment) are listed along the y-axis.Events (also known as jobs) and dependencies between events can be added manually.Figure 10 shows what the scheduler looks like without any events added to the scheduler and Figure 11 shows a summary of the system process flow.

Additional Features
Schedules created with the scheduler can be saved as multiple different file formats including CSV, TXT, XLSX, and BMP.Models saved to CSV, TXT, and XLSX can also be loaded back into the scheduler.There is a zoom track-bar that allows the user to adjust the zoom of the Gantt chart approximately between 10% and 200% the default size.Tooltips can be enabled or disabled to allow the user to quickly view each event's name, associated equipment, start time, and duration.Lines showing the dependencies between events can also be enabled or disabled.Events can be dragged and dropped anywhere within the preconfigured workspace.Event durations can also be adjusted simply by dragging the ends of any event.The progress of the python GA script, as a percent completed, is displayed on a progress bar within the C# GUI while the python script is executing.
The scheduler also allows the user to "re-optimize" a previously evaluated problem.After a solution has been graphically displayed via the Gantt chart, the user has the ability to adjust and then lock any event duration (i.e.set an event duration constraint).Duration constraints can be applied to any number of events simultaneously.Re-optimization then evaluates the problem with the new event duration constraint(s) included.This new solution will likely have a higher cost than the original solution but this functionality is intended to provide a means to respond to instances where event delays occur.Figure 12 shows iterations of scheduler throughout a re-optimization example.Part "a" of Figure 12 shows the optimized solution for a problem with no event duration constraints.Part "b" shows the scheduler with a duration constraint of 4 time units manually applied to job 1 on work new re-optimized solution for the problem with this new event duration constraint included.The re-optimized solution adjusted some of the non-duration constrained events from part "b" to minimize cost.
Figure 12.Scheduler graphical display for re-optimization example.

Limitations
One limitation to the optimization engine is a maximum duration for any given operation must be provided.Another limitation of the GA is that it is designed to follow a permutation schedule.The last limitation of the GA is that it assumes there are an equal number of work centers in parallel for each work center in series.This assumption could be removed allowing the optimization engine to solve a problem with unequal number of work centers in parallel for each work center in series but this would require modification to both the GA and the GUI.
The limitations of the GUI include it cannot display more than 100 work centers in series, has a maximum makespan of 650 units of time, and time units must be natural numbers (i.e.cannot be decimal or negative).The optimization engine is capable of executing on multiple processers but is limited to single processing in order to integrate with the C# GUI.

Case Studies
There are five case studies discussed in this chapter.The first two are relatively simple case studies to evaluate the accuracy of the approach.The next three are more complex case studies to assess robustness and scalability.For each of the case studies, the following three methods will be evaluated.
 Graphical solution: 3D and contour plots using Wolfram Mathematica  IBM® CPLEX Optimizer: Mixed integer quadratic program (MIQP)  C# and Python: Genetic algorithm

Case Study 1
The first case study is a very simple case study with the intent to evaluate accuracy.There are eleven inputs to this particular problem (shown in The objective function (minimize total cost) for case study 1 is defined as:

Case Study 2
The second case study is again designed to be simple with the intent to evaluate the accuracy.This case study will also evaluate robustness because this problem involves exponential cost functions rather than the previously evaluated quadratic cost functions.There are again eleven inputs to this particular problem (shown in Figure 17 and Figure 18 show the 3D and contour plot graphical solutions (respectively) to case study 2. The graphical solutions indicates the minimum total cost at approximately , , 17 and , , 1.The performance of the three different methods (shown in Table 4) is the same for those that could be evaluated.A total cost solution of 15 was calculated for both the graphical and GA methods.CPLEX has the limitation that it "cannot solve problems where a decision variable is an argument to the exponential function" (IBM Corp.

Case Study 3
The third case study is designed to show robustness and scalability against a slightly larger problem than the first two case studies and with quadratic cost functions.There are eleven inputs to this particular problem (shown in Figure 21 is a graph of the cost and makespan calculated by the GA algorithm for each of the first 50 iteration.This graph shows rapid divergence to a solution with an approximate solution in as little as 17 iterations.Figure 22 shows the Gantt chart output from the scheduler when provided the inputs to case study 3.The performance of the three different methods is shown in Table 8 for those that could be evaluated.A total cost solution of 12 was calculated for the GA method.approximate solution to this larger size problem after 900 iterations.Figure 26 shows the output from the schedule for case study 5 after 250 iterations and Figure 27 shows the output from the scheduler for case study 5 after the full 1000 iterations.The makespan reduced from approximately 100 time units down to 42 between the first 250 iterations and the 1000 th iteration.The performance of the three different methods is shown in Table 10 for those that could be evaluated.A total cost solution of 3.9x10 14 was calculated for the GA method.

Method Iterations Total Cost Graphical
Greater than three dimensions.
IBM® CPLEX -MIQP CPLEX cannot solve problems where a decision variable is an argument to the exponential function (IBM Corp. 2010).C# and Python -GA 1000 3.9x10 14 Table 10.Case study 5 method performance comparison.

Figure 1 .
Figure 1.Graphical representation of the problem design.
user with a means to better understand a system by allowing the user to conduct experiments and analyze a system without having to deal with the complications inherent with many real world experiments.Simulation package design can range between being tailored for a specific process with specific equipment to having a generic purpose with generic equipment.The advantage to having the more specific simulation package is the developer can spend less time creating the framework for the simulation and more time with the details unique to the system.The disadvantage to having the more specific simulation package is that the user is typically limited to the constraints of the pre-established framework and thus can lose flexibility.In contrast, a generic simulation package generally allows the user more flexibility for development yet typically requires additional time to create the framework.Ideally, an off the shelf simulation package should provide the user adequate customizability to add, remove, or modify features of the simulation with minimal development effort.
Figure 2 shows the general correlation between equipment failure rate and equipment interval, including examples of preventative and corrective maintenance occurrences relative to equipment interval and equipment failure rate.

Figure 2 .
Figure 2. Correlation of maintenance and equipment usage cycles.

Figure 3 .
Figure 3. Economic analysis of Boeing commercial airplane maintenance.
All P problems are NP problems (P ∈ NP) but not all NP problems are P problems.It takes significantly more time to solve an NP type problem than it does to describe the problem so consequently large NP type problems are typically computationally expensive(Garey and Johnson 1979).There are sub classes for NP type problems including NP-hard, NP-complete, NP-easy, and NPequivalent.Job-shop schedule optimization typical falls into the NP-complete category(Garey and Johnson 1979) (Garey, Johnson and Sethi 1976) (Gonzalez and Sahni 1978) (Lenstra, Kan and Brucker 1977).Figure4is a Venn diagram showing the relationship between P, NP, and NP-complete.

Figure 4 .
Figure 4. Venn diagram showing the relationship between P, NP, and NP-complete.
ensures only one work center can be used per job per operation (work center in series).The duration of any operation must be greater than or equal to zero which is enforced through constraint (b).Constraint (c) ensures the end of an operation must finish before the start of the next work center in series.To ensure the end of one operation must finish before the start of the next operation at the same work center, constraint (d) was included in the formulation.Constraint (e) ensures no job can start before time zero and no job can start after the maximum end time.

Figure 5 .
Figure 5. GA chromosome of work center durations.

Figure 6
Figure 6 illustrates an example of three jobs performed by two work centers in

Figure 6 .
Figure 6.Graphical representation of an iteration within example problem.

Figure 9 .
Figure 9. C# GUI interface for providing optimization problem inputs.

Figure 10
Figure 10.C# GUI interface for displaying solution.

Figure 11 .
Figure 11.Process flow of the C# and python system.

Figure 13
Figure13and Figure14show the 3D and contour plot graphical solutions

Figure 13 .
Figure 13.3D plot presenting the graphical solution for case study 1.

Figure 14 .
Figure 14.Contour plot presenting the graphical solution for case study 1.

Figure 15
Figure 15 is a graph of the cost and makespan calculated by the GA algorithm for

Figure 15 .
Figure 15.Chart showing divergence to a solution for case study 1.

Figure 17 .
Figure 17.3D plot presenting the graphical solution for case study 2.

Figure 18 .
Figure 18.Contour plot presenting the graphical solution for case study 2.

Figure 19
Figure 19 is a graph of the cost and makespan calculated by the GA algorithm for

Figure 19 .
Figure 19.Chart showing divergence to a solution for case study 2.

Figure 21 .
Figure 21.Chart showing divergence to a solution for case study 3.

Figure 23 .
Figure 23.Chart showing divergence to a solution for case study 4.

Figure 25 .
Figure 25.Chart showing divergence to a solution for case study 5.

Table 1 )
including cost functions which are dependent upon the number of work centers (WC) in series.There will always be one makespan cost function and one cost function for every WC in series.The cost functions for this case study are quadratic.

Table 2 )
is relatively similar.Graphical and IBM® CPLEX had slightly more desirable total cost solutions of 6 relative to the GA solution of 7. The IBM® CPLEX solution required a permutation schedule formulation otherwise the problem would have been a polynomial of degree 3 and consequently unsolvable by CPLEX.

Table 2 .
Case study 1 method performance comparison.

Table 3 .
Case study 2 parameter inputs.The objective function (minimize total cost) for case study 2 is defined as: , ,

Table 4 .
Case study 2 method performance comparison.

Table 8 .
Case study 4 method performance comparison.