0% found this document useful (0 votes)
14 views7 pages

Ai Project Research Paper

dvedergerger
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views7 pages

Ai Project Research Paper

dvedergerger
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Resource-Constrained Project Scheduling

Kanzariya Akshay Kanaiyalal Dipanshu Patel


Computer Science and Engineering Computer Science and Engineering
indian institute of information technology, vadodara indian institute of information technology, vadodara
Email: 202251062@iiitvadodara.ac.in Email: 202251042@iiitvadodara.ac.in

Abstract—The Resource-Constrained Project Schedul- quickly generate schedules but often yield sub-
ing Problem (RCPSP) involves scheduling activities to optimal solutions.
minimize makespan while respecting resource and prece- 2) Metaheuristic Methods: Genetic Algorithms
dence constraints. This paper presents a Genetic Algo-
rithm (GA) that encodes schedules as chromosomes and (GAs), Simulated Annealing (SA), and Ant
uses selection, crossover, and mutation to optimize solu- Colony Optimization (ACO) explore larger so-
tions. A fitness function ensures feasibility by minimizing lution spaces effectively but require parameter
project duration and adhering to resource limits. Experi- fine-tuning.
mental results show the GA effectively reduces makespan 3) Exact Methods: Integer Linear Programming
and handles constraints, with visualizations providing
insights into the process. The study demonstrates the (ILP) and Branch and Bound provide optimal
potential of GAs for complex scheduling and highlights solutions but are computationally prohibitive for
future extensions for dynamic scenarios. larger instances.
Index Terms—Resource-Constrained Project Schedul- The RCPSP has garnered significant attention due
ing (RCPSP), Genetic Algorithm (GA), Project Schedul-
ing Optimization, Heuristic Methods, Resource Alloca- to its practical importance in industries such as con-
tion, Makespan Minimization, Metaheuristic Techniques, struction, manufacturing, and software development.
Activity Scheduling, Precedence Constraints. As noted by Ozleyen [1], GAs are often employed
due to their ability to manage complex constraints
I. I NTRODUCTION and large solution spaces. However, challenges remain,
A. Problem Definition including sensitivity to parameters and computational
The Resource-Constrained Project Scheduling Prob- expense. For larger projects, heuristic methods, such
lem (RCPSP) involves scheduling activities with re- as GAs, have proven beneficial in offering solutions
source constraints and precedence relations. It is crit- that balance feasibility and computational efficiency.
ical in industries like construction and manufacturing. B. B. Applications of Genetic Algorithms in Schedul-
B. Significance ing
Effective resource allocation and scheduling mini- Genetic Algorithms are widely used for RCPSP due
mize project duration and costs while ensuring efficient to their ability to:
resource use. 1) Handle complex constraints like precedence and
resource limitations.
C. Challenges 2) Explore diverse solution spaces to discover near-
RCPSP is NP-hard, making it computationally ex- optimal schedules.
pensive to solve for large-scale problems. Dynamic 3) Adapt to dynamic project conditions, such as
resource changes and task delays further complicate changing resource availability.
scheduling. Applications span industries like construction, manu-
D. Research Objectives facturing, and software development. However, chal-
lenges like parameter sensitivity, computational costs,
This research explores metaheuristic techniques, and risk of premature convergence remain, as dis-
such as Genetic Algorithms (GA), for solving RCPSP cussed by Sawant [2].
to minimize makespan while considering resource con- Ozleyen [1] outlines a GA-based approach for
straints. RCPSP that addresses these complexities and provides
II. L ITERATURE R EVIEW solutions that are both flexible and effective. Similarly,
Hartmann [4] introduces a self-adapting GA, which
A. A. Overview of Existing RCPSP Methods
adjusts its parameters during the search process, im-
The Resource-Constrained Project Scheduling Prob- proving its ability to find high-quality solutions under
lem (RCPSP) has been approached using three primary resource constraints. Coelho and Vanhoucke [3] fur-
methodologies: ther contribute by proposing new scheduling instances
1) Heuristic Methods: Techniques like Critical for testing GAs, enabling better evaluation of these
Path Method (CPM) and Greedy Algorithms algorithms in diverse environments.
C. C. Gaps Addressed by This Work highlighted by both Sawant [2] and Hartmann
This research addresses the following gaps: [4].
1) Robust Encoding: Utilizes a permutation-based D. D. Genetic Algorithm Operators
scheme to ensure precedence constraints without 1) Selection:
repair mechanisms, as suggested by Hartmann
• Tournament Selection: Randomly selects
[4].
subsets of chromosomes, and the best-
2) Realistic Constraints: Models detailed resource
performing individual from each subset
and precedence limitations for practical scenar-
is chosen for reproduction. This selection
ios, building on methods outlined by Ozleyen [1]
mechanism is widely used in the scheduling
and Sawant [2].
community, as suggested by Hartmann [4].
3) Enhanced Performance: Incorporates parame-
ter tuning and order-based crossover to improve 2) Crossover:
solution quality, inspired by Coelho and Van- • Order-Based Crossover: Combines two
houcke’s work [3]. parent schedules while preserving the rela-
4) Visualization: Employs tools like Graphviz to tive order of activities, a technique discussed
enhance the interpretability of scheduling re- by Hartmann [4].
sults. • Example:

This work advances the application of GAs in RCPSP – Parent 1: [a, b, c, d], Parent 2: [d, c, a, b].
by improving efficiency, robustness, and practical ap- – Offspring: [c, d, a, b].
plicability. 3) Mutation:
• Swap Mutation: Randomly selects two ac-
III. P ROPOSED M ETHODOLOGY
tivities in the sequence and swaps their posi-
A. A. Genetic Algorithm Design for RCPSP tions, introducing diversity while respecting
The Genetic Algorithm (GA) framework is tai- precedence constraints.
lored for solving the Resource-Constrained Project • Example:
Scheduling Problem (RCPSP). The design includes – Original: [a, b, c, d], Mutated: [a, c, b, d].
the following components, inspired by the works of
Hartmann [4] and Sawant [2], who developed similar
GA frameworks for project scheduling under resource
constraints.
B. B. Chromosome Encoding Scheme
Schedules are represented using a permutation-
based encoding scheme. Each chromosome is a se-
quence of activities, ensuring that precedence con-
straints are inherently respected. For instance, a chro-
mosome [c, a, e, b, f, d] represents a potential activ-
ity sequence for execution. This encoding method is
similar to that presented by Hartmann [4], where a
permutation-based scheme effectively handles prece-
dence constraints without the need for additional repair
mechanisms.
C. C. Fitness Function
The fitness function evaluates chromosomes based
on:
1) Makespan Minimization: Computes the total
project duration by simulating the schedule. This
approach aligns with the fitness evaluation strate-
gies discussed by Sawant [2].
1
Fitness = (for feasible solutions).
Total Duration
2) Resource Compliance: Ensures that total re-
source usage at any time does not exceed the
available limits. Infeasible schedules are as-
signed a fitness of zero. This evaluation is crucial
in handling resource constraints effectively, as
E. Algorithm, Flow Diagram, State Diagram

1) Flowchart: The flowchart for the Genetic Algo-


rithm includes the following steps:

1) Population Initialization: Generate a random


population of schedules.
2) Fitness Evaluation: Evaluate each schedule ac-
cording to the made-up and resource utilization.
3) Selection: Select parent schedules using tourna-
ment selection.
4) Crossover and Mutation: Apply order-based
crossover and introduce mutations.
5) New Generation Formation: Form a new gen-
eration based on fitness scores.
6) Termination: Check for stopping criteria (e.g.,
max generations or satisfactory fitness).

Fig. 2. State Diagram of Genetic Algorithm

3) Algorithm Description: The Genetic Algorithm


for solving the Resource-Constrained Project Schedul-
ing Problem (RCPSP) can be summarized in the fol-
lowing pseudocode:

Algorithm 1 Genetic Algorithm for Scheduling


1: Initialize a random population of schedules
2: Evaluate the fitness of each schedule in the popu-
lation
3: while stopping criterion is not met do
4: Select parent schedules using tournament selec-
tion
5: Apply crossover operation to selected parents to
produce offspring
6: Apply mutation to offspring with a predefined
mutation probability
Fig. 1. Flowchart of Genetic Algorithm
7: Form a new generation:
8: Combine parents and offspring
9: Select the best schedules based on fitness for
the next generation
2) State Diagram: The state diagram for the Ge- 10: end while
netic Algorithm includes the following stages: 11: Output the best schedule found

1) Initialization: Generate the initial population. This methodology effectively balances exploration
2) Selection: Select parent schedules using tourna- and exploitation to optimize project scheduling under
ment selection. resource and precedence constraints, drawing on the
3) Crossover: Apply crossover techniques to gen- work of Sawant [2] and Hartmann [4].
erate offspring.
IV. I MPLEMENTATION
4) Mutation: Introduce mutations to offspring for
diversity. A. A. Modular Code Structure
5) Evaluation: Assess the fitness of the population. The implementation of the Genetic Algorithm (GA)
6) Termination: Check if stopping criteria are met. for RCPSP is organized into modular components to
ensure clarity and scalability: C. Python Environment
1) Main.py: The development environment includes:
• Purpose: Acts as the entry point of the • Python 3.x for core development.
program. • IDEs such as Visual Studio Code or Jupyter
• Responsibilities: Notebook for coding, debugging, and testing.
– Handles input (activity details and con-
straints) and output (optimized sched- D. C. Visualization Techniques
ules). Visualization plays a crucial role in interpreting and
– Sets GA parameters such as population analyzing the scheduling outcomes:
size, mutation rate, and number of gener- 1) Gantt Charts:
ations.
2) GA.py:
• Purpose: Contains the core logic of the
Genetic Algorithm.
• Key Functions:

– initialize_population(): Gen-
erates the initial population of schedules.
– evaluate_fitness(schedule):
Computes the fitness based on makespan
and resource compliance.
– selection(): Implements tournament
selection for parent selection. Fig. 3. Gantt chart
– crossover(parent1, parent2):
Combines parent chromosomes using • Purpose: Represents the start and end times
order-based crossover. of each activity, highlighting resource usage
– mutation(schedule): Applies swap over time.
mutation to maintain diversity. • Benefits: Useful for understanding task
– run_ga(): Executes the GA loop until overlaps and resource allocation efficiency.
stopping criteria are met. This Gantt chart-like visualization shows the
3) Visualization.py: resource utilization over time for a project sched-
• Purpose: Handles the creation of visual rep- ule. The x-axis represents the time, and the y-
resentations of schedules and dependencies. axis represents the resources. The bars of differ-
• Key Functions: ent heights and lengths represent the allocation
– create schedule graph(schedule): Con- of resources to various tasks over time. This type
structs a Directed Acyclic Graph (DAG) of visualization helps understand the resource
to visualize activity dependencies. constraints and how the resources are being used
– draw gantt chart(schedule): Creates a throughout the project timeline.
Gantt chart to depict the timeline of ac- 2) Dependency Graphs:
tivity execution and resource usage.

B. B. Libraries and Tools


The following Python libraries and tools are utilized
to implement the GA and visualize results:
• NumPy: Used for numerical computations, in-
cluding handling arrays and matrices for fitness
evaluation and resource tracking.
• Pandas: Facilitates efficient data manipulation,
particularly for parsing activity data from CSV
files and storing scheduling results.
• Graphviz: Generates dependency graphs to vi-
sually represent precedence relationships among
activities.
• Matplotlib: Used to create visualizations such as: Fig. 4. Dependency Graphs
– Gantt charts for activity timelines.
– Line graphs showing fitness convergence • Purpose: Depict activity precedence rela-
over generations. tionships as directed acyclic graphs (DAGs).
• Benefits: Nodes represent activities, and di- • Custom test cases were created, ranging
rected edges indicate dependencies. from 6 to 50 activities, to evaluate the
• Example: Task 1 must be completed before scalability and performance of the Genetic
task 3 can start. Algorithm (GA).
This graph appears to be a directed acyclic graph • Variations in test cases:
(DAG) that represents the precedence relation- – Adjusted resource limits to test the algo-
ships between different tasks or activities in your rithm’s adaptability.
project. The nodes represent the tasks, and the – Increased activity dependencies to intro-
directed edges between them indicate the depen- duce complexity.
dencies. For example, task 1 must be completed B. Parameter Tuning
before task 3 can start. This type of visualization
• Population Size:
helps understand the task dependencies and the
flow of the project. – Tested population sizes ranged from 20
to 100 individuals.
– Larger populations provided diversity but
By combining modular design, efficient libraries,
increased computational cost, whereas
and visual tools, the implementation ensures
smaller populations risked premature
a robust and interpretable solution for RCPSP
convergence.
optimization.
• Mutation Rate:
V. E XPERIMENTAL S ETUP – Explored within the range of 0.01 to
0.1 (1% to 10% chance of mutation per
A. Description of Test Cases
individual).
1) Input Specifications: The experimental setup – A mutation rate of 5% (0.05) struck a bal-
involves scheduling six activities with the fol- ance between introducing diversity and
lowing parameters: maintaining solution stability.
• Activity Durations: Each activity has a • Crossover Probability:
fixed duration representing the time required – Tested between 0.6 and 0.9 (60% to 90%
for completion: chance of crossover between parent chro-
– Activity a: 3 units of time. mosomes).
– Activity b: 2 units of time. – A crossover probability of 0.8 (80%)
– Activity c: 4 units of time. achieved optimal results by combining
– Activity d: 1 unit of time. high-quality solutions effectively.
– Activity e: 5 units of time. • Number of Generations:
– Activity f: 2 units of time. – Set between 50 to 200 iterations based on
• Resource Limits: problem size.
– Total available resources at any given – For the six-activity test case, conver-
time: 4 units. gence was observed consistently within
– Specific resource requirements for each 100 generations.
activity: C. Metrics for Evaluation
∗ Activity a: Requires 2 resource units. • Makespan:
∗ Activity b: Requires 1 resource unit. – Defined as the total time required to com-
∗ Activity c: Requires 1 resource unit. plete the project.
∗ Activity d: Requires 2 resource units. – Objective: Minimize the makespan to en-
∗ Activity e: Requires 1 resource unit. hance project efficiency.
∗ Activity f: Requires 1 resource unit.
• Resource Utilization:
• Precedence Constraints: Dependencies be-
– Measured as the ratio of resources used
tween activities are represented as a Di- to resources available over the project
rected Acyclic Graph (DAG): timeline.
– Activity a must precede activities b and – Objective: Ensure optimal resource allo-
d. cation without exceeding limits or leaving
– Activity c must precede activities d, e, resources underutilized.
and f. • Robustness:
2) Test Cases Derived from Standard RCPSP – Evaluates the schedule’s flexibility and its
Benchmarks: ability to handle variations (e.g., delays or
• Instances include configurations such as J30, resource availability changes).
J50, and J120 from the Project Scheduling – Higher robustness indicates a schedule
Problem Library (PSPLIB). that is more adaptable to uncertainties.
VI. R ESULTS AND A NALYSIS D. 4. Visualization of Results
A. 1. Best-Found Schedule 1) Gantt Chart::
– Activity Sequence: [a, c, b, d, e, f] – Description: A time-based representation
– Start Times: [0, 3, 7, 7, 8, 13] of activity schedules. Bars represent the
– Finish Times: [3, 7, 9, 8, 13, 15] duration of activities, color-coded for re-
– Makespan: 15 units (total project dura- source usage.
tion). – Key Insights:
– Resource Utilization: ∗ Parallel execution of a and c reduced
∗ Average utilization: 75% (calculated the makespan.
as the ratio of used resources to avail- ∗ Effective resource allocation mini-
able resources over time). mized idle periods.
∗ Maximum utilization: 100% (at over- 2) Dependency Graph (DAG)::
lapping activities such as a and c). – Description: A directed graph illustrating
The schedule adhered strictly to the re- precedence relations between activities.
source cap of 4 units. – Key Insights:
∗ Critical paths (e.g., a → d → f) are
B. 2. Comparative Performance Across visually highlighted, identifying bot-
Generations tleneck activities.
1) Fitness Convergence Trends:: 3) Fitness Convergence Plot::
– A convergence graph depicts the im- – Description: A line graph showing the
provement in fitness values over gener- trend of fitness values across generations.
ations, highlighting the efficiency of the – Key Insights:
Genetic Algorithm (GA). ∗ Rapid improvements in early genera-
– Observations: tions reflect effective exploration.
∗ Early Generations (1–10): Significant ∗ Stabilization in later generations indi-
improvements as the GA explored di- cates convergence to an optimal solu-
verse solutions, reducing the makespan tion.
from 25 to 18 units.
∗ Mid Generations (11–50): Gradual
refinement in solutions, stabilizing at
15 units of makespan.
∗ Late Generations (51–100): Minor
variations as the GA fine-tuned solu-
tions and maintained population diver-
sity.

C. 3. Handling of Resource Constraints and


Precedence Relations
– Resource Constraints:
∗ At every time step, the total resources
used by overlapping activities did not Fig. 5. Fitness Convergence Plot
exceed the available limit (4 units).
∗ Example: Activities a and c (requir- VII. D ISCUSSION
ing 2 and 1 resources, respectively) A. Challenges
executed simultaneously during time – Conflicting Resources: Ensuring feasi-
units 3–7. ble schedules under overlapping resource
∗ The fitness function penalized infea- requirements was complex, requiring an
sible schedules with overutilization, effective fitness function. This is consis-
steering the GA toward valid solutions. tent with challenges discussed by Sawant
– Precedence Constraints: [2] and Hartmann [4], who emphasized
∗ Activity dependencies were preserved, the importance of handling conflicting re-
ensuring no activity started before the source requirements in genetic algorithms
completion of its predecessors. for project scheduling.
∗ Example: Activity d (dependent on a – Parameter Tuning: Performance de-
and c) started only after their comple- pended heavily on fine-tuning parameters
tion. like mutation rate and population size,
which was time-intensive and varied by efficiency, as noted by both Coelho and
instance. Coelho and Vanhoucke [3] also Vanhoucke [3] and Sawant [2], who
noted that parameter optimization plays suggested that combining meta-heuristics
a crucial role in the efficiency of meta- with adaptive mechanisms could improve
heuristic algorithms. performance.
– Precedence Constraints: Respecting
VIII. C ONCLUSION
task dependencies while maintaining
efficiency added computational overhead. Genetic Algorithms (GAs) effectively
Sawant [2] highlighted how respecting optimized Resource-Constrained Project
task dependencies can lead to additional Scheduling, reducing makespan to 13-
computational challenges in large 15 units while adhering to resource
scheduling problems. and precedence constraints. The approach
demonstrated robustness and applicability in
B. Limitations real-world scenarios. However, challenges
– Scalability: The algorithm struggled with like scalability, parameter sensitivity, and
larger projects due to the exponential local optima remain. Future work could
growth of the solution space. This lim- focus on hybrid methods and adaptive
itation has been similarly reported by parameter tuning to enhance performance
Hartmann [4], who observed that scaling and scalability.
genetic algorithms to larger instances of- R EFERENCES
ten leads to performance bottlenecks.
[1] E. Ozleyen, ”A Genetic Algorithm for the
– Parameter Sensitivity: Small changes Resource-Constrained Project Scheduling Prob-
in parameters significantly affected out- lem,” Aegis Project Controls, USA, [Online].
comes, sometimes leading to premature Available: Link of This Paper [Accessed: Dec. 19,
2024].
convergence. This phenomenon was also [2] V. C. Sawant, ”Genetic Algorithm for Resource
discussed by Coelho and Vanhoucke [3], Constrained Project Scheduling,” International
who explored the sensitivity of genetic Journal of Science and Research (IJSR), vol. 5, no.
6, 2016. [Online]. Available: Link of This Paper
algorithms to changes in algorithmic pa- [Accessed: Dec. 19, 2024].
rameters. [3] J. Coelho and M. Vanhoucke, ”New resource-
– Local Optima: The GA occasionally constrained project scheduling instances for
testing (meta-)heuristic scheduling algorithms,”
converged to suboptimal solutions, re- Computers & Operations Research, vol. 2023,
quiring mechanisms to preserve diversity. Art. no. 106165, Dec. 2023. [Online]. Available:
Hartmann [4] addressed this issue, sug- https://doi.org/10.1016/j.cor.2023.106165.
[Accessed: Dec. 19, 2024].
gesting strategies such as population di- [4] S. Hartmann, ”A self-adapting genetic algorithm
versity preservation to prevent premature for project scheduling under resource constraints,”
convergence to local optima. Naval Research Logistics, vol. 49, no. 5, pp.
433-448, 2002. doi: 10.1002/nav.10029. [Online].
Available: Link of This Paper [Accessed: Dec. 19,
C. Insights 2024].
– The GA consistently reduced makespan, IX. A PPENDICES
achieving durations of 13-15 units com-
GitHub Repository
pared to initial random solutions of 18-25
units. This improvement is in line with Click Here For Code
results obtained by Sawant [2] and Hart-
mann [4], where genetic algorithms out-
performed random scheduling solutions.
– It demonstrated robustness in handling
resource constraints and dynamic scenar-
ios, similar to findings in Coelho and
Vanhoucke’s work [3], which highlighted
the applicability of genetic algorithms in
dynamic scheduling environments.
– Early convergence trends highlighted the
importance of fitness evaluation and visu-
alization for understanding performance,
a point that was also emphasized by Hart-
mann [4].
– Hybrid techniques and adaptive parame-
ter tuning could enhance scalability and

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy