Skip to main content

A Comprehensive Library for Fixed and Flexible Machine Scheduling Using Genetic Algorithms

Project description

GA Scheduler

Overview

GA Scheduler is a Python library for modeling, optimizing, and visualizing machine scheduling problems using genetic algorithms and multiobjective evolutionary optimization. It supports a broad range of scheduling environments, including single-machine, parallel-machine, flow shop, flexible flow shop / hybrid flow shop, job shop, flexible job shop, and alternative-machine routing problems. The library can optimize several performance criteria, including makespan, weighted tardiness, sequence-dependent setup time, sequence-dependent setup waste, total completion time, and number of late jobs. It also provides interactive Gantt chart visualizations to help users inspect, interpret, and communicate scheduling solutions.

Citation

Yigit F.; Basilio M.P; Pereira V. (2024). A Hybrid Approach for the Multi-Criteria-Based Optimization of Sequence-Dependent Setup-Based Flow Shop Scheduling. Mathematics. 12(13):2007. doi: https://doi.org/10.3390/math12132007

Features

  • Scheduling Machine Environments: Supports single-machine, parallel-machine, flow shop, flexible flow shop / hybrid flow shop, job shop, flexible job shop, and alternative-machine routing problems.
  • Many-Objective / Multi-Objective Optimization: Supports optimization for multiple objectives including makespan, weighted tardiness, sequence-dependent setup time, sequence-dependent setup waste, total completion time, and number of late jobs.
  • Genetic Algorithm Integration: Utilizes a Genetic Algorithm (GA) to efficiently explore the solution space and find optimal or near-optimal job sequences.
  • Brute Force Search: For small problem instances, brute force search can be used to find the optimal job sequence. It is intentionally disabled for flexible sequences because the search space combines operation-dispatch permutations and machine-choice combinations.
  • Customizability: Allows customization of job sequences, machine alternatives, setup times, setup waste, due dates, job weights, objective weights, and other scheduling parameters.
  • Sequence-Dependent Job Setup Times: Supports setup times between jobs through a setup_time_matrix, where the setup time depends on the previously processed job and the next job.
  • Sequence-Dependent Setup Waste: Supports setup waste between jobs through a setup_waste_matrix, allowing the model to penalize material loss, cleaning waste, scrap, or other changeover-related waste.
  • Machine-to-Machine Setup Times: Supports setup or transfer times between machines through a machine_setup_time_matrix. This is useful when moving a job from one machine to another requires transportation, preparation, tooling change, calibration, cleaning, or other machine-transition activities.
  • Machine Blocking Constraints: Supports machine blocking groups through machine_block_groups. Machines in the same blocking group cannot operate simultaneously. This is useful for modeling shared operators, shared tools, shared cranes, shared physical space, shared power sources, or other shared resources.
  • Machine Maintenance Constraints: Supports predefined machine maintenance requirements through machine_maintenance. Maintenance activities can be assigned to specific machines with an earliest start time, duration, and optional label.
  • Flexible Maintenance Scheduling: Maintenance does not need to start exactly at its earliest time. The scheduler can delay maintenance to the next feasible time if the machine is busy, as long as the maintenance requirement is respected.
  • Conditional Maintenance Visibility: If a maintenance activity is only required after a certain time and the final schedule finishes before that point, the maintenance may be omitted from the Gantt chart while still being reported in the maintenance summary.
  • Alternative Machine Routing: Each operation can have multiple possible machines with different processing times, allowing the GA to optimize both the job sequence and the machine choices.
  • Custom Sequence Evaluation: Allows the user to provide a custom job sequence instead of relying only on the GA-generated sequence. This is useful for testing, benchmarking, validating heuristics, or comparing human-designed schedules.
  • Objective Weighting: Allows the user to assign different weights to each objective, making it possible to emphasize makespan, tardiness, setup time, waste, completion time, or late jobs according to the decision-maker's priorities.
  • Pareto Front Generation: When enabled, the scheduler can return a set of non-dominated solutions instead of a single weighted solution, supporting trade-off analysis among conflicting objectives.
  • Visualization: Generates Gantt charts to visualize the scheduling of jobs, setup times, machine-to-machine setups, maintenance periods, and machine usage across the planning horizon.

Usage

  1. Install
pip install ga_scheduler
  1. Try it in Colab:

a) Multiobjective - Weighted

  • Parallel Machines Scheduling - Brute Force ( Colab Demo )
  • Parallel Machines Scheduling - Genetic Algorithm ( Colab Demo )
  • Flow Shop Machines Scheduling - Brute Force ( Colab Demo )
  • Flow Shop Machines Scheduling - Genetic Algorithm ( Colab Demo )
  • Job Shop Machines Scheduling - Brute Force ( Colab Demo )
  • Job Shop Machines Scheduling - Genetic Algorithm ( Colab Demo )

b) Multiobjective - Pareto Front

c) Flexible Sequences (GA = Enabled; NSGA3 = Enabled; Brute Force = Disabled)

d) Machine Setup Time, Machine Block Groups, Machine Maintenance

  • Machine Setup Time, Block Groups & Maintenance - ( Colab Demo )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ga_scheduler-2.8.4.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ga_scheduler-2.8.4-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file ga_scheduler-2.8.4.tar.gz.

File metadata

  • Download URL: ga_scheduler-2.8.4.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for ga_scheduler-2.8.4.tar.gz
Algorithm Hash digest
SHA256 5faa1241698085d0f060f8f530c84b537ab2466cef81fb965279b6a462852a08
MD5 ee07ccc5615a61dfe9a81225732d0095
BLAKE2b-256 c13bc83a9f8627d53e643000b416c68f1e3d18db4ff37da81356b8c72cc6390b

See more details on using hashes here.

File details

Details for the file ga_scheduler-2.8.4-py3-none-any.whl.

File metadata

  • Download URL: ga_scheduler-2.8.4-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for ga_scheduler-2.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 68e47cf77ac81fc832457dd5fdbd13f604f384e91f3c2870288fca6792a1a191
MD5 52898288f6f39bb13303238c974f0542
BLAKE2b-256 038f0d1f6f8ae76ead300e300b9afd41c56137453b725144e8bf09da18db902a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page