Skip to main content

Parser and Scheduler of Production Flow Description Language (PFDL) files.

Project description

Production Flow Description Language

pfdl_logo

Tests Lint Check Code Coverage Build and deploy Docu REUSE status

DISCLAIMER: This project is not intended for everyday use and made available without any support. However, we welcome any kind of feedback via the issue tracker or by e-mail.


The Production Flow Description Language (PFDL) is a domain specific language for the description of production orders in the manufacturing of the future. With the help of the PFDL customized products and their production steps can be described.

This project consists of the PFDL Grammar and Scheduler. The Scheduler is the main part of the language. It parses PFDL files and generates a Petri net for scheduling the production task if the given file is valid.

For more infos visit the official :books: Documentation.

Requirements

  • Pip packages from requirements.txt (pip install -r requirements.txt)
  • GraphViz (if you want to use the scheduler/run the scheduler_demo.py)

How to Start

Validation

If you just want to validate your PFDL files run the following command from the root directory of the project. All errors will be printed in the console, so if nothing is shown the file valid.

python validate_pfdl_file.py --file_path <path_to_pfdl_file>

You can also use the flag --folder_path to check all PFDL files within a folder.

Scheduler

To make use of the scheduler you can import the scheduler class and use it like in the scheduler_demo.py. We will provide a pip package for the scheduler module later so there is no need to run it anymore. If you want to run the scheduler from the command line, you can execute the scheduler_demo.py which is a small example program to demonstrate the use of the scheduler class. Run the following command from the root directory of the project.

python scheduler_demo.py <path_to_pfdl_file>

It will parse the given file and validates it. If the program is valid a petri net will be generated in the root directory.

Tests

We also provivde unit tests e.g. for the static semantic validaton methods. To run all the test files you can use a testing environment (e.g. Testing in VSCode) or just execute the following command in the projects root directory:

python -m unittest discover -v

Use the PFDL Scheduler as Submodule

If you want to use the PFDL Scheduler in your existing project you can use this project as a submodule. To run the Scheduler succesfully from your python code you have to add the pfdl_scheduler folder to the sys path somewhere before using (importing) it:

import sys
import os
import inspect

currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.insert(0, currentdir + "/pfdl_scheduler")

# you can use the PFDL Scheduler classes now
from pfdl_scheduler.scheduler import Scheduler

Troubleshooting

No PetriNet is generated / there is an error while generating the net

Check if you correctly installed GraphViz (On Windows you need to put the bin folder inside the GraphViz folder into the PATH environment variable. On Ubuntu it should be fine if you install GraphViz via apt-get)

License

PDFL is licensed under the MIT License. See LICENSE for details on the licensing terms.

Academic Attribution

If you use the PFDL for research, please include the following reference in any resulting publication.

@INPROCEEDINGS{PFDL_Detzner_2022,
  author={Detzner, Peter and Ebner, Andreas and Hörstrup, Maximilian and Kerner, Sören},
  booktitle={2022 22nd International Conference on Control, Automation and Systems (ICCAS)}, 
  title={PFDL: A Production Flow Description Language for an Order-Controlled Production}, 
  year={2022},
  volume={},
  number={},
  pages={1099-1106},
  doi={10.23919/ICCAS55662.2022.10003953}}

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

pfdl_scheduler-0.9.0.tar.gz (73.7 kB view details)

Uploaded Source

Built Distribution

pfdl_scheduler-0.9.0-py3-none-any.whl (99.4 kB view details)

Uploaded Python 3

File details

Details for the file pfdl_scheduler-0.9.0.tar.gz.

File metadata

  • Download URL: pfdl_scheduler-0.9.0.tar.gz
  • Upload date:
  • Size: 73.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for pfdl_scheduler-0.9.0.tar.gz
Algorithm Hash digest
SHA256 4e357f046b97213fd88bf2c3d9f966bfdab23b16b8b9e8a1343b21c74c7d0743
MD5 da4632de502cd97917a5cad073a1eca0
BLAKE2b-256 91610eb373d99e414c87b4bb9c958134f892467f1253658e964a19db468c0ea3

See more details on using hashes here.

File details

Details for the file pfdl_scheduler-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pfdl_scheduler-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbcfc341156daee58fd8ec6fda1d6c296cb7d423bb5d1c2fa7802d244ef94cb8
MD5 c5b7df5aa8db2a6e755c24d361f37601
BLAKE2b-256 a65de88bc8c79f01cd1cc0ba3686a0a3afe5f072e672856098d507d1ee41e4d6

See more details on using hashes here.

Supported by

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