Skip to main content

Python Reference

Overview

The Open Manufacturing Model provides a general and comprehensive framework for modeling manufacturing operations.
Below is an overview of the main components and their relationships.

Python implementation

This section describes the core components of the Open Manufacturing Model together with a Python implementation. We deploy object-oriented programming where we implement the core components using Python classes.

tip

The Python implementation should be viewed as a reference implementation, not as a full Python library able to model, simulate, or control a manufacturing system. At least, not yet. We provide starting points for the attributes and methods of each Python class and provide examples on how to create instances of all classes, including their relationships with other classes.

To exemplify that this reference implementation is not a all-in-one solution yet, please see the following example. When calling the start_job method of the Job class, the only thing that changes are the attributes status and start_date. Nothing more and nothing less.

    # Create Job instance
job = Job(name="An example Job")

print(job.status) # 'idle'
print(job.start_date) # 'None'

# Start job
job.start_job()

print(job.status) # 'in_progress'
print(job.start_date) # 'datetime.now()'

Class Architecture

The following diagram shows the main classes and their inheritance relationships:

Classes

These classes form the core components of the Open Manufacturing Model.

Enumerations

These enumerations define the valid values for various attributes in the system.