vanoha / SAMPO

Open-source framework for adaptive manufacturing processes scheduling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo of SAMPO framework

Scheduler for Adaptive Manufacturing Processes Optimization

affiliation
package
license
Supported Python Versions
support
Framework Support
mirror
Gitlab Mirror

SAMPO is an open-source framework for adaptive manufacturing processes scheduling. This framework is distributed under the 3-Clause BSD license.

It provides toolbox for generating schedules of manufacturing process under the constraints imposed by the subject area. The core of SAMPO is based on the combination of meta-heuristic, genetic and multi-agent algorithms. Taking as input the task graph with tasks connections and resource constraints, as well as the optimization metric, the scheduler builds the optimal tasks sequence and resources assignment according to the given metric.

scheme of sampo structure

Installation

SAMPO package is available via PyPI:

$ pip install sampo

SAMPO Features

The following algorithms for projects sheduling are implemented:

  • Topological - heuristic algorithm based in toposort of WorkGraph
  • HEFT (heterogeneous earliest finish time) and HEFTBetween - heuristic algorithms based on critical path heuristic
  • Genetic - algorithm that uses heuristic algorithms for beginning population and modelling evolution process

Difference from existing implementations:

  • Module for generating graphs of production tasks with a given structure
  • Easy to use pipeline structure
  • Multi-agent modeling block, allowing you to effectively select a combination of planning algorithms for a particular project
  • Ability to handle complex projects with a large number of works (2-10 thousand)

How to Use

To use the API, follow these steps:

  1. Input data preparation

To use SAMPO for the schedule generation you need to prepare:

  • WorkGraph object with the works information representation, including volumes of the works and connections between them

  • list of Contractor objects with the information about available resources types and volumes.

    1.1. Loading WorkGraph from file

    wg = WorkGraph.load(...)

    1.2. Generating synthetic WorkGraph

    from sampo.generator import SimpleSynthetic
    
    # SimpleSynthetic object used for the simple work graph structure generation
    ss = SimpleSynthetic()
    
    # simple graph
    # should generate general (average) type of graph with 10 clusters from 100 to 200 vertices each
    wg = ss.work_graph(mode=SyntheticGraphType.General,
                       cluster_counts=10,
                       bottom_border=100,
                       top_border=200)
    
    # complex graph
    # should generate general (average) type of graph with 300 unique works, 100 resources and 2000 vertices
    wg = ss.advanced_work_graph(works_count_top_border=2000,
                                uniq_works=300,
                                uniq_resources=100)

    1.3. Contractors generation

    Manual Contractor list generation:

    contractors = [Contractor(id="OOO Berezka", workers=[Worker(id='0', kind='general', count=100)])]

  1. Scheduling process

    2.1. Scheduler constructing

    There are 4 classes of schedulers available in SAMPO:

    • HEFTScheduler
    • HEFTBetweenScheduler
    • TopologicalScheduler
    • GeneticScheduler

    Each of them has various hyper-parameters to fit. They should be passed when scheduler object created.

    from sampo.scheduler.heft import HEFTScheduler
    
    scheduler = HEFTScheduler()
    from sampo.scheduler.genetic import GeneticScheduler
    
    scheduler = GeneticScheduler(mutate_order=0.1,
                                 mutate_resources=0.3)

    2.2. Schedule generation

    schedule = scheduler.schedule(wg, contractors)
  2. Pipeline structure

When data was prepared and scheduler built, you should use scheduling pipeline to control the scheduling process:

from sampo.pipeline import SchedulingPipeline

schedule = SchedulingPipeline.create() \
      .wg(wg) \
      .contractors(contractors) \
      .schedule(HEFTScheduler()) \
      .finish()

Supported by

The study is supported by the Research Center Strong Artificial Intelligence in Industry of ITMO University as part of the plan of the center's program: Development and testing of an experimental prototype of a library of strong AI algorithms in terms of adaptive optimization of production processes based on intelligent technologies, multi-criteria evolutionary schemes and a multi-agent simulation environment.

About

Open-source framework for adaptive manufacturing processes scheduling

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 88.4%Language:C++ 11.2%Language:CMake 0.3%Language:C 0.1%Language:Batchfile 0.0%