Data Mining Lab Report
Data Mining Lab Report
Session 2020-2024
Group Members
Muneeb Ul Hassan 20-IE-02
Hasnat Ali Khalid 20-IE-20
Mustaneer Mehdi 20-IE-22
Jawad Ahmed Rana 20-IE-32
Raza Abbas Minhas 20-IE-46
Advisor
Engr. Muhammad Usman
1
Abstract
This study focuses on optimizing job scheduling in manufacturing systems using a Genetic
Algorithm (GA). The objective is to minimize the makespan, which represents the total time
taken to complete all jobs, while considering constraints such as machine availability, job
prerequisites, and lot sizes. The GA iteratively evolves a population of candidate schedules to
find the most efficient arrangement of jobs on machines. The study involves decoding
individuals into schedules, evaluating the makespan as the objective function, and visualizing
the best solution using a Gantt chart. Through Python implementation, the study demonstrates
significant reductions in makespan, indicating improved efficiency in job scheduling for
manufacturing systems.
2
Contents
Chapter 1....................................................................................................................................5
Introduction................................................................................................................................5
1.1 Introduction.................................................................................................................5
1.2 Scheduling in Manufacturing:..........................................................................................6
Chapter 2....................................................................................................................................7
Case Study..................................................................................................................................7
2.1 Problem Statement...........................................................................................................7
2.2 Objectives.........................................................................................................................7
2.3 Significance of Study.......................................................................................................7
2.4 Data Collection and Preprocessing..................................................................................8
2.5 Methodological Approach................................................................................................8
2.6 Implementation Details....................................................................................................8
2.7 Evaluation Metrics...........................................................................................................8
2.8 Discussion of Results.......................................................................................................8
2.9 Limitations and Challenges..............................................................................................8
2.10 Conclusion......................................................................................................................8
Chapter 3....................................................................................................................................9
Methodology..............................................................................................................................9
3.1 Introduction......................................................................................................................9
3.2 Data Collection.................................................................................................................9
3.3 Input Code......................................................................................................................10
3.4 Approach of Genetic Algorithm (GA)...........................................................................11
3.5 Preprocessing.................................................................................................................12
3.6 Implementation Details..................................................................................................12
3.7 Evaluation of Scheduling Solutions...............................................................................12
3.8 Sensitivity Analysis and Parameter Tuning...................................................................13
Chapter 4..................................................................................................................................14
Results and Discussion.............................................................................................................14
4.1 Introduction....................................................................................................................14
4.2 Analysis of Optimization Process..................................................................................14
4.3 Evaluation of Scheduling Solutions...............................................................................14
4.4 Discussion......................................................................................................................15
4.5 Limitations and Future Directions.................................................................................15
4.6 Conclusion......................................................................................................................16
3
Chapter 5..................................................................................................................................17
Conclusions..............................................................................................................................17
5.1 Summary of Findings.....................................................................................................17
5.2 Contributions to Knowledge..........................................................................................17
5.3 Implications for Practice................................................................................................17
5.4 Future Research Directions............................................................................................17
5.5 Conclusion......................................................................................................................18
4
Chapter 1
Introduction
1.1 Introduction
In modern manufacturing systems, efficient job scheduling plays a critical
role in maximizing productivity and minimizing costs. Job scheduling
involves assigning tasks to available resources, such as machines or
workers, while considering various constraints like processing times,
machine availability, and job dependencies. Traditional scheduling
methods often struggle to cope with the complexities of real-world
manufacturing environments, leading to suboptimal schedules and
inefficient resource utilization.
In contemporary manufacturing systems, the efficient allocation of
resources is crucial for meeting production targets, maintaining
competitiveness, and ensuring customer satisfaction. Job scheduling, a
fundamental aspect of production planning and control, involves assigning
tasks to available resources while adhering to various constraints and
objectives. The complexity of job scheduling arises from the dynamic
nature of manufacturing environments, which are characterized by:
Dynamic Workloads: Manufacturing systems often deal with fluctuating
demand, leading to varying workloads that necessitate flexible scheduling
strategies.
Resource Constraints: Limited availability of resources such as
machines, materials, and skilled labor poses significant challenges in
scheduling tasks to optimize utilization and minimize idle time.
Complex Dependencies: Certain tasks have dependencies on preceding
operations, equipment setup times, or specific sequences, requiring
careful coordination to avoid disruptions and delays.
Multi-objective Optimization: Job scheduling typically involves multiple
conflicting objectives, such as minimizing makespan, reducing setup
times, and balancing workload distribution, necessitating sophisticated
optimization techniques.
Traditional scheduling approaches, including rule-based heuristics and
mathematical programming models, often struggle to cope with the
complexity and uncertainty inherent in real-world manufacturing
environments. As a result, suboptimal schedules may lead to
inefficiencies, production delays, and increased costs.
To address these challenges, researchers and practitioners have turned to
advanced optimization techniques, such as Genetic Algorithms (GAs),
inspired by principles of natural selection and evolution. GAs offer a robust
and versatile approach to solving complex optimization problems by
5
mimicking the process of natural evolution, wherein candidate solutions
(individuals) undergo selection, crossover, mutation, and reproduction to
generate improved offspring over successive generations.
In the context of job scheduling optimization, GAs offer several
advantages:
Exploration of Solution Space: GAs explore a wide range of potential
solutions, enabling the discovery of diverse and innovative schedules that
may not be apparent through traditional methods.
Adaptability to Constraints: GAs can accommodate various constraints
and objectives, making them suitable for addressing the multifaceted
nature of job scheduling problems in manufacturing systems.
Parallelization and Scalability: GAs can be parallelized and scaled to
handle large-scale scheduling problems efficiently, leveraging advances in
computing technology.
By leveraging GAs and other evolutionary optimization techniques,
researchers aim to develop robust and adaptive scheduling algorithms
capable of generating high-quality schedules that optimize resource
utilization, minimize production lead times, and enhance overall
operational efficiency in manufacturing systems.
6
Minimizing Setup and Changeover Times: Efficient scheduling
involves reducing setup and changeover times between different
production runs, enabling quick transitions and flexible production.
Given the complexity of manufacturing environments and the multitude of
factors to consider, scheduling in manufacturing often poses a challenging
optimization problem. Traditional scheduling methods, such as rule-based
heuristics and mathematical programming models, may struggle to
effectively address the dynamic and uncertain nature of manufacturing
operations.
Chapter 2
Case Study
In this chapter, we present a case study focusing on the application of Genetic Algorithm
(GA) for job scheduling optimization in a manufacturing system. The case study provides a
practical illustration of how GAs can be employed to address complex scheduling challenges
and optimize production processes.
2.2 Objectives
The primary objective of this study is to optimize job scheduling in manufacturing systems
using a Genetic Algorithm (GA). Specifically, the study aims to:
Minimize the makespan, representing the total time taken to complete all jobs, by
efficiently allocating tasks to available resources.
Consider constraints such as machine availability, job prerequisites, and lot sizes to
generate feasible and optimized schedules.
Utilize the GA to iteratively evolve a population of candidate schedules, aiming to
find the most efficient arrangement of jobs on machines.
8
2.8 Discussion of Results
The results of the case study are presented and discussed, highlighting
the effectiveness of the GA in generating optimized schedules and
improving production efficiency. The discussion may include comparisons
with baseline scheduling methods, analysis of solution quality, sensitivity
to parameter settings, and implications for real-world manufacturing
operations.
2.10 Conclusion
The chapter concludes with a summary of key findings from the case
study, emphasizing the potential of GAs for job scheduling optimization in
manufacturing systems. The insights gained from the case study
contribute to the body of knowledge in scheduling theory and practices.
Chapter 3
Methodology
3.1 Introduction
This chapter outlines the methodology employed in the case study to optimize job scheduling
in a manufacturing system using a Genetic Algorithm (GA). The methodology encompasses
various stages, including data collection, preprocessing, implementation of the GA, and
evaluation of scheduling solutions.
9
In above data, there is lot size of 18 observations with first six have lot size of 1, next six
have lot size of 2 and remaining have lot size of 3. And in the next column there are operation
number and then in the next column there are number of machines assigned to each lot size
an and in 4th column there is an process time of every lot.
And the three lots have there size as lot size 1, 2 and 3 next in the separate columns.
10
3.3 Input Code
11
3.4 Approach of Genetic Algorithm (GA)
The Genetic Algorithm (GA) serves as the core optimization technique for job scheduling in
the manufacturing system. The GA operates iteratively, simulating the process of natural
selection to evolve a population of candidate schedules towards optimal or near-optimal
solutions. Key components of the GA include:
Representation: Scheduling solutions are encoded as individuals in a population, with each
individual representing a potential schedule of jobs on machines.
Fitness Evaluation: The fitness of each schedule is determined based on predefined
objectives, such as minimizing makespan, while considering constraints such as machine
availability and job dependencies.
Genetic Operators: Selection, crossover, mutation, and reproduction are employed to
manipulate the population and generate new schedules. These operators enable exploration of
the solution space and facilitate convergence towards better solutions.
3.5 Preprocessing
Preprocessing of input data involves cleaning, organizing, and transforming raw data into a
suitable format for input into the GA. In the context of job scheduling, preprocessing tasks
may include removing duplicates, handling missing values, sorting jobs based on priorities,
and adjusting parameters such as lot sizes and processing times. Additionally, preprocessing
techniques may be employed to encode constraints and objectives into the genetic
representation of scheduling solutions.
12
Genetic Representation: Encoding of scheduling solutions as lists of job indices,
representing the sequence of jobs to be performed on machines.
Genetic Operators: Selection, crossover, and mutation operators tailored to the scheduling
problem, facilitating the exploration of solution space and generation of diverse schedules.
Algorithm Parameters: Specification of parameters such as population size, crossover
probability, mutation rate, and termination criteria to control the behavior and convergence of
the GA.
The implementation details are realized through the Python code provided, which utilizes the
DEAP (Distributed Evolutionary Algorithms in Python) framework for implementing the GA
and solving the job scheduling optimization problem.
13
Parameter tuning involves adjusting algorithm parameters, such as population size, crossover
probability, and mutation rate, to optimize the performance of the GA. Techniques such as
grid search, random search, or heuristic approaches may be employed to systematically
explore the parameter space and identify configurations that yield better results.
Chapter 4
Results and Discussion
4.1 Introduction
This chapter presents the results obtained from the application of the Genetic Algorithm (GA)
to the problem of job scheduling in manufacturing. The discussion delves into the
performance of the GA-based optimization approach and analyzes the generated scheduling
solutions in terms of their efficiency, effectiveness, and adherence to predefined objectives.
14
4.3 Evaluation of Scheduling Solutions
The best individual solution generated by the GA is presented, along with the corresponding
scheduling details, including the assignment of lots to operations and machines, as well as the
start and finish times for each operation. The makespan of the best solution, which represents
the total time taken to complete all jobs in the schedule, is highlighted.
Additionally, a graphical representation of the optimization process is provided, depicting the
trend of the minimum and average makespan values across generations. This graphical
analysis offers insights into the convergence behavior of the GA and illustrates how the
makespan improves over successive generations.
15
4.4 Discussion
The results are discussed in the context of the objectives outlined in the study. The achieved
makespan value is compared against baseline makespan values or benchmarks, providing a
basis for assessing the effectiveness of the GA-based optimization approach.
Key factors influencing the performance of the GA, such as parameter settings, population
size, and convergence criteria, are analyzed. Insights are drawn regarding the impact of these
factors on solution quality and computational efficiency.
Furthermore, the scheduling solutions are evaluated with respect to their practical
applicability and feasibility in real-world manufacturing environments. Considerations such
as resource constraints, production priorities, and scheduling flexibility are addressed,
highlighting the relevance of the GA-generated schedules for optimizing manufacturing
operations.
4.6 Conclusion
In summary, the results and discussion chapter provides a comprehensive analysis of the GA-
based optimization approach for job scheduling in manufacturing. By presenting detailed
results, discussing key findings, and identifying avenues for future research, the chapter
contributes to a deeper understanding of scheduling optimization methods and their
applications in enhancing manufacturing operations.
16
Chapter 5
Conclusions
5.1 Summary of Findings
In this study, we investigated the application of Genetic Algorithm (GA) for optimizing job
scheduling in manufacturing operations. The research aimed to minimize the makespan,
which represents the total time required to complete all jobs, thereby enhancing the efficiency
and productivity of manufacturing processes. Through the implementation and evaluation of
the GA-based optimization approach, several key findings emerged:
The Genetic Algorithm demonstrated effectiveness in generating scheduling solutions that
significantly reduce the makespan compared to conventional methods.
The optimization process exhibited convergence behavior, with the makespan steadily
improving across successive generations of the GA.
The scheduling solutions produced by the GA were evaluated for their practical applicability
and feasibility in real-world manufacturing environments, demonstrating their potential to
enhance production efficiency and meet scheduling objectives.
17
Demonstrating the effectiveness of Genetic Algorithm as a viable approach for addressing
complex scheduling problems.
Providing insights into the performance and behavior of the GA-based optimization process,
including its convergence characteristics and solution quality.
Highlighting the practical implications of optimized scheduling solutions for improving
manufacturing operations, such as minimizing production lead times and maximizing
resource utilization.
5.5 Conclusion
In conclusion, this study underscores the potential of Genetic Algorithm as a powerful
optimization tool for addressing job scheduling challenges in manufacturing. By leveraging
the strengths of evolutionary computation, GA-based approaches offer practical solutions for
improving production efficiency, reducing lead times, and enhancing overall operational
performance. Moving forward, continued research and development efforts in this domain
hold promise for advancing scheduling optimization practices and driving innovation in
manufacturing processes.
18
19