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.
  • Continuous Processing and Setup Times: Processing times, setup times, due dates, machine setup times, and maintenance durations may be decimal values such as 2.1 or 2.05; exact continuous-time events are available through get_schedule_events().
  • 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.5.tar.gz (31.0 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.5-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ga_scheduler-2.8.5.tar.gz
Algorithm Hash digest
SHA256 32ec58a038eb4804a84d8afe8f004dd185fa1f52acbd7ef2e391a6574c890b9a
MD5 965c93568ae00779cc8b5c1d6264155d
BLAKE2b-256 fd5a339106e0c75700d1ee7f97f1c92e5f2aa85315a8420f25dd554ef769e345

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ga_scheduler-2.8.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e5a65a6d7aa5072d4b4ba3593c9d31dfc0ac4afc7427cd4298b724b6131c702e
MD5 6c8b3a03ef062af29ffa9abc14b0adff
BLAKE2b-256 a5f10cac749a948e2fa612078d8e8d90466697f0a3444b053be8fcd8bc9c1e59

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