├── python ├── sphinx-apidoc ├── tests ├── __init__.py ├── testCases │ ├── run.log │ └── __init__.py ├── util │ ├── __init__.py │ ├── Timeout.py │ ├── Generator.py │ └── OwlGenerator.py ├── processes │ └── __init__.py ├── configFiles │ ├── __init__.py │ └── defaultTest │ │ ├── owl_config.ini │ │ ├── controller_config.ini │ │ └── logger_config_lvl3.ini ├── iniFiles │ └── process1 │ │ ├── owl.ini │ │ ├── controller.ini │ │ └── logger.ini └── TestMain.py ├── docs ├── build │ ├── .nojekyll │ ├── objects.inv │ ├── _images │ │ ├── UML.png │ │ ├── live_plot.PNG │ │ ├── example.pnml.PNG │ │ ├── OntologysimGraph.png │ │ ├── event_structure.png │ │ ├── repair_structure.png │ │ ├── line_plot_AE_machine.png │ │ ├── multiple_line_plot_FE_transporter.png │ │ └── scatter_plotAE_machine_m1__AE_machine_m0.png │ ├── _static │ │ ├── file.png │ │ ├── plus.png │ │ ├── minus.png │ │ ├── css │ │ │ └── fonts │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-normal.woff │ │ │ │ ├── lato-normal.woff2 │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ └── lato-normal-italic.woff2 │ │ ├── documentation_options.js │ │ └── js │ │ │ └── badge_only.js │ ├── .doctrees │ │ ├── index.doctree │ │ ├── environment.pickle │ │ ├── flask │ │ │ ├── flask.doctree │ │ │ ├── main │ │ │ │ └── Flask.doctree │ │ │ ├── starting.doctree │ │ │ └── actions │ │ │ │ ├── Flask.Actions.doctree │ │ │ │ ├── Flask.Actions.DataBase.doctree │ │ │ │ ├── Flask.Actions.Simulation.doctree │ │ │ │ ├── Flask.Actions.UtilMethods.doctree │ │ │ │ ├── Flask.Actions.CheckProduction.doctree │ │ │ │ └── Flask.Actions.CheckProductType.doctree │ │ ├── configs │ │ │ ├── pnml.doctree │ │ │ ├── ini_file.doctree │ │ │ ├── owl │ │ │ │ └── owl_config.doctree │ │ │ ├── plot │ │ │ │ └── plot_config.doctree │ │ │ ├── pnml │ │ │ │ ├── create_pnml.doctree │ │ │ │ └── structure_pnml.doctree │ │ │ ├── logger │ │ │ │ └── logger_config.doctree │ │ │ ├── controller │ │ │ │ └── controller_config.doctree │ │ │ └── production │ │ │ │ └── production_config.doctree │ │ ├── tutorial │ │ │ ├── installation.doctree │ │ │ ├── example_folder.doctree │ │ │ └── creating_a_simulation.doctree │ │ ├── documentation │ │ │ ├── upcoming.doctree │ │ │ └── documentation.doctree │ │ ├── production_simulation │ │ │ ├── logger.doctree │ │ │ ├── deep_dive.doctree │ │ │ ├── controller.doctree │ │ │ ├── simulation.doctree │ │ │ ├── test │ │ │ │ ├── tests.doctree │ │ │ │ ├── tests.processes.doctree │ │ │ │ └── tests.testCases.doctree │ │ │ ├── side_package.doctree │ │ │ ├── deep_dive │ │ │ │ ├── defect.doctree │ │ │ │ ├── event.doctree │ │ │ │ ├── logger.doctree │ │ │ │ ├── ontology.doctree │ │ │ │ ├── controller.doctree │ │ │ │ ├── simulation.doctree │ │ │ │ └── transporter.doctree │ │ │ ├── generator │ │ │ │ └── tests.util.doctree │ │ │ ├── ini │ │ │ │ └── ProductionSimulation.init.doctree │ │ │ ├── plot │ │ │ │ └── ProductionSimulation.plot.doctree │ │ │ ├── analyse │ │ │ │ └── ProductionSimulation.analyse.doctree │ │ │ ├── logger │ │ │ │ ├── ProductionSimulation.logger.plot.doctree │ │ │ │ ├── ProductionSimulation.logger.kpi_logger.doctree │ │ │ │ ├── ProductionSimulation.logger.event_logger.doctree │ │ │ │ └── ProductionSimulation.logger.depreciated_logger.doctree │ │ │ ├── utility │ │ │ │ └── ProductionSimulation.utilities.doctree │ │ │ ├── simulation │ │ │ │ ├── ProductionSimulation.sim.Event.doctree │ │ │ │ ├── ProductionSimulation.sim.Machine.doctree │ │ │ │ ├── ProductionSimulation.sim.Product.doctree │ │ │ │ ├── ProductionSimulation.sim.SimCore.doctree │ │ │ │ ├── ProductionSimulation.sim.OrderRelease.doctree │ │ │ │ ├── ProductionSimulation.sim.RepairService.doctree │ │ │ │ ├── ProductionSimulation.sim.Subelements.doctree │ │ │ │ └── ProductionSimulation.sim.Transporter.doctree │ │ │ └── controller │ │ │ │ ├── ProductionSimulation.controller.machine_controller.doctree │ │ │ │ ├── ProductionSimulation.controller.service_controller.doctree │ │ │ │ ├── ProductionSimulation.controller.transporter_controller.doctree │ │ │ │ └── ProductionSimulation.controller.order_release_controller.doctree │ │ └── visualisation │ │ │ └── visualisation.doctree │ ├── _sources │ │ ├── production_simulation │ │ │ ├── test │ │ │ │ ├── tests.rst.txt │ │ │ │ ├── tests.processes.rst.txt │ │ │ │ └── tests.testCases.rst.txt │ │ │ ├── simulation │ │ │ │ ├── ProductionSimulation.sim.Event.rst.txt │ │ │ │ ├── ProductionSimulation.sim.Machine.rst.txt │ │ │ │ ├── ProductionSimulation.sim.OrderRelease.rst.txt │ │ │ │ ├── ProductionSimulation.sim.Transporter.rst.txt │ │ │ │ ├── ProductionSimulation.sim.Product.rst.txt │ │ │ │ ├── ProductionSimulation.sim.Subelements.rst.txt │ │ │ │ ├── ProductionSimulation.sim.SimCore.rst.txt │ │ │ │ └── ProductionSimulation.sim.RepairService.rst.txt │ │ │ ├── analyse │ │ │ │ └── ProductionSimulation.analyse.rst.txt │ │ │ ├── plot │ │ │ │ └── ProductionSimulation.plot.rst.txt │ │ │ ├── logger │ │ │ │ ├── ProductionSimulation.logger.event_logger.rst.txt │ │ │ │ ├── ProductionSimulation.logger.plot.rst.txt │ │ │ │ └── ProductionSimulation.logger.depreciated_logger.rst.txt │ │ │ ├── controller │ │ │ │ ├── ProductionSimulation.controller.service_controller.rst.txt │ │ │ │ ├── ProductionSimulation.controller.order_release_controller.rst.txt │ │ │ │ └── ProductionSimulation.controller.machine_controller.rst.txt │ │ │ ├── logger.rst.txt │ │ │ ├── deep_dive │ │ │ │ ├── defect.md.txt │ │ │ │ └── transporter.md.txt │ │ │ ├── side_package.rst.txt │ │ │ ├── deep_dive.rst.txt │ │ │ ├── controller.rst.txt │ │ │ ├── generator │ │ │ │ └── tests.util.rst.txt │ │ │ ├── ini │ │ │ │ └── ProductionSimulation.init.rst.txt │ │ │ ├── utility │ │ │ │ └── ProductionSimulation.utilities.rst.txt │ │ │ └── simulation.rst.txt │ │ ├── visualisation │ │ │ └── visualisation.rst.txt │ │ ├── documentation │ │ │ ├── upcoming.rst.txt │ │ │ └── documentation.rst.txt │ │ ├── flask │ │ │ ├── actions │ │ │ │ ├── Flask.Actions.CheckProductType.rst.txt │ │ │ │ ├── Flask.Actions.CheckProduction.rst.txt │ │ │ │ ├── Flask.Actions.UtilMethods.rst.txt │ │ │ │ ├── Flask.Actions.DataBase.rst.txt │ │ │ │ └── Flask.Actions.rst.txt │ │ │ ├── main │ │ │ │ └── Flask.rst.txt │ │ │ └── starting.md.txt │ │ ├── configs │ │ │ ├── pnml.rst.txt │ │ │ ├── ini_file.rst.txt │ │ │ └── owl │ │ │ │ └── owl_config.rst.txt │ │ └── index.rst.txt │ └── .buildinfo ├── source │ ├── configs │ │ ├── logger │ │ │ └── live_plot.PNG │ │ ├── pnml │ │ │ └── example.pnml.PNG │ │ ├── plot │ │ │ ├── line_plot_AE_machine.png │ │ │ ├── multiple_line_plot_FE_transporter.png │ │ │ └── scatter_plotAE_machine_m1__AE_machine_m0.png │ │ ├── pnml.rst │ │ ├── ini_file.rst │ │ └── owl │ │ │ └── owl_config.rst │ ├── production_simulation │ │ ├── deep_dive │ │ │ ├── UML.png │ │ │ ├── OntologysimGraph.png │ │ │ ├── event_structure.png │ │ │ ├── repair_structure.png │ │ │ ├── defect.md │ │ │ └── transporter.md │ │ ├── test │ │ │ ├── tests.rst │ │ │ ├── tests.processes.rst │ │ │ └── tests.testCases.rst │ │ ├── simulation │ │ │ ├── ProductionSimulation.sim.Event.rst │ │ │ ├── ProductionSimulation.sim.Machine.rst │ │ │ ├── ProductionSimulation.sim.OrderRelease.rst │ │ │ ├── ProductionSimulation.sim.Transporter.rst │ │ │ ├── ProductionSimulation.sim.Product.rst │ │ │ ├── ProductionSimulation.sim.Subelements.rst │ │ │ ├── ProductionSimulation.sim.SimCore.rst │ │ │ └── ProductionSimulation.sim.RepairService.rst │ │ ├── analyse │ │ │ └── ProductionSimulation.analyse.rst │ │ ├── plot │ │ │ └── ProductionSimulation.plot.rst │ │ ├── logger │ │ │ ├── ProductionSimulation.logger.event_logger.rst │ │ │ ├── ProductionSimulation.logger.plot.rst │ │ │ └── ProductionSimulation.logger.depreciated_logger.rst │ │ ├── controller │ │ │ ├── ProductionSimulation.controller.service_controller.rst │ │ │ ├── ProductionSimulation.controller.order_release_controller.rst │ │ │ └── ProductionSimulation.controller.machine_controller.rst │ │ ├── logger.rst │ │ ├── side_package.rst │ │ ├── deep_dive.rst │ │ ├── controller.rst │ │ ├── generator │ │ │ └── tests.util.rst │ │ ├── ini │ │ │ └── ProductionSimulation.init.rst │ │ ├── utility │ │ │ └── ProductionSimulation.utilities.rst │ │ └── simulation.rst │ ├── visualisation │ │ └── visualisation.rst │ ├── documentation │ │ ├── upcoming.rst │ │ └── documentation.rst │ ├── flask │ │ ├── actions │ │ │ ├── Flask.Actions.CheckProductType.rst │ │ │ ├── Flask.Actions.CheckProduction.rst │ │ │ ├── Flask.Actions.UtilMethods.rst │ │ │ ├── Flask.Actions.DataBase.rst │ │ │ └── Flask.Actions.rst │ │ ├── main │ │ │ └── Flask.rst │ │ └── starting.md │ └── index.rst ├── requirements.txt ├── Makefile └── make.bat ├── example ├── __init__.py ├── log │ └── __init__.py ├── owl │ └── __init__.py ├── config │ ├── __init__.py │ ├── owl_config.ini │ ├── for_docu │ │ ├── owl_config.ini │ │ ├── controller_config.ini │ │ ├── controller_config_extern.ini │ │ ├── logger_config_lvl3.ini │ │ └── logger_config_lvl2.ini │ ├── controller_config.ini │ ├── logger_config_lvl3.ini │ ├── logger_config_lvl2.ini │ ├── archive │ │ ├── product_merge.pnml │ │ ├── product_merge1.pnml │ │ ├── product_merge2.pnml │ │ ├── product_0.pnml │ │ ├── product_1.pnml │ │ ├── matrix_print_config.ini │ │ ├── product_10.pnml │ │ ├── product_11.pnml │ │ ├── product_12.pnml │ │ ├── product_13.pnml │ │ ├── product_14.pnml │ │ ├── product_15.pnml │ │ ├── product_2.pnml │ │ ├── product_3.pnml │ │ ├── product_4.pnml │ │ ├── product_5.pnml │ │ ├── product_6.pnml │ │ ├── product_7.pnml │ │ ├── product_8.pnml │ │ └── product_9.pnml │ └── plot_log.ini ├── controller │ ├── __init__.py │ └── MachineController_FIFO2.py ├── create_pnml │ ├── __init__.py │ └── MainPetriNet.py ├── analyse │ └── time_analyse.csv ├── MainPlot.py ├── before_process_change │ ├── product_0.pnml │ └── product_1.pnml └── Main.py ├── ontologysim ├── __init__.py ├── Flask │ ├── __init__.py │ ├── Actions │ │ ├── __init__.py │ │ ├── DataBase │ │ │ ├── __init__.py │ │ │ ├── ConnectDataBaseAction.py │ │ │ └── GetSimulationRunAction.py │ │ ├── Simulation │ │ │ ├── __init__.py │ │ │ ├── OwlDonwloadAction.py │ │ │ └── SimulationLoadAction.py │ │ ├── CheckProduction │ │ │ └── __init__.py │ │ ├── UtilMethods │ │ │ └── __init__.py │ │ ├── CheckProductType │ │ │ └── __init__.py │ │ ├── TestAction.py │ │ ├── ResetBEAction.py │ │ └── GetIdsAction.py │ ├── Assets │ │ ├── __init__.py │ │ ├── DefaultSaveFolder │ │ │ └── __init__.py │ │ └── DefaultFiles │ │ │ ├── owl_config.ini │ │ │ ├── controller_config.ini │ │ │ └── logger_config_lvl3.ini │ ├── instance │ │ ├── __init__.py │ │ └── config.py │ ├── static │ │ ├── Production │ │ │ ├── Task.json │ │ │ ├── Product.json │ │ │ ├── Position.json │ │ │ ├── ProductType.json │ │ │ ├── EndQueue.json │ │ │ ├── DeadlockQueue.json │ │ │ ├── MachineQueue.json │ │ │ ├── ProcessQueue.json │ │ │ ├── StartQueue.json │ │ │ ├── TransporterQueue.json │ │ │ ├── Transporter.json │ │ │ └── Machine.json │ │ ├── DataBase │ │ │ ├── simulationRunModel.json │ │ │ ├── connect.json │ │ │ └── simulationrun.json │ │ ├── Other │ │ │ ├── test.json │ │ │ └── reset_be.json │ │ └── Simulation │ │ │ ├── kpiListModel.json │ │ │ ├── kpiModel.json │ │ │ ├── eventModel.json │ │ │ ├── loadFiles.json │ │ │ ├── productionModel.json │ │ │ └── owlDownload.json │ └── FlaskMain.py └── ProductionSimulation │ ├── __init__.py │ ├── sim │ ├── __init__.py │ ├── ProductTypeNet │ │ └── __init__.py │ ├── RepairService │ │ └── __init__.py │ └── SubProduct.py │ ├── analyse │ └── __init__.py │ ├── database │ ├── __init__.py │ ├── models │ │ ├── __init__.py │ │ ├── Base.py │ │ ├── SimulationFacts.py │ │ ├── QueueKPI.py │ │ ├── TransporterLocation.py │ │ └── TransporterDistribution.py │ ├── data_seeder │ │ └── __init__.py │ └── defaultUser.json │ ├── init │ ├── API │ │ ├── __init__.py │ │ └── IntitializerProducttypeAPI.py │ ├── __init__.py │ └── defaultValue.ini │ ├── logger │ ├── __init__.py │ ├── plot │ │ ├── __init__.py │ │ └── y_lookup_tabel.ini │ ├── depreciated_logger │ │ └── __init__.py │ └── Enum_Logger.py │ ├── plot │ └── __init__.py │ ├── controller │ ├── __init__.py │ ├── machine_controller │ │ ├── __init__.py │ │ ├── MachineController_EDD.py │ │ └── MachineController_LIFO.py │ ├── service_controller │ │ └── __init__.py │ ├── transporter_controller │ │ ├── __init__.py │ │ └── TransporterController_Enum.py │ └── order_release_controller │ │ └── __init__.py │ └── utilities │ ├── __init__.py │ └── sub_class_utilities.py ├── .dockerignore ├── setup.cfg ├── project.toml ├── MANIFEST.in ├── docker-compose.yml ├── .gitignore ├── requirements.txt ├── .gitlab-ci.yml ├── .readthedocs.yml └── Dockerfile /python: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sphinx-apidoc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/build/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/log/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/owl/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/testCases/run.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/processes/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/testCases/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/controller/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/create_pnml/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/configFiles/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/Assets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/instance/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/DataBase/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/Simulation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/Task.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/sim/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/CheckProduction/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/UtilMethods/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/analyse/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/database/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/init/API/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/init/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/logger/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/plot/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/CheckProductType/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/Assets/DefaultSaveFolder/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/controller/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/logger/plot/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/utilities/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/Product.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/database/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/sim/ProductTypeNet/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/sim/RepairService/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/database/data_seeder/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/logger/depreciated_logger/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | venv 2 | doc 3 | docs 4 | .git 5 | .idea 6 | .gitignore 7 | dist -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/controller/machine_controller/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/controller/service_controller/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/controller/transporter_controller/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/controller/order_release_controller/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/build/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/objects.inv -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [mypy] 2 | strict = True 3 | 4 | [mypy-feedparser.*] 5 | ignore_missing_imports = True 6 | -------------------------------------------------------------------------------- /docs/build/_images/UML.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/UML.png -------------------------------------------------------------------------------- /docs/build/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/file.png -------------------------------------------------------------------------------- /docs/build/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/plus.png -------------------------------------------------------------------------------- /docs/build/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/minus.png -------------------------------------------------------------------------------- /docs/build/_images/live_plot.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/live_plot.PNG -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/database/defaultUser.json: -------------------------------------------------------------------------------- 1 | { 2 | "userName": "offline", 3 | "password": "default" 4 | } -------------------------------------------------------------------------------- /docs/build/.doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/index.doctree -------------------------------------------------------------------------------- /docs/build/_images/example.pnml.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/example.pnml.PNG -------------------------------------------------------------------------------- /tests/iniFiles/process1/owl.ini: -------------------------------------------------------------------------------- 1 | [OWL] 2 | java_path = C://Program Files/Java/jdk-15.0.1/bin/java.exe 3 | owl_save_path = [] 4 | 5 | -------------------------------------------------------------------------------- /docs/build/.doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/flask.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/flask.doctree -------------------------------------------------------------------------------- /docs/build/_images/OntologysimGraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/OntologysimGraph.png -------------------------------------------------------------------------------- /docs/build/_images/event_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/event_structure.png -------------------------------------------------------------------------------- /docs/build/_images/repair_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/repair_structure.png -------------------------------------------------------------------------------- /docs/source/configs/logger/live_plot.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/configs/logger/live_plot.PNG -------------------------------------------------------------------------------- /project.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ 3 | "setuptools>=42", 4 | "wheel" 5 | ] 6 | build-backend = "setuptools.build_meta" -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/pnml.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/pnml.doctree -------------------------------------------------------------------------------- /docs/source/configs/pnml/example.pnml.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/configs/pnml/example.pnml.PNG -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/ini_file.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/ini_file.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/main/Flask.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/main/Flask.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/starting.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/starting.doctree -------------------------------------------------------------------------------- /docs/build/_images/line_plot_AE_machine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/line_plot_AE_machine.png -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/build/.doctrees/tutorial/installation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/tutorial/installation.doctree -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/source/configs/plot/line_plot_AE_machine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/configs/plot/line_plot_AE_machine.png -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/database/models/Base.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy.ext.declarative import declarative_base 2 | 3 | Base = declarative_base() 4 | 5 | -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/owl/owl_config.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/owl/owl_config.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/documentation/upcoming.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/documentation/upcoming.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/tutorial/example_folder.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/tutorial/example_folder.doctree -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/source/production_simulation/deep_dive/UML.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/production_simulation/deep_dive/UML.png -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/plot/plot_config.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/plot/plot_config.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/pnml/create_pnml.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/pnml/create_pnml.doctree -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/logger/logger_config.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/logger/logger_config.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/pnml/structure_pnml.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/pnml/structure_pnml.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/documentation/documentation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/documentation/documentation.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/actions/Flask.Actions.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/actions/Flask.Actions.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/logger.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/logger.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/visualisation/visualisation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/visualisation/visualisation.doctree -------------------------------------------------------------------------------- /docs/build/_images/multiple_line_plot_FE_transporter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/multiple_line_plot_FE_transporter.png -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/deep_dive.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/deep_dive.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/tutorial/creating_a_simulation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/tutorial/creating_a_simulation.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/controller.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/controller.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/test/tests.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/test/tests.doctree -------------------------------------------------------------------------------- /docs/source/configs/plot/multiple_line_plot_FE_transporter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/configs/plot/multiple_line_plot_FE_transporter.png -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/controller/controller_config.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/controller/controller_config.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/configs/production/production_config.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/configs/production/production_config.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/actions/Flask.Actions.DataBase.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/actions/Flask.Actions.DataBase.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/side_package.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/side_package.doctree -------------------------------------------------------------------------------- /docs/build/_images/scatter_plotAE_machine_m1__AE_machine_m0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/_images/scatter_plotAE_machine_m1__AE_machine_m0.png -------------------------------------------------------------------------------- /docs/source/production_simulation/deep_dive/OntologysimGraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/production_simulation/deep_dive/OntologysimGraph.png -------------------------------------------------------------------------------- /docs/source/production_simulation/deep_dive/event_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/production_simulation/deep_dive/event_structure.png -------------------------------------------------------------------------------- /docs/source/production_simulation/deep_dive/repair_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/production_simulation/deep_dive/repair_structure.png -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/actions/Flask.Actions.Simulation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/actions/Flask.Actions.Simulation.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/deep_dive/defect.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/deep_dive/defect.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/deep_dive/event.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/deep_dive/event.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/deep_dive/logger.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/deep_dive/logger.doctree -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.cfg 2 | include *.ini 3 | include *.txt 4 | recursive-include docs * 5 | recursive-exclude docs *.pyc 6 | recursive-exclude docs/build * 7 | recursive-exclude docs/__pycache__ * -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/actions/Flask.Actions.UtilMethods.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/actions/Flask.Actions.UtilMethods.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/deep_dive/ontology.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/deep_dive/ontology.doctree -------------------------------------------------------------------------------- /docs/source/configs/plot/scatter_plotAE_machine_m1__AE_machine_m0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/source/configs/plot/scatter_plotAE_machine_m1__AE_machine_m0.png -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/actions/Flask.Actions.CheckProduction.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/actions/Flask.Actions.CheckProduction.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/deep_dive/controller.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/deep_dive/controller.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/deep_dive/simulation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/deep_dive/simulation.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/deep_dive/transporter.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/deep_dive/transporter.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/generator/tests.util.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/generator/tests.util.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/test/tests.processes.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/test/tests.processes.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/test/tests.testCases.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/test/tests.testCases.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/flask/actions/Flask.Actions.CheckProductType.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/flask/actions/Flask.Actions.CheckProductType.doctree -------------------------------------------------------------------------------- /docs/source/production_simulation/test/tests.rst: -------------------------------------------------------------------------------- 1 | 2 | TestMain 3 | --------------------- 4 | 5 | .. automodule:: tests.TestMain 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | -------------------------------------------------------------------------------- /example/analyse/time_analyse.csv: -------------------------------------------------------------------------------- 1 | get infos from onto ; extract events ; sort ; sort_products ; product create 2 | 0:00:00.329110 ; 0:00:00.229965 ; 0:00:00.062979 ; 0:00:00.983045 ; 0:00:01.992945 3 | -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/ini/ProductionSimulation.init.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/ini/ProductionSimulation.init.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/plot/ProductionSimulation.plot.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/plot/ProductionSimulation.plot.doctree -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/test/tests.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | TestMain 3 | --------------------- 4 | 5 | .. automodule:: tests.TestMain 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/analyse/ProductionSimulation.analyse.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/analyse/ProductionSimulation.analyse.doctree -------------------------------------------------------------------------------- /docs/source/production_simulation/test/tests.processes.rst: -------------------------------------------------------------------------------- 1 | MainProcess 2 | ---------------------------------- 3 | 4 | .. automodule:: tests.processes.MainProcess 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/logger/ProductionSimulation.logger.plot.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/logger/ProductionSimulation.logger.plot.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/utility/ProductionSimulation.utilities.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/utility/ProductionSimulation.utilities.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Event.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Event.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Machine.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Machine.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Product.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Product.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.SimCore.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.SimCore.doctree -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/test/tests.processes.rst.txt: -------------------------------------------------------------------------------- 1 | MainProcess 2 | ---------------------------------- 3 | 4 | .. automodule:: tests.processes.MainProcess 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/logger/ProductionSimulation.logger.kpi_logger.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/logger/ProductionSimulation.logger.kpi_logger.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/logger/ProductionSimulation.logger.event_logger.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/logger/ProductionSimulation.logger.event_logger.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.OrderRelease.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.OrderRelease.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.RepairService.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.RepairService.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Subelements.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Subelements.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Transporter.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/simulation/ProductionSimulation.sim.Transporter.doctree -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | ontologysim: 5 | container_name: onto_be 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | volumes: 10 | - '.:/app' 11 | ports: 12 | - "5000:5000" -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation/ProductionSimulation.sim.Event.rst: -------------------------------------------------------------------------------- 1 | Event 2 | ------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Event 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: -------------------------------------------------------------------------------- /docs/build/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 047ff5b80d7af5fb6080112aa03b0f72 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/logger/ProductionSimulation.logger.depreciated_logger.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/logger/ProductionSimulation.logger.depreciated_logger.doctree -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation/ProductionSimulation.sim.Event.rst.txt: -------------------------------------------------------------------------------- 1 | Event 2 | ------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Event 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation/ProductionSimulation.sim.Machine.rst: -------------------------------------------------------------------------------- 1 | Machine 2 | --------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Machine 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/controller/ProductionSimulation.controller.machine_controller.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/controller/ProductionSimulation.controller.machine_controller.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/controller/ProductionSimulation.controller.service_controller.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/controller/ProductionSimulation.controller.service_controller.doctree -------------------------------------------------------------------------------- /docs/source/visualisation/visualisation.rst: -------------------------------------------------------------------------------- 1 | Visualisation in React 2 | ========================= 3 | 4 | For the visualization of the simulation run there is an additional React package. 5 | 6 | This package can be viewed at: `gitlab `_ -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/controller/ProductionSimulation.controller.transporter_controller.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/controller/ProductionSimulation.controller.transporter_controller.doctree -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation/ProductionSimulation.sim.Machine.rst.txt: -------------------------------------------------------------------------------- 1 | Machine 2 | --------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Machine 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | -------------------------------------------------------------------------------- /docs/source/documentation/upcoming.rst: -------------------------------------------------------------------------------- 1 | Upcoming 2 | ======================== 3 | 4 | Collection of ideas, which we are currently working on 5 | 6 | Simulation 7 | ----------- 8 | - Merging and remanufacturing of parts 9 | - Due time for products 10 | - Randomizing incoming tasks -------------------------------------------------------------------------------- /docs/source/production_simulation/analyse/ProductionSimulation.analyse.rst: -------------------------------------------------------------------------------- 1 | 2 | Time Analyse 3 | ----------------------------------------------- 4 | 5 | .. automodule:: ontologysim.ProductionSimulation.analyse.TimeAnalyse 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/production_simulation/plot/ProductionSimulation.plot.rst: -------------------------------------------------------------------------------- 1 | 2 | 3 | Log plot 4 | ------------------------------------------ 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.plot.Log_plot 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation/ProductionSimulation.sim.OrderRelease.rst: -------------------------------------------------------------------------------- 1 | Order release 2 | -------------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.OrderRelease 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: -------------------------------------------------------------------------------- /docs/build/.doctrees/production_simulation/controller/ProductionSimulation.controller.order_release_controller.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsKiefer/ontologysim/HEAD/docs/build/.doctrees/production_simulation/controller/ProductionSimulation.controller.order_release_controller.doctree -------------------------------------------------------------------------------- /docs/build/_sources/visualisation/visualisation.rst.txt: -------------------------------------------------------------------------------- 1 | Visualisation in React 2 | ========================= 3 | 4 | For the visualization of the simulation run there is an additional React package. 5 | 6 | This package can be viewed at: `gitlab `_ -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation/ProductionSimulation.sim.Transporter.rst: -------------------------------------------------------------------------------- 1 | Transporter 2 | ------------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Transporter 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | -------------------------------------------------------------------------------- /docs/build/_sources/documentation/upcoming.rst.txt: -------------------------------------------------------------------------------- 1 | Upcoming 2 | ======================== 3 | 4 | Collection of ideas, which we are currently working on 5 | 6 | Simulation 7 | ----------- 8 | - Merging and remanufacturing of parts 9 | - Due time for products 10 | - Randomizing incoming tasks -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation/ProductionSimulation.sim.OrderRelease.rst.txt: -------------------------------------------------------------------------------- 1 | Order release 2 | -------------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.OrderRelease 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/flask/actions/Flask.Actions.CheckProductType.rst: -------------------------------------------------------------------------------- 1 | 2 | ProcessAction 3 | --------------------------------------------------- 4 | 5 | .. automodule:: ontologysim.Flask.Actions.CheckProductType.ProcessAction 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/analyse/ProductionSimulation.analyse.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | Time Analyse 3 | ----------------------------------------------- 4 | 5 | .. automodule:: ontologysim.ProductionSimulation.analyse.TimeAnalyse 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/plot/ProductionSimulation.plot.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Log plot 4 | ------------------------------------------ 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.plot.Log_plot 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation/ProductionSimulation.sim.Transporter.rst.txt: -------------------------------------------------------------------------------- 1 | Transporter 2 | ------------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Transporter 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | -------------------------------------------------------------------------------- /docs/build/_sources/flask/actions/Flask.Actions.CheckProductType.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | ProcessAction 3 | --------------------------------------------------- 4 | 5 | .. automodule:: ontologysim.Flask.Actions.CheckProductType.ProcessAction 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | -------------------------------------------------------------------------------- /docs/source/flask/actions/Flask.Actions.CheckProduction.rst: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProductionAction 4 | ----------------------------------------------------- 5 | 6 | .. automodule:: ontologysim.Flask.Actions.CheckProduction.ProductionAction 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | -------------------------------------------------------------------------------- /docs/source/production_simulation/logger/ProductionSimulation.logger.event_logger.rst: -------------------------------------------------------------------------------- 1 | 2 | 3 | Event Logger 4 | ---------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.logger.EventLogger 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/Position.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "blockedSpace", 5 | "product_name" 6 | ], 7 | "properties": { 8 | "current_size": { 9 | "type": "int" 10 | }, 11 | "positions": { 12 | "type": "string" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /docs/build/_sources/flask/actions/Flask.Actions.CheckProduction.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProductionAction 4 | ----------------------------------------------------- 5 | 6 | .. automodule:: ontologysim.Flask.Actions.CheckProduction.ProductionAction 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/logger/ProductionSimulation.logger.event_logger.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Event Logger 4 | ---------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.logger.EventLogger 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | -------------------------------------------------------------------------------- /docs/source/configs/pnml.rst: -------------------------------------------------------------------------------- 1 | PNML 2 | ============== 3 | 4 | .. note:: Depreciated 5 | 6 | Structure pnml 7 | --------------- 8 | 9 | .. toctree:: 10 | :maxdepth: 0 11 | 12 | pnml/structure_pnml 13 | 14 | create pnml 15 | ------------ 16 | 17 | .. toctree:: 18 | :maxdepth: 0 19 | 20 | pnml/create_pnml -------------------------------------------------------------------------------- /docs/build/_sources/configs/pnml.rst.txt: -------------------------------------------------------------------------------- 1 | PNML 2 | ============== 3 | 4 | .. note:: Depreciated 5 | 6 | Structure pnml 7 | --------------- 8 | 9 | .. toctree:: 10 | :maxdepth: 0 11 | 12 | pnml/structure_pnml 13 | 14 | create pnml 15 | ------------ 16 | 17 | .. toctree:: 18 | :maxdepth: 0 19 | 20 | pnml/create_pnml -------------------------------------------------------------------------------- /example/config/owl_config.ini: -------------------------------------------------------------------------------- 1 | [OWL] 2 | java_path="C:/Program Files/Java/jdk-15.0.1/bin/java.exe" 3 | owl_save_path=[{'type':"production_without_task_defect",'save':True,'path':"/example/owl/production_without_task_defect.owl"}, 4 | {'type':"production",'save':True,'path':"/example/owl/production.owl"} 5 | ] -------------------------------------------------------------------------------- /example/config/for_docu/owl_config.ini: -------------------------------------------------------------------------------- 1 | [OWL] 2 | java_path="C:/Program Files/Java/jdk-15.0.1/bin/java.exe" 3 | owl_save_path=[{'type':"production_without_task_defect",'save':True,'path':"/example/owl/production_without_task_defect.owl"}, 4 | {'type':"production",'save':True,'path':"/example/owl/production.owl"} 5 | ] -------------------------------------------------------------------------------- /tests/configFiles/defaultTest/owl_config.ini: -------------------------------------------------------------------------------- 1 | [OWL] 2 | java_path="C:/Program Files/Java/jdk-15.0.1/bin/java.exe" 3 | owl_save_path=[{'type':"production_without_task_defect",'save':False,'path':"/example/owl/production_without_task_defect.owl"}, 4 | {'type':"production",'save':False,'path':"/example/owl/production.owl"} 5 | ] -------------------------------------------------------------------------------- /ontologysim/Flask/Assets/DefaultFiles/owl_config.ini: -------------------------------------------------------------------------------- 1 | [OWL] 2 | java_path="C:/Program Files/Java/jdk-15.0.1/bin/java.exe" 3 | owl_save_path=[{'type':"production_without_task_defect",'save':False,'path':"/example/owl/production_without_task_defect.owl"}, 4 | {'type':"production",'save':False,'path':"/example/owl/production.owl"} 5 | ] -------------------------------------------------------------------------------- /ontologysim/Flask/static/DataBase/simulationRunModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "id": { 5 | "type": "integer", 6 | "format": "int64" 7 | }, 8 | "start": { 9 | "type": "date" 10 | }, 11 | "number_or_parts": { 12 | "type": "integer", 13 | "format": "int32" 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/controller/transporter_controller/TransporterController_Enum.py: -------------------------------------------------------------------------------- 1 | 2 | from enum import Enum 3 | 4 | 5 | class Queue_Selection(Enum): 6 | """ 7 | Defines the two strategies for selecting the next station 8 | SQF: Shortest Queue First 9 | NJF: Earliest Job First (nearest queue) 10 | """ 11 | SQF="SQF" 12 | NJF="NJF" -------------------------------------------------------------------------------- /docs/source/production_simulation/controller/ProductionSimulation.controller.service_controller.rst: -------------------------------------------------------------------------------- 1 | 2 | 3 | Service Controller 4 | ---------------------------------------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.controller.service_controller.ServiceController 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/logger/plot/y_lookup_tabel.ini: -------------------------------------------------------------------------------- 1 | 2 | [LookUp] 3 | percentage=["TTFp", "TTRp", "FE", "CMTp", "AUITp", "AUBTp", "ADOTp", "AUSTp", "APTp", "AUPTp", "AUSTTp","PBTp", "AUBLTp","PRIp","A", "AE", "TE", "UE", "SeR","ATT", "AQMT", "AUST", "ATTp", "AQMTp", "AUSTp", "APTp", "AUPTp", "AUSTnpp","PBTp","AR","PR","FillLevel"] 4 | number=["FE","WIP"] 5 | time=["AOET"] 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/controller/ProductionSimulation.controller.service_controller.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Service Controller 4 | ---------------------------------------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.controller.service_controller.ServiceController 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | rdflib == 5.0.0 2 | numpy ~= 1.17.3 3 | pandas ~= 1.3.5 4 | requests == 2.24.0 5 | owlready2 == 0.34 6 | matplotlib ~= 3.3.2 7 | flask 8 | redis 9 | flask_cors 10 | flask_swagger_ui 11 | SQLAlchemy 12 | flask_sqlalchemy 13 | Deprecated 14 | recommonmark 15 | python-decouple == 3.4 16 | jwt 17 | pyjwt 18 | bcrypt 19 | sphinx_rtd_theme 20 | sphinx-markdown-tables 21 | sqlalchemy_utils -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/ProductType.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "source_state", 5 | "state" 6 | ], 7 | "properties": { 8 | "source_state": { 9 | "type": "array", 10 | "items": { 11 | "type": "string" 12 | } 13 | }, 14 | "state": { 15 | "type": "array", 16 | "items": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/EndQueue.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "current_size", 5 | "positions", 6 | "size" 7 | ], 8 | "properties": { 9 | "current_size": { 10 | "type": "int" 11 | }, 12 | "positions": { 13 | "type": "array", 14 | "items": { 15 | "type": "string" 16 | } 17 | }, 18 | "size": { 19 | "type": "int" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /venv/ 2 | /.idea/* 3 | /example/log/*/* 4 | /example/owl/*.owl 5 | *__pycache__* 6 | /.idea 7 | /doc/* 8 | .idea/* 9 | .idea/workspace.xml 10 | ci/ 11 | ci/* 12 | /ontologysim/ProductionSimulation/database/SimulationRun.db 13 | /dist 14 | /dist/* 15 | /ontologysim/testPlayground/ 16 | /ontologysim.egg-info/ 17 | /ontologysim/ontologysim.egg-info/ 18 | /run.log 19 | /tests/run.log 20 | /ontologysim/Flask/run.log 21 | /configFolder/ 22 | -------------------------------------------------------------------------------- /docs/build/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '29.11.2020', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/DeadlockQueue.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "current_size", 5 | "positions", 6 | "size" 7 | ], 8 | "properties": { 9 | "current_size": { 10 | "type": "int" 11 | }, 12 | "positions": { 13 | "type": "array", 14 | "items": { 15 | "type": "string" 16 | } 17 | }, 18 | "size": { 19 | "type": "int" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/MachineQueue.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "current_size", 5 | "positions", 6 | "size" 7 | ], 8 | "properties": { 9 | "current_size": { 10 | "type": "int" 11 | }, 12 | "positions": { 13 | "type": "array", 14 | "items": { 15 | "type": "string" 16 | } 17 | }, 18 | "size": { 19 | "type": "int" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/ProcessQueue.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "current_size", 5 | "positions", 6 | "size" 7 | ], 8 | "properties": { 9 | "current_size": { 10 | "type": "int" 11 | }, 12 | "positions": { 13 | "type": "array", 14 | "items": { 15 | "type": "string" 16 | } 17 | }, 18 | "size": { 19 | "type": "int" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/StartQueue.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "current_size", 5 | "positions", 6 | "size" 7 | ], 8 | "properties": { 9 | "current_size": { 10 | "type": "int" 11 | }, 12 | "positions": { 13 | "type": "array", 14 | "items": { 15 | "type": "string" 16 | } 17 | }, 18 | "size": { 19 | "type": "int" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /docs/source/flask/main/Flask.rst: -------------------------------------------------------------------------------- 1 | 2 | FlaskMain 3 | ============= 4 | 5 | main entry point for the Flask application 6 | 7 | FlaskApp 8 | ============= 9 | 10 | .. automodule:: ontologysim.Flask.FlaskApp 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | 16 | APIAction 17 | ============= 18 | 19 | .. automodule:: ontologysim.Flask.Actions.APIAction 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/TransporterQueue.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "current_size", 5 | "positions", 6 | "size" 7 | ], 8 | "properties": { 9 | "current_size": { 10 | "type": "int" 11 | }, 12 | "positions": { 13 | "type": "array", 14 | "items": { 15 | "type": "string" 16 | } 17 | }, 18 | "size": { 19 | "type": "int" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | rdflib == 7.0.0 2 | numpy ~= 1.26.1 3 | pandas ~= 2.1.2 4 | requests == 2.31.0 5 | Cython == 3.0.5 6 | pyodbc == 5.0.1 7 | owlready2 == 0.44 8 | matplotlib ~= 3.8.1 9 | flask 10 | redis 11 | flask_cors 12 | flask_swagger_ui 13 | SQLAlchemy 14 | flask_sqlalchemy 15 | Deprecated 16 | recommonmark 17 | python-decouple == 3.8 18 | jwt 19 | pyjwt 20 | bcrypt 21 | sphinx_rtd_theme 22 | sphinx-markdown-tables 23 | sqlalchemy_utils 24 | setuptools -------------------------------------------------------------------------------- /docs/build/_sources/flask/main/Flask.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | FlaskMain 3 | ============= 4 | 5 | main entry point for the Flask application 6 | 7 | FlaskApp 8 | ============= 9 | 10 | .. automodule:: ontologysim.Flask.FlaskApp 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | 16 | APIAction 17 | ============= 18 | 19 | .. automodule:: ontologysim.Flask.Actions.APIAction 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | 2 | image: python:3.8 3 | variables: 4 | PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" 5 | 6 | before_script: 7 | - python -V # Print out python version for debugging 8 | - pip install virtualenv 9 | - virtualenv venv 10 | - source venv/bin/activate 11 | 12 | 13 | stages: 14 | - test 15 | - dummy 16 | test: 17 | script: 18 | - python -m unittest tests/testCases/ConfigTest.py 19 | dummy: 20 | script: 21 | - echo "Pipeline finished" -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation/ProductionSimulation.sim.Product.rst: -------------------------------------------------------------------------------- 1 | Product 2 | --------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Product 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | Product type 11 | ------------------------------------------- 12 | 13 | .. automodule:: ontologysim.ProductionSimulation.sim.ProductType 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | -------------------------------------------------------------------------------- /docs/source/flask/actions/Flask.Actions.UtilMethods.rst: -------------------------------------------------------------------------------- 1 | 2 | ProductionDict 3 | ----------------------------------------------- 4 | 5 | .. automodule:: ontologysim.Flask.Actions.UtilMethods.ProductionDict 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | StateStorage 11 | --------------------------------------------- 12 | 13 | .. automodule:: ontologysim.Flask.Actions.UtilMethods.StateStorage 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation/ProductionSimulation.sim.Product.rst.txt: -------------------------------------------------------------------------------- 1 | Product 2 | --------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Product 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | Product type 11 | ------------------------------------------- 12 | 13 | .. automodule:: ontologysim.ProductionSimulation.sim.ProductType 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/TestAction.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from ontologysim.Flask.Actions.APIAction import APIAction 4 | 5 | 6 | class TestAction(APIAction): 7 | """ 8 | 9 | /test: get: test connection 10 | """ 11 | 12 | def __call__(self, *args): 13 | """ 14 | 15 | :param args: 16 | :return: 17 | """ 18 | self.action() 19 | 20 | self.response=self.response200OK(json.dumps({"message":"OK"})) 21 | 22 | return self.response -------------------------------------------------------------------------------- /docs/build/_sources/flask/actions/Flask.Actions.UtilMethods.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | ProductionDict 3 | ----------------------------------------------- 4 | 5 | .. automodule:: ontologysim.Flask.Actions.UtilMethods.ProductionDict 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | StateStorage 11 | --------------------------------------------- 12 | 13 | .. automodule:: ontologysim.Flask.Actions.UtilMethods.StateStorage 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | -------------------------------------------------------------------------------- /docs/source/flask/actions/Flask.Actions.DataBase.rst: -------------------------------------------------------------------------------- 1 | 2 | ConnectDataBaseAction 3 | --------------------------------------------------- 4 | 5 | .. automodule:: ontologysim.Flask.Actions.DataBase.ConnectDataBaseAction 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | GetSimulationRunAction 11 | ---------------------------------------------------- 12 | 13 | .. automodule:: ontologysim.Flask.Actions.DataBase.GetSimulationRunAction 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | -------------------------------------------------------------------------------- /docs/build/_sources/flask/actions/Flask.Actions.DataBase.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | ConnectDataBaseAction 3 | --------------------------------------------------- 4 | 5 | .. automodule:: ontologysim.Flask.Actions.DataBase.ConnectDataBaseAction 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | GetSimulationRunAction 11 | ---------------------------------------------------- 12 | 13 | .. automodule:: ontologysim.Flask.Actions.DataBase.GetSimulationRunAction 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | -------------------------------------------------------------------------------- /example/config/controller_config.ini: -------------------------------------------------------------------------------- 1 | [Controller] 2 | machine = {'type': 'MachineController_FIFO', 'add': {}} 3 | transporter = {'type': 'TransporterController_Hybrid', 'add': {'TransporterController_FIFO': 0.43539036099361705, 'TransporterController_NJF': 0.6759958569333095, 'TransporterController_EDD': 0.5773536432743988}} 4 | orderrelease = {'type':'OrderReleaseControllerEqual','add':{},'fillLevel':0.5} 5 | service_machine = {'type':'ServiceControllerMachine','add':{}} 6 | service_transporter = {'type':'ServiceControllerTransporter','add':{}} 7 | 8 | -------------------------------------------------------------------------------- /example/config/for_docu/controller_config.ini: -------------------------------------------------------------------------------- 1 | [Controller] 2 | machine = {'type': 'MachineController_FIFO', 'add': {}} 3 | transporter = {'type': 'TransporterController_Hybrid', 'add': {'TransporterController_FIFO': 0.43539036099361705, 'TransporterController_NJF': 0.6759958569333095, 'TransporterController_EDD': 0.5773536432743988}} 4 | orderrelease = {'type':'OrderReleaseControllerEqual','add':{},'fillLevel':0.5} 5 | service_machine = {'type':'ServiceControllerMachine','add':{}} 6 | service_transporter = {'type':'ServiceControllerTransporter','add':{}} 7 | 8 | -------------------------------------------------------------------------------- /tests/configFiles/defaultTest/controller_config.ini: -------------------------------------------------------------------------------- 1 | [Controller] 2 | machine = {'type': 'MachineController_FIFO', 'add': {}} 3 | transporter = {'type': 'TransporterController_Hybrid', 'add': {'TransporterController_FIFO': 0.43539036099361705, 'TransporterController_NJF': 0.6759958569333095, 'TransporterController_EDD': 0.5773536432743988}} 4 | orderrelease = {'type':'OrderReleaseControllerEqual','add':{},'fillLevel':0.5} 5 | service_machine = {'type':'ServiceControllerMachine','add':{}} 6 | service_transporter = {'type':'ServiceControllerTransporter','add':{}} 7 | 8 | -------------------------------------------------------------------------------- /ontologysim/Flask/Assets/DefaultFiles/controller_config.ini: -------------------------------------------------------------------------------- 1 | [Controller] 2 | machine = {'type': 'MachineController_FIFO', 'add': {}} 3 | transporter = {'type': 'TransporterController_Hybrid', 'add': {'TransporterController_FIFO': 0.43539036099361705, 'TransporterController_NJF': 0.6759958569333095, 'TransporterController_EDD': 0.5773536432743988}} 4 | orderrelease = {'type':'OrderReleaseControllerEqual','add':{},'fillLevel':0.5} 5 | service_machine = {'type':'ServiceControllerMachine','add':{}} 6 | service_transporter = {'type':'ServiceControllerTransporter','add':{}} 7 | 8 | -------------------------------------------------------------------------------- /tests/iniFiles/process1/controller.ini: -------------------------------------------------------------------------------- 1 | [Controller] 2 | machine = {'add': {}, 'type': 'MachineController_LIFO'} 3 | transporter = {'type': 'TransporterController_Hybrid', 'add': {'TransporterController_FIFO': 0.19, 'TransporterController_NJF': 0.45, 'TransporterController_EDD': 0.5, 'TransporterController_SQF': 0.85, 'TransporterController_LIFO': 0.08}} 4 | orderrelease = {'type': 'OrderReleaseControllerEqual', 'fillLevel': 0.48} 5 | service_machine = {'type': 'ServiceControllerMachine', 'add': {}} 6 | service_transporter = {'type': 'ServiceControllerTransporter', 'add': {}} 7 | 8 | -------------------------------------------------------------------------------- /ontologysim/Flask/Assets/DefaultFiles/logger_config_lvl3.ini: -------------------------------------------------------------------------------- 1 | [Type] 2 | type = 'lvl3' 3 | 4 | [KPIs] 5 | time_interval=100 6 | log_summary=True 7 | log_time=True 8 | log_events=False 9 | path="/ontologysim/example/log/" 10 | 11 | 12 | [ConfigIni] 13 | addIni=False 14 | path="/example/config/" 15 | 16 | [Plot] 17 | plot=False 18 | number_of_points_x=15 19 | #max 3 values 20 | data=[{'object_name':'all','kpi':'AE','type':'machine'},{'object_name':'all','kpi':'AUITp','type':'transporter'},{'object_name':'all','kpi':'AOET','type':'product'}] 21 | 22 | [Save] 23 | csv = False 24 | database = False -------------------------------------------------------------------------------- /docs/source/production_simulation/test/tests.testCases.rst: -------------------------------------------------------------------------------- 1 | FlaskAPITest 2 | ----------------------------------- 3 | 4 | .. automodule:: tests.testCases.FlaskAPITest 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | MainTest 10 | ------------------------------- 11 | 12 | .. automodule:: tests.testCases.MainTest 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | MultipleRunTests 18 | --------------------------------------- 19 | 20 | .. automodule:: tests.testCases.MultipleRunTests 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/test/tests.testCases.rst.txt: -------------------------------------------------------------------------------- 1 | FlaskAPITest 2 | ----------------------------------- 3 | 4 | .. automodule:: tests.testCases.FlaskAPITest 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | MainTest 10 | ------------------------------- 11 | 12 | .. automodule:: tests.testCases.MainTest 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | MultipleRunTests 18 | --------------------------------------- 19 | 20 | .. automodule:: tests.testCases.MultipleRunTests 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | -------------------------------------------------------------------------------- /example/MainPlot.py: -------------------------------------------------------------------------------- 1 | import inspect 2 | import os 3 | import sys 4 | 5 | current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) 6 | parent_dir = os.path.dirname(current_dir) 7 | sys.path.insert(0, parent_dir) 8 | 9 | from ontologysim.ProductionSimulation.plot.Log_plot import Plot 10 | from ontologysim.ProductionSimulation.utilities.path_utilities import PathTest 11 | 12 | def mainPlot(): 13 | PathTest.current_main_dir = current_dir 14 | plot = Plot('/example/config/plot_log.ini') 15 | plot.plot() 16 | 17 | 18 | 19 | 20 | 21 | if __name__ == "__main__": 22 | mainPlot() -------------------------------------------------------------------------------- /example/config/for_docu/controller_config_extern.ini: -------------------------------------------------------------------------------- 1 | [Controller] 2 | machine = {'type': 'MachineController_Hybrid', 'add': {'MachineController_FIFO2': 0.5, 'MachineController_FIFO2':0.5}} 3 | transporter = {'type': 'TransporterController_Hybrid', 'add': {'TransporterController_FIFO': 0.43539036099361705, 'TransporterController_NJF': 0.6759958569333095, 'TransporterController_EDD': 0.5773536432743988}} 4 | orderrelease = {'type':'OrderReleaseControllerEqual','add':{},'fillLevel':0.5} 5 | service_machine = {'type':'ServiceControllerMachine','add':{}} 6 | service_transporter = {'type':'ServiceControllerTransporter','add':{}} 7 | 8 | -------------------------------------------------------------------------------- /tests/util/Timeout.py: -------------------------------------------------------------------------------- 1 | from multiprocessing.context import Process 2 | from deprecated.sphinx import deprecated 3 | 4 | 5 | @deprecated(version='0.1.0', reason="no multiprocessnig") 6 | def timeoutTestCase( method,timeout) -> object: 7 | """ 8 | currently not used 9 | 10 | :param method: python method 11 | :param timeout: time 12 | :return: bool, true or false 13 | """ 14 | p1 = Process(target=method, name='Process_inc_forever') 15 | p1.start() 16 | p1.join(timeout=timeout) 17 | p1.terminate() 18 | if p1.exitcode is None: 19 | return False 20 | else: 21 | return True -------------------------------------------------------------------------------- /example/create_pnml/MainPetriNet.py: -------------------------------------------------------------------------------- 1 | """depreciated 2 | 3 | 4 | import inspect 5 | import os 6 | import sys 7 | 8 | current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) 9 | parent_dir = os.path.dirname(current_dir) 10 | parent_parent_dir = os.path.dirname(parent_dir) 11 | sys.path.insert(0, parent_parent_dir) 12 | 13 | 14 | from ontologysim.ProductionSimulation.init.petrinet_generator import create_petrinet 15 | from ontologysim.ProductionSimulation.utilities.path_utilities import PathTest 16 | PathTest.current_main_dir = parent_dir 17 | 18 | create_petrinet(10,[[1,2],[2,1]],"/example/create_pnml/",True) 19 | 20 | """ -------------------------------------------------------------------------------- /example/config/logger_config_lvl3.ini: -------------------------------------------------------------------------------- 1 | [Type] 2 | type = 'lvl3' 3 | 4 | [KPIs] 5 | time_interval=100 6 | log_summary=True 7 | log_time=True 8 | log_events=False 9 | 10 | 11 | [ConfigIni] 12 | addIni=False 13 | path="/example/config/" 14 | 15 | [Plot] 16 | plot=True 17 | number_of_points_x=15 18 | #max 3 values 19 | data=[{'object_name':'all','kpi':'AE','type':'machine'},{'object_name':'all','kpi':'AUITp','type':'transporter'},{'object_name':'all','kpi':'AOET','type':'product'}] 20 | 21 | [Save] 22 | csv = True 23 | database = False 24 | path="/ontologysim/example/log/" 25 | sql_alchemy_database_uri = "sqlite:///ontologysim/ProductionSimulation/database/SimulationRun.db" -------------------------------------------------------------------------------- /docs/source/configs/ini_file.rst: -------------------------------------------------------------------------------- 1 | Ini 2 | ============== 3 | 4 | Production ini 5 | --------------- 6 | 7 | .. toctree:: 8 | :maxdepth: 0 9 | 10 | production/production_config 11 | 12 | Controller ini 13 | ---------------- 14 | 15 | .. toctree:: 16 | :maxdepth: 0 17 | 18 | controller/controller_config 19 | 20 | Logger ini 21 | ---------------- 22 | 23 | .. toctree:: 24 | :maxdepth: 0 25 | 26 | logger/logger_config 27 | 28 | Plot ini 29 | ---------------- 30 | 31 | .. toctree:: 32 | :maxdepth: 0 33 | 34 | plot/plot_config 35 | 36 | Owl ini 37 | ---------------- 38 | 39 | .. toctree:: 40 | :maxdepth: 0 41 | 42 | owl/owl_config 43 | 44 | -------------------------------------------------------------------------------- /example/config/for_docu/logger_config_lvl3.ini: -------------------------------------------------------------------------------- 1 | [Type] 2 | type = 'lvl3' 3 | 4 | [KPIs] 5 | time_interval=100 6 | log_summary=True 7 | log_time=True 8 | log_events=False 9 | 10 | 11 | [ConfigIni] 12 | addIni=False 13 | path="/example/config/" 14 | 15 | [Plot] 16 | plot=True 17 | number_of_points_x=15 18 | #max 3 values 19 | data=[{'object_name':'all','kpi':'AE','type':'machine'},{'object_name':'all','kpi':'AUITp','type':'transporter'},{'object_name':'all','kpi':'AOET','type':'product'}] 20 | 21 | [Save] 22 | csv = True 23 | database = False 24 | path="/ontologysim/example/log/" 25 | sql_alchemy_database_uri = "sqlite:///ontologysim/ProductionSimulation/database/SimulationRun.db" -------------------------------------------------------------------------------- /docs/build/_sources/configs/ini_file.rst.txt: -------------------------------------------------------------------------------- 1 | Ini 2 | ============== 3 | 4 | Production ini 5 | --------------- 6 | 7 | .. toctree:: 8 | :maxdepth: 0 9 | 10 | production/production_config 11 | 12 | Controller ini 13 | ---------------- 14 | 15 | .. toctree:: 16 | :maxdepth: 0 17 | 18 | controller/controller_config 19 | 20 | Logger ini 21 | ---------------- 22 | 23 | .. toctree:: 24 | :maxdepth: 0 25 | 26 | logger/logger_config 27 | 28 | Plot ini 29 | ---------------- 30 | 31 | .. toctree:: 32 | :maxdepth: 0 33 | 34 | plot/plot_config 35 | 36 | Owl ini 37 | ---------------- 38 | 39 | .. toctree:: 40 | :maxdepth: 0 41 | 42 | owl/owl_config 43 | 44 | -------------------------------------------------------------------------------- /docs/source/production_simulation/logger.rst: -------------------------------------------------------------------------------- 1 | Logger 2 | ========= 3 | 4 | 5 | KPI logger 6 | -------------------- 7 | .. toctree:: 8 | :maxdepth: 0 9 | 10 | logger/ProductionSimulation.logger.kpi_logger 11 | 12 | 13 | 14 | Event logger 15 | -------------------- 16 | .. toctree:: 17 | :maxdepth: 0 18 | 19 | logger/ProductionSimulation.logger.event_logger 20 | 21 | Plot logger 22 | -------------------- 23 | .. toctree:: 24 | :maxdepth: 0 25 | 26 | logger/ProductionSimulation.logger.plot 27 | 28 | Depreciated logger 29 | -------------------- 30 | .. toctree:: 31 | :maxdepth: 0 32 | 33 | logger/ProductionSimulation.logger.depreciated_logger 34 | 35 | 36 | -------------------------------------------------------------------------------- /example/config/logger_config_lvl2.ini: -------------------------------------------------------------------------------- 1 | [Type] 2 | type = 'lvl2' 3 | 4 | [KPIs] 5 | time_interval=100 6 | log_summary= ["transporter"] 7 | log_time=["machine"] 8 | log_events=False 9 | 10 | [ConfigIni] 11 | addIni=False 12 | path="/example/config/" 13 | 14 | [Plot] 15 | plot=False 16 | number_of_points_x=15 17 | #max 3 values 18 | data=[{'object_name':'all','kpi':'AE','type':'machine'},{'object_name':'all','kpi':'AUITp','type':'transporter'},{'object_name':'all','kpi':'AOET','type':'product'}] 19 | 20 | 21 | [Save] 22 | csv = True 23 | database = True 24 | path="/ontologysim/example/log/" 25 | sql_alchemy_database_uri = "sqlite:///ontologysim/ProductionSimulation/database/SimulationRun.db" -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/logger.rst.txt: -------------------------------------------------------------------------------- 1 | Logger 2 | ========= 3 | 4 | 5 | KPI logger 6 | -------------------- 7 | .. toctree:: 8 | :maxdepth: 0 9 | 10 | logger/ProductionSimulation.logger.kpi_logger 11 | 12 | 13 | 14 | Event logger 15 | -------------------- 16 | .. toctree:: 17 | :maxdepth: 0 18 | 19 | logger/ProductionSimulation.logger.event_logger 20 | 21 | Plot logger 22 | -------------------- 23 | .. toctree:: 24 | :maxdepth: 0 25 | 26 | logger/ProductionSimulation.logger.plot 27 | 28 | Depreciated logger 29 | -------------------- 30 | .. toctree:: 31 | :maxdepth: 0 32 | 33 | logger/ProductionSimulation.logger.depreciated_logger 34 | 35 | 36 | -------------------------------------------------------------------------------- /example/config/for_docu/logger_config_lvl2.ini: -------------------------------------------------------------------------------- 1 | [Type] 2 | type = 'lvl2' 3 | 4 | [KPIs] 5 | time_interval=100 6 | log_summary= ["transporter"] 7 | log_time=["machine"] 8 | log_events=False 9 | 10 | [ConfigIni] 11 | addIni=False 12 | path="/example/config/" 13 | 14 | [Plot] 15 | plot=False 16 | number_of_points_x=15 17 | #max 3 values 18 | data=[{'object_name':'all','kpi':'AE','type':'machine'},{'object_name':'all','kpi':'AUITp','type':'transporter'},{'object_name':'all','kpi':'AOET','type':'product'}] 19 | 20 | 21 | [Save] 22 | csv = True 23 | database = True 24 | path="/ontologysim/example/log/" 25 | sql_alchemy_database_uri = "sqlite:///ontologysim/ProductionSimulation/database/SimulationRun.db" -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation/ProductionSimulation.sim.Subelements.rst: -------------------------------------------------------------------------------- 1 | Location 2 | ---------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Location 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | Queue 11 | ------------------------------------- 12 | 13 | .. automodule:: ontologysim.ProductionSimulation.sim.Queue 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | Distribution 19 | -------------------------------------------- 20 | 21 | .. automodule:: ontologysim.ProductionSimulation.sim.Distribution 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | -------------------------------------------------------------------------------- /tests/iniFiles/process1/logger.ini: -------------------------------------------------------------------------------- 1 | [Type] 2 | type = lvl3 3 | 4 | [KPIs] 5 | time_interval = 100 6 | log_summary = True 7 | log_time = True 8 | log_events = True 9 | path = /example/log 10 | 11 | [ConfigIni] 12 | addini = False 13 | path = /example/config/ 14 | 15 | [Plot] 16 | plot = True 17 | number_of_points_x = 15 18 | data = [{'object_name': 'all', 'kpi': 'AE', 'type': 'machine'}, {'object_name': 'all', 'kpi': 'AUITp', 'type': 'transporter'}, {'object_name': 'all', 'kpi': 'AOET', 'type': 'product'}] 19 | 20 | [Save] 21 | csv = False 22 | database = True 23 | path = /ontologysim/example/log/ 24 | sql_alchemy_database_uri = sqlite:///ontologysim/ProductionSimulation/database/SimulationRun.db 25 | 26 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation/ProductionSimulation.sim.Subelements.rst.txt: -------------------------------------------------------------------------------- 1 | Location 2 | ---------------------------------------- 3 | 4 | .. automodule:: ontologysim.ProductionSimulation.sim.Location 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | Queue 11 | ------------------------------------- 12 | 13 | .. automodule:: ontologysim.ProductionSimulation.sim.Queue 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | Distribution 19 | -------------------------------------------- 20 | 21 | .. automodule:: ontologysim.ProductionSimulation.sim.Distribution 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/source/flask/starting.md: -------------------------------------------------------------------------------- 1 | Starting Flask 2 | ================ 3 | 4 | Flask is here used as a backend api. There is no rendering of html files. 5 | 6 | To start the flask server use: 7 | 8 | Start 9 | -------- 10 | ````bash 11 | cd ontologysim 12 | py ontologysim/Flask/FlaskMain.py 13 | ```` 14 | 15 | Test connection 16 | ------------------ 17 | 18 | Got to the browser and type in: 19 | [http://localhost:5000/test](http://localhost:5000/test) 20 | 21 | Possible Connections 22 | ----------------------- 23 | 24 | The full api-connections can be found here: [http://localhost:5000/api/docs](http://localhost:5000/api/docs) 25 | 26 | Postman 27 | -------- 28 | 29 | To test a api [Postman](https://www.postman.com/) is a cool tool 30 | -------------------------------------------------------------------------------- /docs/build/_sources/flask/starting.md.txt: -------------------------------------------------------------------------------- 1 | Starting Flask 2 | ================ 3 | 4 | Flask is here used as a backend api. There is no rendering of html files. 5 | 6 | To start the flask server use: 7 | 8 | Start 9 | -------- 10 | ````bash 11 | cd ontologysim 12 | py ontologysim/Flask/FlaskMain.py 13 | ```` 14 | 15 | Test connection 16 | ------------------ 17 | 18 | Got to the browser and type in: 19 | [http://localhost:5000/test](http://localhost:5000/test) 20 | 21 | Possible Connections 22 | ----------------------- 23 | 24 | The full api-connections can be found here: [http://localhost:5000/api/docs](http://localhost:5000/api/docs) 25 | 26 | Postman 27 | -------- 28 | 29 | To test a api [Postman](https://www.postman.com/) is a cool tool 30 | -------------------------------------------------------------------------------- /docs/source/production_simulation/controller/ProductionSimulation.controller.order_release_controller.rst: -------------------------------------------------------------------------------- 1 | 2 | 3 | Order Release Controller 4 | ---------------------------------------------------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.controller.order_release_controller.OrderReleaseController 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | Order Release Controller Equal 12 | --------------------------------------------------------------------------------------------- 13 | 14 | .. automodule:: ontologysim.ProductionSimulation.controller.order_release_controller.OrderReleaseControllerEqual 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | 19 | -------------------------------------------------------------------------------- /docs/source/production_simulation/logger/ProductionSimulation.logger.plot.rst: -------------------------------------------------------------------------------- 1 | 2 | Plot 3 | -------------------------------------------- 4 | 5 | This plot allows the KPIs to be displayed live. The setting of the plot is done via the logger_config.ini 6 | 7 | 8 | .. automodule:: ontologysim.ProductionSimulation.logger.plot.Plot 9 | :members: 10 | :undoc-members: 11 | :show-inheritance: 12 | 13 | .. note:: to determine the unit a ``y_lookup_table.ini`` was created. New KPIs must be entered in this table 14 | 15 | Plot test 16 | -------------------------------------------------- 17 | 18 | .. automodule:: ontologysim.ProductionSimulation.logger.plot.plot_test 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | 24 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/DataBase/ConnectDataBaseAction.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from ontologysim.Flask.Actions.APIAction import APIAction 4 | from ontologysim.ProductionSimulation.database.DataBase import DataBase 5 | 6 | 7 | class ConnectDataBaseAction(APIAction): 8 | """ 9 | 10 | /database/connect: get: connect to sqllite data base 11 | """ 12 | 13 | def __call__(self, *args): 14 | """ 15 | 16 | :param args: 17 | :return: 18 | """ 19 | self.action() 20 | 21 | self.flaskApp.db = DataBase("sqlite:///ontologysim/ProductionSimulation/database/SimulationRun.db") 22 | 23 | response = self.response200OK(json.dumps({"message":"OK"})) 24 | 25 | return response 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/controller/ProductionSimulation.controller.order_release_controller.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Order Release Controller 4 | ---------------------------------------------------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.controller.order_release_controller.OrderReleaseController 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | Order Release Controller Equal 12 | --------------------------------------------------------------------------------------------- 13 | 14 | .. automodule:: ontologysim.ProductionSimulation.controller.order_release_controller.OrderReleaseControllerEqual 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | 19 | -------------------------------------------------------------------------------- /example/config/archive/product_merge.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | sink 13 | 14 | 15 | 16 | 17 | 1 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/logger/ProductionSimulation.logger.plot.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | Plot 3 | -------------------------------------------- 4 | 5 | This plot allows the KPIs to be displayed live. The setting of the plot is done via the logger_config.ini 6 | 7 | 8 | .. automodule:: ontologysim.ProductionSimulation.logger.plot.Plot 9 | :members: 10 | :undoc-members: 11 | :show-inheritance: 12 | 13 | .. note:: to determine the unit a ``y_lookup_table.ini`` was created. New KPIs must be entered in this table 14 | 15 | Plot test 16 | -------------------------------------------------- 17 | 18 | .. automodule:: ontologysim.ProductionSimulation.logger.plot.plot_test 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | 24 | -------------------------------------------------------------------------------- /example/config/archive/product_merge1.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | sink 8 | 9 | 10 | 11 | 12 | source 13 | 14 | 15 | 16 | 17 | 1 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/config/archive/product_merge2.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | sink 8 | 9 | 10 | 11 | 12 | source 13 | 14 | 15 | 16 | 17 | 1 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/configFiles/defaultTest/logger_config_lvl3.ini: -------------------------------------------------------------------------------- 1 | [Type] 2 | type = 'lvl3' 3 | 4 | [KPIs] 5 | time_interval=100 6 | log_summary=False 7 | log_time=False 8 | log_events=False 9 | 10 | 11 | [ConfigIni] 12 | addIni=False 13 | path="/example/config/" 14 | 15 | [Plot] 16 | plot=False 17 | number_of_points_x=15 18 | #max 3 values 19 | data=[{'object_name':'all','kpi':'AE','type':'machine'},{'object_name':'all','kpi':'AUITp','type':'transporter'},{'object_name':'all','kpi':'AOET','type':'product'}] 20 | 21 | [Save] 22 | csv = False 23 | database = False 24 | path="/ontologysim/example/log/" 25 | #sql_alchemy_database_uri = "sqlite:///ProductionSimulation/database/SimulationDB" 26 | sql_alchemy_database_uri = "sqlite:///ontologysim/ProductionSimulation/database/SimulationRun.db" -------------------------------------------------------------------------------- /docs/build/_sources/documentation/documentation.rst.txt: -------------------------------------------------------------------------------- 1 | Documentation 2 | ======================== 3 | 4 | Sphinx 5 | ----------- 6 | 7 | The main python documentation is created by Sphinx. In the directory ``/docs/source`` are all files regarding Sphinx saved. 8 | To build the documentation in the folder ``/docs/build`` run. 9 | 10 | .. code-block:: python 11 | 12 | cd docs 13 | sphinx-build -b html ./source ./build 14 | 15 | To create .rst files faster, it helps to use Sphinx auto-module 16 | 17 | .. code-block:: python 18 | 19 | cd doc 20 | sphinx-apidoc -o ./source ../ 21 | sphinx-build -b html ./source ./build 22 | 23 | 24 | SwaggerUI 25 | ----------- 26 | 27 | For Flask, swaggerUI was also set up. All swaggerUI json files are saved in ```/Flask/static`` -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/sim/SubProduct.py: -------------------------------------------------------------------------------- 1 | from ontologysim.ProductionSimulation.sim.Enum import Label 2 | 3 | 4 | class SubProduct: 5 | """ 6 | handles the product onto 7 | """ 8 | def __init__(self, simCore): 9 | """ 10 | 11 | :param simCore: 12 | """ 13 | self.simCore = simCore 14 | 15 | def createSubProduct(self,part_type_onto): 16 | """ 17 | creates product in onto 18 | 19 | :param part_type_onto: onto 20 | :return: product onto 21 | """ 22 | 23 | subProductInstance = self.simCore.central.sub_product_class(Label.SubProduct.value+ str(self.simCore.sub_product_id)) 24 | self.simCore.sub_product_id += 1 25 | 26 | return subProductInstance 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/source/production_simulation/deep_dive/defect.md: -------------------------------------------------------------------------------- 1 | Defect and Service 2 | =================== 3 | 4 | ![Repair image](repair_structure.png "Repair and Defect") 5 | 6 | **Defect** 7 | 8 | * Only machines and transporter an go defect 9 | * the machine queues can still add or remove products 10 | * A defect is divided in multiple sub defects, which can be defined individual 11 | * therefore for selecting the next defect. First the type is selected and then the next defect 12 | * A defect is directly connected to one machine/ transporter 13 | 14 | **Repair service** 15 | 16 | * the simulation has one repair service, but can have multiple service operators 17 | * the controller decides which defect machine should be prioritized 18 | * the machine repair service and the transporter repair service are seperated 19 | 20 | 21 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/database/models/SimulationFacts.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String, Text, Float, TypeDecorator 2 | from sqlalchemy.ext.declarative import declarative_base 3 | from sqlalchemy.orm import relationship, backref 4 | 5 | from ontologysim.ProductionSimulation.database.models.Base import Base 6 | #from ontologysim.ProductionSimulation.database.models.MachineKPI import MachineKPI, MachineTimeKPI 7 | 8 | class SimulationFacts(Base): 9 | __tablename__ = 'SimulationFacts' 10 | id = Column(Integer, primary_key=True) 11 | numberOfParts = Column(Integer,nullable=True) 12 | simulationTime = Column(Float(decimal_return_scale=7,asdecimal=True),nullable=True) 13 | loggingTime = Column(Float(decimal_return_scale=7,asdecimal=True),nullable=True) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/deep_dive/defect.md.txt: -------------------------------------------------------------------------------- 1 | Defect and Service 2 | =================== 3 | 4 | ![Repair image](repair_structure.png "Repair and Defect") 5 | 6 | **Defect** 7 | 8 | * Only machines and transporter an go defect 9 | * the machine queues can still add or remove products 10 | * A defect is divided in multiple sub defects, which can be defined individual 11 | * therefore for selecting the next defect. First the type is selected and then the next defect 12 | * A defect is directly connected to one machine/ transporter 13 | 14 | **Repair service** 15 | 16 | * the simulation has one repair service, but can have multiple service operators 17 | * the controller decides which defect machine should be prioritized 18 | * the machine repair service and the transporter repair service are seperated 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/util/Generator.py: -------------------------------------------------------------------------------- 1 | 2 | from numpy.random import MT19937 3 | from numpy.random.mtrand import RandomState 4 | 5 | 6 | class Generator(object): 7 | """ 8 | parent class for all generator 9 | """ 10 | 11 | def __init__(self,seedParameter=None): 12 | """ 13 | 14 | :param seedParameter: int 15 | """ 16 | 17 | self.randomDistribution = RandomState(MT19937(seedParameter)) 18 | 19 | def createConfigDict(self): 20 | """ 21 | abstract method for main entry point of config generation 22 | :return: 23 | """ 24 | pass 25 | 26 | def addType(self,lvl): 27 | """ 28 | creates lvl dict 29 | :param lvl: string 30 | :return: dict 31 | """ 32 | 33 | config= {} 34 | config["type"] = lvl 35 | return config -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation/ProductionSimulation.sim.SimCore.rst: -------------------------------------------------------------------------------- 1 | 2 | SimCore 3 | --------------------------------------- 4 | 5 | .. automodule:: ontologysim.ProductionSimulation.sim.SimCore 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | Central 11 | --------------------------------------- 12 | 13 | .. automodule:: ontologysim.ProductionSimulation.sim.Central 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | 19 | 20 | 21 | Enum Labelling 22 | ------------------------------------ 23 | 24 | .. automodule:: ontologysim.ProductionSimulation.sim.Enum 25 | :members: 26 | :undoc-members: 27 | :show-inheritance: 28 | 29 | 30 | Task 31 | ------------------------------------ 32 | 33 | .. automodule:: ontologysim.ProductionSimulation.sim.Task 34 | :members: 35 | :undoc-members: 36 | :show-inheritance: 37 | -------------------------------------------------------------------------------- /example/config/plot_log.ini: -------------------------------------------------------------------------------- 1 | [Log] 2 | path_dir="/example/log/11292020_07-19-15_5_3" 3 | save_dir="/example/log/11292020_07-19-15_5_3/plot" 4 | #supported: formats eps, pdf, pgf, png, ps, raw, rgba, svg, svgz 5 | file_type=['png','svg','pdf'] 6 | 7 | [Style] 8 | colormap="Accent" 9 | marker=['','o','r'] 10 | 11 | [LinePlot] 12 | #without object name all 13 | y_data=[{'kpi':'AE','type':'machine','object_name':['m0','all']},{'kpi':'FillLevel','type':'queue'}] 14 | 15 | [MultipleLinePlot] 16 | #max 3 kpis 17 | settings=[{'title':"compare some parameters",'data':[{'kpi':'AE','type':'machine','object_name':['m0','all']},{'kpi':'FE','type':'transporter'}]}] 18 | 19 | 20 | [ScatterPlot] 21 | x_data=[{'kpi':'AE','type':'machine','object_name':'m1'},{'kpi':'A','type':'machine','object_name':'m1'}] 22 | y_data=[{'kpi':'AE','type':'machine','object_name':'m0'},{'kpi':'A','type':'machine','object_name':'m0'}] -------------------------------------------------------------------------------- /docs/source/documentation/documentation.rst: -------------------------------------------------------------------------------- 1 | Documentation 2 | ======================== 3 | 4 | Sphinx 5 | ----------- 6 | 7 | The main python documentation is created by Sphinx. In the directory ``/docs/source`` are all files regarding Sphinx saved. 8 | To build the documentation in the folder ``/docs/build`` run. 9 | 10 | .. code-block:: python 11 | 12 | cd docs 13 | sphinx-build -b html ./source ./build 14 | 15 | To create .rst files faster, it helps to use Sphinx auto-module 16 | 17 | .. code-block:: python 18 | 19 | cd doc 20 | sphinx-apidoc -o ./source ../ 21 | sphinx-build -b html ./source ./build 22 | 23 | 24 | SwaggerUI 25 | ----------- 26 | 27 | For Flask, swaggerUI was also set up. All swaggerUI json files are saved in ```/Flask/static`` 28 | 29 | Pypi 30 | ----- 31 | 32 | .. code-block:: bash 33 | 34 | python setup.py sdist 35 | twine upload dist/* 36 | -------------------------------------------------------------------------------- /docs/source/production_simulation/side_package.rst: -------------------------------------------------------------------------------- 1 | Side package 2 | ====================================== 3 | 4 | Utility 5 | -------------- 6 | .. toctree:: 7 | :maxdepth: 0 8 | 9 | utility/ProductionSimulation.utilities 10 | 11 | Plot 12 | -------------- 13 | 14 | .. toctree:: 15 | :maxdepth: 0 16 | 17 | plot/ProductionSimulation.plot 18 | 19 | Initialize 20 | -------------- 21 | 22 | .. toctree:: 23 | :maxdepth: 0 24 | 25 | ini/ProductionSimulation.init 26 | 27 | Analyse 28 | -------------- 29 | .. toctree:: 30 | :maxdepth: 0 31 | 32 | analyse/ProductionSimulation.analyse 33 | 34 | Tests 35 | ---------- 36 | .. toctree:: 37 | :maxdepth: 0 38 | 39 | test/tests.processes 40 | test/tests 41 | test/tests.testCases 42 | 43 | Generator 44 | ----------- 45 | .. toctree:: 46 | :maxdepth: 0 47 | 48 | generator/tests.util 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Other/test.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "get": { 4 | "tags": [ 5 | "Other" 6 | ], 7 | "summary": "test, if api connections works", 8 | "operationId": "test", 9 | "responses": { 10 | "200": { 11 | "description": "", 12 | "content": { 13 | "application/json": { 14 | "schema": { 15 | "type": "object", 16 | "required": [ 17 | "message" 18 | ], 19 | "properties": { 20 | "message": { 21 | "type": "string" 22 | } 23 | } 24 | } 25 | }, 26 | "examples": { 27 | "value": { 28 | "message": "OK" 29 | } 30 | } 31 | } 32 | } 33 | }, 34 | "x-codegen-request-body-name": "body" 35 | } 36 | } -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation/ProductionSimulation.sim.SimCore.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | SimCore 3 | --------------------------------------- 4 | 5 | .. automodule:: ontologysim.ProductionSimulation.sim.SimCore 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | Central 11 | --------------------------------------- 12 | 13 | .. automodule:: ontologysim.ProductionSimulation.sim.Central 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | 19 | 20 | 21 | Enum Labelling 22 | ------------------------------------ 23 | 24 | .. automodule:: ontologysim.ProductionSimulation.sim.Enum 25 | :members: 26 | :undoc-members: 27 | :show-inheritance: 28 | 29 | 30 | Task 31 | ------------------------------------ 32 | 33 | .. automodule:: ontologysim.ProductionSimulation.sim.Task 34 | :members: 35 | :undoc-members: 36 | :show-inheritance: 37 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | # Set the version of Python and other tools you might need 8 | build: 9 | os: ubuntu-20.04 10 | tools: 11 | python: "3.7" 12 | 13 | # You can also specify other tool versions: 14 | # nodejs: "16" 15 | # rust: "1.55" 16 | # golang: "1.17" 17 | 18 | # Build documentation in the docs/ directory with Sphinx 19 | 20 | sphinx: 21 | builder: html 22 | configuration: docs/source/conf.py 23 | fail_on_warning: false 24 | 25 | # If using Sphinx, optionally build your docs in additional formats such as PDF 26 | # formats: 27 | # - pdf 28 | 29 | # Optionally declare the Python requirements required to build your docs 30 | python: 31 | install: 32 | - requirements: docs/requirements.txt 33 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:10 2 | 3 | RUN apt-get update && apt-get install -y python3 python3-dev python3-pip unixodbc-dev python3-cffi; 4 | # Install OpenJDK-8 5 | RUN apt-get update && \ 6 | apt-get install -y openjdk-11-jdk && \ 7 | apt-get install -y ant && \ 8 | apt-get clean; 9 | 10 | # Fix certificate issues 11 | RUN apt-get update && \ 12 | apt-get install ca-certificates-java && \ 13 | apt-get clean && \ 14 | update-ca-certificates -f; 15 | 16 | RUN apt-get update && \ 17 | apt-get install -y libffi-dev && \ 18 | apt-get clean; 19 | 20 | # Setup JAVA_HOME -- useful for docker commandline 21 | ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/ 22 | RUN export JAVA_HOME 23 | 24 | WORKDIR /app 25 | 26 | COPY requirements.txt requirements.txt 27 | RUN pip3 install -r requirements.txt 28 | 29 | COPY . . 30 | 31 | EXPOSE 5000 32 | 33 | CMD ["python3", "src/Flask/FlaskMain.py"] 34 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/side_package.rst.txt: -------------------------------------------------------------------------------- 1 | Side package 2 | ====================================== 3 | 4 | Utility 5 | -------------- 6 | .. toctree:: 7 | :maxdepth: 0 8 | 9 | utility/ProductionSimulation.utilities 10 | 11 | Plot 12 | -------------- 13 | 14 | .. toctree:: 15 | :maxdepth: 0 16 | 17 | plot/ProductionSimulation.plot 18 | 19 | Initialize 20 | -------------- 21 | 22 | .. toctree:: 23 | :maxdepth: 0 24 | 25 | ini/ProductionSimulation.init 26 | 27 | Analyse 28 | -------------- 29 | .. toctree:: 30 | :maxdepth: 0 31 | 32 | analyse/ProductionSimulation.analyse 33 | 34 | Tests 35 | ---------- 36 | .. toctree:: 37 | :maxdepth: 0 38 | 39 | test/tests.processes 40 | test/tests 41 | test/tests.testCases 42 | 43 | Generator 44 | ----------- 45 | .. toctree:: 46 | :maxdepth: 0 47 | 48 | generator/tests.util 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Simulation/kpiListModel.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "type": "object", 4 | "required": [ 5 | "summarized", 6 | "time" 7 | ], 8 | "properties": { 9 | "summarized": { 10 | "type": "object", 11 | "properties": { 12 | "production_object": { 13 | "type": "array", 14 | "items": { 15 | "type": "number" 16 | } 17 | } 18 | } 19 | }, 20 | "time": { 21 | "type": "object", 22 | "properties": { 23 | "production_object": { 24 | "type": "array", 25 | "items": { 26 | "type": "array", 27 | "items": { 28 | "type": "number" 29 | } 30 | } 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/build/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/Transporter.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "input_queue", 5 | "kpi", 6 | "location", 7 | "output_queue", 8 | "process_queue", 9 | "prod_process", 10 | "state" 11 | ], 12 | "properties": { 13 | "queue": { 14 | "type": "string" 15 | }, 16 | "kpi": { 17 | "type": "object", 18 | "properties": { 19 | "name": { 20 | "type": "float" 21 | } 22 | } 23 | }, 24 | "route_type": {"type": "string"}, 25 | "speed": {"type": "int"}, 26 | "location": { 27 | "type": "object", 28 | "properties": { 29 | "coordinates": { 30 | "type": "array", 31 | "items": { 32 | "type": "string" 33 | } 34 | }, 35 | "queue": {"type": "string"} 36 | 37 | } 38 | }, 39 | "state": { 40 | "type": "object" 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /tests/util/OwlGenerator.py: -------------------------------------------------------------------------------- 1 | import configparser 2 | 3 | from tests.util.Generator import Generator 4 | 5 | class OwlGenerator(Generator): 6 | """ 7 | Owl generator 8 | """ 9 | 10 | def __init__(self): 11 | """ 12 | 13 | """ 14 | super().__init__(None) 15 | 16 | 17 | def createConfigDict(self): 18 | """ 19 | main methode for creating config dict 20 | 21 | :return: configparser element 22 | """ 23 | 24 | owl_config = configparser.ConfigParser() 25 | owl_config['OWL'] = self.addOWL() 26 | 27 | return owl_config 28 | 29 | 30 | def addOWL(self): 31 | """ 32 | defines owl setttings 33 | 34 | :return: dict 35 | """ 36 | config = {} 37 | path= "C://Program Files/Java/jdk-15.0.1/bin/java.exe" 38 | config["java_path"] = path 39 | config["owl_save_path"] = [] 40 | return config 41 | 42 | 43 | -------------------------------------------------------------------------------- /tests/TestMain.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import os 3 | import inspect 4 | import sys 5 | 6 | 7 | current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) 8 | parent_dir = os.path.dirname(current_dir) 9 | parent_parent_dir = os.path.dirname(parent_dir) 10 | sys.path.insert(0, parent_dir) 11 | sys.path.insert(0,parent_parent_dir) 12 | 13 | from tests.testCases import FlaskAPITest, MainTest, MultipleRunTests,CrateDataBaseTest 14 | 15 | # load all testcases from given module 16 | suite = unittest.TestSuite() 17 | suite.addTest(unittest.TestLoader().loadTestsFromModule(FlaskAPITest)) 18 | suite.addTest(unittest.TestLoader().loadTestsFromModule(MainTest)) 19 | suite.addTest(unittest.TestLoader().loadTestsFromModule(MultipleRunTests)) 20 | suite.addTest(unittest.TestLoader().loadTestsFromModule(CrateDataBaseTest)) 21 | 22 | 23 | # run all tests with verbosity 24 | if __name__ == '__main__': 25 | unittest.TextTestRunner(verbosity=2).run(suite) 26 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Simulation/kpiModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": ["summarized","time"], 4 | "properties": { 5 | "summarized": { 6 | "type":"object", 7 | "required": ["all"], 8 | "properties": { 9 | "production_object": { 10 | "type": "object", 11 | "properties": { 12 | "kpi_name": { 13 | "type": "number" 14 | } 15 | } 16 | } 17 | } 18 | }, 19 | "time": { 20 | "type":"object", 21 | "required": ["all"], 22 | "properties": { 23 | "production_object": { 24 | "type": "object", 25 | "properties": { 26 | "kpi_name": { 27 | "type": "array", 28 | "items": {"type": "number"} 29 | } 30 | } 31 | }, 32 | "time": { 33 | "type": "array", 34 | "items": {"type": "number"} 35 | } 36 | } 37 | 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /docs/source/production_simulation/deep_dive.rst: -------------------------------------------------------------------------------- 1 | Deep dive 2 | ============= 3 | 4 | The following page should provide a deeper understanding of the simulation 5 | 6 | Simulation 7 | ----------------------- 8 | .. toctree:: 9 | :maxdepth: 0 10 | 11 | deep_dive/simulation 12 | 13 | 14 | 15 | Ontology 16 | -------------------- 17 | 18 | .. toctree:: 19 | :maxdepth: 0 20 | 21 | deep_dive/ontology 22 | 23 | Controller 24 | ----------------- 25 | 26 | .. toctree:: 27 | :maxdepth: 0 28 | 29 | deep_dive/controller 30 | 31 | Transporter 32 | ----------- 33 | 34 | .. toctree:: 35 | :maxdepth: 0 36 | 37 | deep_dive/transporter 38 | 39 | Event 40 | ---------------- 41 | .. toctree:: 42 | :maxdepth: 0 43 | 44 | deep_dive/event 45 | 46 | Defect & Service 47 | ----------------------- 48 | .. toctree:: 49 | :maxdepth: 0 50 | 51 | deep_dive/defect 52 | 53 | Logger 54 | ----------------------- 55 | .. toctree:: 56 | :maxdepth: 0 57 | 58 | deep_dive/logger 59 | 60 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/deep_dive.rst.txt: -------------------------------------------------------------------------------- 1 | Deep dive 2 | ============= 3 | 4 | The following page should provide a deeper understanding of the simulation 5 | 6 | Simulation 7 | ----------------------- 8 | .. toctree:: 9 | :maxdepth: 0 10 | 11 | deep_dive/simulation 12 | 13 | 14 | 15 | Ontology 16 | -------------------- 17 | 18 | .. toctree:: 19 | :maxdepth: 0 20 | 21 | deep_dive/ontology 22 | 23 | Controller 24 | ----------------- 25 | 26 | .. toctree:: 27 | :maxdepth: 0 28 | 29 | deep_dive/controller 30 | 31 | Transporter 32 | ----------- 33 | 34 | .. toctree:: 35 | :maxdepth: 0 36 | 37 | deep_dive/transporter 38 | 39 | Event 40 | ---------------- 41 | .. toctree:: 42 | :maxdepth: 0 43 | 44 | deep_dive/event 45 | 46 | Defect & Service 47 | ----------------------- 48 | .. toctree:: 49 | :maxdepth: 0 50 | 51 | deep_dive/defect 52 | 53 | Logger 54 | ----------------------- 55 | .. toctree:: 56 | :maxdepth: 0 57 | 58 | deep_dive/logger 59 | 60 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/init/defaultValue.ini: -------------------------------------------------------------------------------- 1 | [Start_Queue] 2 | number_of_queue = 1 3 | settings = [{'queue_id':11,'location': [0, 0, 0], 'number_of_positions': 3, 'add_time': {'mean': 1, 'deviation': 0.2, 'type': 'normal'}, 'remove_time': {'mean': 1, 'deviation': 0.2, 'type': 'normal'}}] 4 | 5 | [End_Queue] 6 | number_of_queue = 1 7 | settings = [{'queue_id':9,'location': [0, 0, 0], 'add_time': {'mean': 1, 'deviation': 0.2, 'type': 'normal'}, 'remove_time': {'mean': 1, 'deviation': 0.2, 'type': 'normal'}}] 8 | 9 | [DeadLock_Queue] 10 | number_of_queue = 1 11 | settings = [{'location': [3, 3, 0], 'number_of_positions': 5, 'add_time': {'mean': 1, 'deviation': 0.2, 'type': 'normal'}, 'remove_time': {'mean': 1, 'deviation': 0.2, 'type': 'normal'}}] 12 | deadlock_waiting_time = 5 13 | 14 | [Distribution] 15 | type="normal" 16 | defect_random={'type':"random",'min':0,'max':0} 17 | 18 | 19 | [Transporter] 20 | start_location=[{'id':0,'location':[1,1,0]}] 21 | waiting_time=5 22 | 23 | [Machine] 24 | waiting_time=5 25 | -------------------------------------------------------------------------------- /ontologysim/Flask/instance/config.py: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | """ 3 | Copyright (c) 2019 - present AppSeed.us 4 | """ 5 | 6 | import os 7 | 8 | 9 | 10 | class Config(object): 11 | 12 | # Set up the App SECRET_KEY 13 | SECRET_KEY = 'S#perS3crEt_007' 14 | 15 | # This will create a file in FOLDER 16 | SQLALCHEMY_DATABASE_URI = 'sqlite:///ontologysim/ProductionSimulation/database/SimulationRun.db' 17 | 18 | 19 | class ProductionConfig(Config): 20 | DEBUG = False 21 | DATABASE = False 22 | 23 | class ProductionDataBaseConfig(Config): 24 | DEBUG = False 25 | DATABASE = True 26 | 27 | class DebugConfig(Config): 28 | DEBUG = True 29 | DATABASE = False 30 | 31 | class DebugConfigDataBase(Config): 32 | DEBUG = True 33 | DATABASE = True 34 | 35 | # Load all possible configurations 36 | config_dict = { 37 | 'Production': ProductionConfig, 38 | 'ProductionDataBase': ProductionDataBaseConfig, 39 | 'Debug': DebugConfig, 40 | 'DebugDataBase': DebugConfigDataBase 41 | } 42 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Simulation/eventModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "name": { 5 | "type": "string" 6 | }, 7 | "time": { 8 | "type": "number" 9 | }, 10 | "time_diff": { 11 | "type": "number" 12 | }, 13 | "type_logger": { 14 | "type": "string" 15 | }, 16 | "additional_type": { 17 | "type": "string" 18 | }, 19 | "product": { 20 | "type": "string" 21 | }, 22 | "position": { 23 | "type": "string" 24 | }, 25 | "position": { 26 | "type": "string" 27 | }, 28 | "position_info": { 29 | "type": "string" 30 | }, 31 | "machine": { 32 | "type": "string" 33 | }, 34 | "transport": { 35 | "type": "string" 36 | }, 37 | "process_id": { 38 | "type": "string" 39 | }, 40 | "location": { 41 | "type": "string" 42 | }, 43 | "task": { 44 | "type": "string" 45 | }, 46 | "number_of_parts": { 47 | "type": "integer" 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /docs/source/production_simulation/controller.rst: -------------------------------------------------------------------------------- 1 | Controller 2 | ============= 3 | 4 | How to create your own controller 5 | -------------------------------------- 6 | 7 | It is possible to define and integrate new controllers from outside the package. The instructions can be found here: 8 | :doc:`controller <../production_simulation/deep_dive/controller>` 9 | 10 | Machine Controller 11 | -------------------- 12 | .. toctree:: 13 | :maxdepth: 4 14 | 15 | controller/ProductionSimulation.controller.machine_controller 16 | 17 | Transporter Controller 18 | ------------------------ 19 | .. toctree:: 20 | :maxdepth: 3 21 | 22 | controller/ProductionSimulation.controller.transporter_controller 23 | 24 | Order Release Controller 25 | -------------------------- 26 | .. toctree:: 27 | :maxdepth: 2 28 | 29 | controller/ProductionSimulation.controller.order_release_controller 30 | 31 | Service Controller 32 | -------------------- 33 | .. toctree:: 34 | :maxdepth: 1 35 | 36 | controller/ProductionSimulation.controller.service_controller 37 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/controller.rst.txt: -------------------------------------------------------------------------------- 1 | Controller 2 | ============= 3 | 4 | How to create your own controller 5 | -------------------------------------- 6 | 7 | It is possible to define and integrate new controllers from outside the package. The instructions can be found here: 8 | :doc:`controller <../production_simulation/deep_dive/controller>` 9 | 10 | Machine Controller 11 | -------------------- 12 | .. toctree:: 13 | :maxdepth: 0 14 | 15 | controller/ProductionSimulation.controller.machine_controller 16 | 17 | Transporter Controller 18 | ------------------------ 19 | .. toctree:: 20 | :maxdepth: 0 21 | 22 | controller/ProductionSimulation.controller.transporter_controller 23 | 24 | Order Release Controller 25 | -------------------------- 26 | .. toctree:: 27 | :maxdepth: 0 28 | 29 | controller/ProductionSimulation.controller.order_release_controller 30 | 31 | Service Controller 32 | -------------------- 33 | .. toctree:: 34 | :maxdepth: 0 35 | 36 | controller/ProductionSimulation.controller.service_controller 37 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/ResetBEAction.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, Response, json, request 2 | from owlready2 import destroy_entity 3 | 4 | from ontologysim.Flask.Actions.APIAction import APIAction 5 | from ontologysim.Flask.Actions.UtilMethods.StateStorage import StateStorage 6 | from ontologysim.ProductionSimulation.init.Initializer import Initializer 7 | from ontologysim.ProductionSimulation.sim.Enum import Label 8 | 9 | 10 | class ResetBEAction(APIAction): 11 | """ 12 | get: /reset_be: destroy onto & reinit simcore 13 | """ 14 | 15 | def __call__(self, *args): 16 | self.action() 17 | 18 | 19 | try: 20 | self.flaskApp.init.s.destroyOnto() 21 | except: 22 | print("onto not defined") 23 | 24 | self.flaskApp.init.initSimCore() 25 | self.flaskApp.startAlready=False 26 | 27 | self.response = self.response200OK(json.dumps({"alreadyStarted": False, 28 | "run": False, "production": {}})) 29 | 30 | return self.response -------------------------------------------------------------------------------- /ontologysim/Flask/static/DataBase/connect.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "get": { 4 | "tags": [ 5 | "DataBase" 6 | ], 7 | "summary": "connect to db", 8 | "operationId": "db", 9 | "requestBody": { 10 | 11 | }, 12 | "responses": { 13 | "200": { 14 | "description": "", 15 | "content": { 16 | "application/json": { 17 | "schema": { 18 | "type": "object", 19 | "required": [ 20 | "message" 21 | ], 22 | "properties": { 23 | "message": { 24 | "type": "string" 25 | } 26 | } 27 | }, 28 | "examples": { 29 | "value": { 30 | "message": "OK" 31 | } 32 | } 33 | } 34 | } 35 | } 36 | }, 37 | "x-codegen-request-body-name": "body" 38 | } 39 | } -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/logger/Enum_Logger.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | 3 | 4 | class Logger_Enum(Enum): 5 | """ 6 | Logger enum 7 | """ 8 | 9 | MachineLogger="machine" 10 | ProductLogger="product" 11 | AllProductsLogger="all_products" 12 | QueueFillLevelLogger="queue" 13 | TransporterLogger="transporter" 14 | TransporterDistributionLogger="transporter_distribution" 15 | TransporterLocationLogger="transporter_location" 16 | SimLogger="sim" 17 | 18 | class Logger_Type_Enum(Enum): 19 | """ 20 | defines type of logging 21 | """ 22 | All="all" 23 | Time="time" 24 | Summary="summary" 25 | Not="not" 26 | 27 | class Folder_name(Enum): 28 | """ 29 | defines the folder name for the logger 30 | """ 31 | machine = "machine" 32 | ini = "_ini" 33 | product = "product" 34 | queue = "queue" 35 | events = "events" 36 | sim = "sim" 37 | transporter = "transporter" 38 | transporter_distribution = "transporter_distribution" 39 | transporter_location = "transporter_location" -------------------------------------------------------------------------------- /example/config/archive/product_0.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 8 | 9 | 10 | 11 | 12 | source 13 | 14 | 15 | 16 | 17 | sink 18 | 19 | 20 | 21 | 22 | 0 23 | 24 | 25 | 26 | 27 | 1 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/config/archive/product_1.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | sink 13 | 14 | 15 | 16 | 17 | 0 18 | 19 | 20 | 21 | 22 | 0 23 | 24 | 25 | 26 | 27 | 1 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/init/API/IntitializerProducttypeAPI.py: -------------------------------------------------------------------------------- 1 | 2 | import inspect 3 | import os 4 | import sys 5 | 6 | from ontologysim.ProductionSimulation.sim.ProductType import ProductType 7 | 8 | current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) 9 | parent_dir = os.path.dirname(current_dir) 10 | sys.path.insert(0, parent_dir) 11 | 12 | 13 | 14 | from ontologysim.ProductionSimulation.sim.Central import Central 15 | from ontologysim.ProductionSimulation.sim.SimCore import SimCore 16 | 17 | from ontologysim.ProductionSimulation.sim.ProductTypeNet.Process import Process 18 | 19 | 20 | class InitializerProducttypeAPI: 21 | """ 22 | initialize all needed objects to create procudttype 23 | """ 24 | 25 | def __init__(self): 26 | """ 27 | 28 | """ 29 | self.s = SimCore() 30 | 31 | 32 | self.s.central = Central(self.s) 33 | self.s.product_type = ProductType(self.s) 34 | self.s.process = Process(self.s) 35 | 36 | self.s.createOWLStructure() 37 | self.s.central.init_class() 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/Simulation/OwlDonwloadAction.py: -------------------------------------------------------------------------------- 1 | from ontologysim.Flask.Actions.APIAction import APIAction 2 | from ontologysim.ProductionSimulation.utilities.path_utilities import PathTest 3 | from flask import Flask, Response, json, request 4 | 5 | class OwlDownloadAction(APIAction): 6 | """ 7 | get: /simulation/download/owl: sending owl file via string 8 | """ 9 | 10 | def __call__(self, *args): 11 | """ 12 | 13 | :param args: 14 | :return: 15 | """ 16 | self.action() 17 | 18 | if(self.flaskApp.startAlready): 19 | defaultPath="/ontologysim/Flask/Assets/DefaultSaveFolder/saved.owl" 20 | print(PathTest.check_dir_path(defaultPath)) 21 | self.flaskApp.simCore.save_ontology(defaultPath) 22 | f = open(PathTest.check_file_path(defaultPath), "r") 23 | fString= f.read() 24 | 25 | self.response=self.response200OK(json.dumps({"file":fString})) 26 | 27 | else: 28 | self.response= self.response400BadRequest("simulation not started") 29 | 30 | return self.response -------------------------------------------------------------------------------- /example/before_process_change/product_0.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 8 | 9 | 10 | 11 | 12 | source 13 | 14 | 15 | 16 | 17 | sink 18 | 19 | 20 | 21 | 22 | 0 23 | 24 | 25 | 26 | 27 | 1 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/before_process_change/product_1.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | sink 13 | 14 | 15 | 16 | 17 | 0 18 | 19 | 20 | 21 | 22 | 0 23 | 24 | 25 | 26 | 27 | 1 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/source/production_simulation/generator/tests.util.rst: -------------------------------------------------------------------------------- 1 | Generator 2 | --------------------------- 3 | 4 | .. automodule:: tests.util.Generator 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | ControllerGenerator module 10 | ------------------------------------- 11 | 12 | .. automodule:: tests.util.ControllerGenerator 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | 18 | LoggerGenerator 19 | --------------------------------- 20 | 21 | .. automodule:: tests.util.LoggerGenerator 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | OwlGenerator 27 | ------------------------------ 28 | 29 | .. automodule:: tests.util.OwlGenerator 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | ProductionGenerator 35 | ------------------------------------- 36 | 37 | .. automodule:: tests.util.ProductionGenerator 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | Timeout 43 | ------------------------- 44 | 45 | .. automodule:: tests.util.Timeout 46 | :members: 47 | :undoc-members: 48 | :show-inheritance: 49 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/generator/tests.util.rst.txt: -------------------------------------------------------------------------------- 1 | Generator 2 | --------------------------- 3 | 4 | .. automodule:: tests.util.Generator 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | ControllerGenerator module 10 | ------------------------------------- 11 | 12 | .. automodule:: tests.util.ControllerGenerator 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | 18 | LoggerGenerator 19 | --------------------------------- 20 | 21 | .. automodule:: tests.util.LoggerGenerator 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | OwlGenerator 27 | ------------------------------ 28 | 29 | .. automodule:: tests.util.OwlGenerator 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | ProductionGenerator 35 | ------------------------------------- 36 | 37 | .. automodule:: tests.util.ProductionGenerator 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | Timeout 43 | ------------------------- 44 | 45 | .. automodule:: tests.util.Timeout 46 | :members: 47 | :undoc-members: 48 | :show-inheritance: 49 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Simulation/loadFiles.json: -------------------------------------------------------------------------------- 1 | { 2 | "get": { 3 | "tags": [ 4 | "Simulation" 5 | ], 6 | "summary": "all file names from default directory", 7 | "operationId": "loadFiles", 8 | "responses": { 9 | "200": { 10 | "description": "file names from default directory", 11 | "content": { 12 | "application/json": { 13 | "schema": { 14 | "type": "object", 15 | "required": [ 16 | "files" 17 | ], 18 | "properties": { 19 | "files": { 20 | "type": "array", 21 | "items": { 22 | "type": "string" 23 | } 24 | } 25 | } 26 | }, 27 | "example": 28 | { 29 | "files": [ 30 | "controller_config.ini", 31 | "logger_config_lvl3.ini", 32 | "owl_config.ini", 33 | "production_config_lvl3.ini" 34 | ] 35 | } 36 | } 37 | } 38 | } 39 | 40 | 41 | }, 42 | 43 | "x-codegen-request-body-name": "body" 44 | } 45 | } -------------------------------------------------------------------------------- /docs/source/flask/actions/Flask.Actions.rst: -------------------------------------------------------------------------------- 1 | 2 | APIAction 3 | ------------------------------ 4 | 5 | .. automodule:: ontologysim.Flask.Actions.APIAction 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | ComponentIdAction 11 | ------------------------------------ 12 | 13 | .. automodule:: ontologysim.Flask.Actions.CommentIdAction 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | ComponentAction 19 | ------------------------------------ 20 | 21 | .. automodule:: ontologysim.Flask.Actions.ComponentAction 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | GetIdsAction 27 | --------------------------------- 28 | 29 | .. automodule:: ontologysim.Flask.Actions.GetIdsAction 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | 35 | TestAction 36 | ------------------------------- 37 | 38 | .. automodule:: ontologysim.Flask.Actions.TestAction 39 | :members: 40 | :undoc-members: 41 | :show-inheritance: 42 | 43 | ResetBEAction 44 | --------------------------------------------- 45 | 46 | .. automodule:: ontologysim.Flask.Actions.ResetBEAction 47 | :members: 48 | :undoc-members: 49 | :show-inheritance: -------------------------------------------------------------------------------- /docs/build/_sources/flask/actions/Flask.Actions.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | APIAction 3 | ------------------------------ 4 | 5 | .. automodule:: ontologysim.Flask.Actions.APIAction 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | ComponentIdAction 11 | ------------------------------------ 12 | 13 | .. automodule:: ontologysim.Flask.Actions.CommentIdAction 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | ComponentAction 19 | ------------------------------------ 20 | 21 | .. automodule:: ontologysim.Flask.Actions.ComponentAction 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | GetIdsAction 27 | --------------------------------- 28 | 29 | .. automodule:: ontologysim.Flask.Actions.GetIdsAction 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | 35 | TestAction 36 | ------------------------------- 37 | 38 | .. automodule:: ontologysim.Flask.Actions.TestAction 39 | :members: 40 | :undoc-members: 41 | :show-inheritance: 42 | 43 | ResetBEAction 44 | --------------------------------------------- 45 | 46 | .. automodule:: ontologysim.Flask.Actions.ResetBEAction 47 | :members: 48 | :undoc-members: 49 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/production_simulation/ini/ProductionSimulation.init.rst: -------------------------------------------------------------------------------- 1 | 2 | 3 | Initializer 4 | -------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.init.Initializer 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | Transform Logger ini 12 | -------------------------------------------- 13 | 14 | .. automodule:: ontologysim.ProductionSimulation.init.TransformLoggerIni 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | 19 | Transform Production ini 20 | -------------------------------------------- 21 | 22 | .. automodule:: ontologysim.ProductionSimulation.init.TransformProductionIni 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | 27 | Petrinet generator 28 | -------------------------------------------- 29 | 30 | .. automodule:: ontologysim.ProductionSimulation.init.petrinet_generator 31 | :members: 32 | :undoc-members: 33 | :show-inheritance: 34 | 35 | 36 | 37 | API: Initializer Producttype 38 | -------------------------------------------- 39 | 40 | .. automodule:: ontologysim.ProductionSimulation.init.API.IntitializerProducttypeAPI 41 | :members: 42 | :undoc-members: 43 | :show-inheritance: -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/ini/ProductionSimulation.init.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Initializer 4 | -------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.init.Initializer 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | Transform Logger ini 12 | -------------------------------------------- 13 | 14 | .. automodule:: ontologysim.ProductionSimulation.init.TransformLoggerIni 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | 19 | Transform Production ini 20 | -------------------------------------------- 21 | 22 | .. automodule:: ontologysim.ProductionSimulation.init.TransformProductionIni 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | 27 | Petrinet generator 28 | -------------------------------------------- 29 | 30 | .. automodule:: ontologysim.ProductionSimulation.init.petrinet_generator 31 | :members: 32 | :undoc-members: 33 | :show-inheritance: 34 | 35 | 36 | 37 | API: Initializer Producttype 38 | -------------------------------------------- 39 | 40 | .. automodule:: ontologysim.ProductionSimulation.init.API.IntitializerProducttypeAPI 41 | :members: 42 | :undoc-members: 43 | :show-inheritance: -------------------------------------------------------------------------------- /ontologysim/Flask/static/Production/Machine.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "input_queue", 5 | "kpi", 6 | "location", 7 | "output_queue", 8 | "process_queue", 9 | "prod_process", 10 | "state" 11 | ], 12 | "properties": { 13 | "input_queue": { 14 | "type": "array", 15 | "items": { 16 | "type": "string" 17 | } 18 | }, 19 | "output_queue": { 20 | "type": "array", 21 | "items": { 22 | "type": "string" 23 | } 24 | }, 25 | "process_queue": { 26 | "type": "array", 27 | "items": { 28 | "type": "string" 29 | } 30 | }, 31 | "kpi": { 32 | "type": "object", 33 | "properties": { 34 | "name": { 35 | "type": "float" 36 | } 37 | } 38 | }, 39 | "location": { 40 | "type": "array", 41 | "items": { 42 | "type": "int" 43 | } 44 | }, 45 | "prod_process": { 46 | "type": "object", 47 | "properties": { 48 | "deviation": "float", 49 | "label": "string", 50 | "mean": "float", 51 | "type": "string" 52 | } 53 | }, 54 | "state": { 55 | "type": "object" 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /docs/source/production_simulation/utility/ProductionSimulation.utilities.rst: -------------------------------------------------------------------------------- 1 | 2 | 3 | Event utilities 4 | ----------------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.utilities.event_utilities 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | Init utilities 12 | ----------------------------------------------------- 13 | 14 | .. automodule:: ontologysim.ProductionSimulation.utilities.init_utilities 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | 19 | Path utilities 20 | ----------------------------------------------------- 21 | 22 | .. automodule:: ontologysim.ProductionSimulation.utilities.path_utilities 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | 27 | Pnml utilities 28 | ----------------------------------------------------- 29 | 30 | .. automodule:: ontologysim.ProductionSimulation.utilities.pnml_utilities 31 | :members: 32 | :undoc-members: 33 | :show-inheritance: 34 | 35 | Sub class utilities 36 | ----------------------------------------------------- 37 | 38 | .. automodule:: ontologysim.ProductionSimulation.utilities.sub_class_utilities 39 | :members: 40 | :undoc-members: 41 | :show-inheritance: 42 | 43 | 44 | -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation.rst: -------------------------------------------------------------------------------- 1 | Simulation 2 | ============= 3 | 4 | All around sim core 5 | ----------------------- 6 | .. toctree:: 7 | :maxdepth: 0 8 | 9 | simulation/ProductionSimulation.sim.SimCore 10 | 11 | Product related 12 | -------------------- 13 | 14 | .. toctree:: 15 | :maxdepth: 0 16 | 17 | simulation/ProductionSimulation.sim.Product 18 | 19 | 20 | Transporter 21 | ----------------- 22 | 23 | .. toctree:: 24 | :maxdepth: 0 25 | 26 | simulation/ProductionSimulation.sim.Transporter 27 | 28 | Machine 29 | ----------- 30 | 31 | .. toctree:: 32 | :maxdepth: 0 33 | 34 | simulation/ProductionSimulation.sim.Machine 35 | 36 | Subelements 37 | ---------------- 38 | .. toctree:: 39 | :maxdepth: 1 40 | 41 | simulation/ProductionSimulation.sim.Subelements 42 | 43 | Order release related 44 | ----------------------- 45 | .. toctree:: 46 | :maxdepth: 0 47 | 48 | simulation/ProductionSimulation.sim.OrderRelease 49 | 50 | Event 51 | ----------- 52 | .. toctree:: 53 | :maxdepth: 0 54 | 55 | simulation/ProductionSimulation.sim.Event 56 | 57 | 58 | Repair Service 59 | ------------------ 60 | 61 | .. toctree:: 62 | :maxdepth: 0 63 | 64 | simulation/ProductionSimulation.sim.RepairService 65 | 66 | 67 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/utility/ProductionSimulation.utilities.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Event utilities 4 | ----------------------------------------------------- 5 | 6 | .. automodule:: ontologysim.ProductionSimulation.utilities.event_utilities 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | Init utilities 12 | ----------------------------------------------------- 13 | 14 | .. automodule:: ontologysim.ProductionSimulation.utilities.init_utilities 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | 19 | Path utilities 20 | ----------------------------------------------------- 21 | 22 | .. automodule:: ontologysim.ProductionSimulation.utilities.path_utilities 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | 27 | Pnml utilities 28 | ----------------------------------------------------- 29 | 30 | .. automodule:: ontologysim.ProductionSimulation.utilities.pnml_utilities 31 | :members: 32 | :undoc-members: 33 | :show-inheritance: 34 | 35 | Sub class utilities 36 | ----------------------------------------------------- 37 | 38 | .. automodule:: ontologysim.ProductionSimulation.utilities.sub_class_utilities 39 | :members: 40 | :undoc-members: 41 | :show-inheritance: 42 | 43 | 44 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation.rst.txt: -------------------------------------------------------------------------------- 1 | Simulation 2 | ============= 3 | 4 | All around sim core 5 | ----------------------- 6 | .. toctree:: 7 | :maxdepth: 0 8 | 9 | simulation/ProductionSimulation.sim.SimCore 10 | 11 | Product related 12 | -------------------- 13 | 14 | .. toctree:: 15 | :maxdepth: 0 16 | 17 | simulation/ProductionSimulation.sim.Product 18 | 19 | 20 | Transporter 21 | ----------------- 22 | 23 | .. toctree:: 24 | :maxdepth: 0 25 | 26 | simulation/ProductionSimulation.sim.Transporter 27 | 28 | Machine 29 | ----------- 30 | 31 | .. toctree:: 32 | :maxdepth: 0 33 | 34 | simulation/ProductionSimulation.sim.Machine 35 | 36 | Subelements 37 | ---------------- 38 | .. toctree:: 39 | :maxdepth: 1 40 | 41 | simulation/ProductionSimulation.sim.Subelements 42 | 43 | Order release related 44 | ----------------------- 45 | .. toctree:: 46 | :maxdepth: 0 47 | 48 | simulation/ProductionSimulation.sim.OrderRelease 49 | 50 | Event 51 | ----------- 52 | .. toctree:: 53 | :maxdepth: 0 54 | 55 | simulation/ProductionSimulation.sim.Event 56 | 57 | 58 | Repair Service 59 | ------------------ 60 | 61 | .. toctree:: 62 | :maxdepth: 0 63 | 64 | simulation/ProductionSimulation.sim.RepairService 65 | 66 | 67 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Other/reset_be.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "get": { 4 | "tags": [ 5 | "Other" 6 | ], 7 | "summary": "resetting the backend, new init of simCore", 8 | "operationId": "resetBe", 9 | "responses": { 10 | "200": { 11 | "description": "the example is the only possible output", 12 | "content": { 13 | "application/json": { 14 | "schema": { 15 | "type": "object", 16 | "required": [ 17 | "alreadyStarted", 18 | "run", 19 | "production" 20 | ], 21 | "properties": { 22 | "alreadyStarted": { 23 | "type": "boolean" 24 | }, 25 | "run": { 26 | "type": "boolean" 27 | }, 28 | "production": { 29 | "type": "object" 30 | } 31 | } 32 | }, 33 | "examples":{ 34 | "value": 35 | 36 | {"alreadyStarted": "False", 37 | "run": "False", "production": {} 38 | } 39 | } 40 | 41 | } 42 | } 43 | }, 44 | "x-codegen-request-body-name": "body" 45 | } 46 | } -------------------------------------------------------------------------------- /docs/source/configs/owl/owl_config.rst: -------------------------------------------------------------------------------- 1 | OWL ini 2 | ============== 3 | 4 | in this ini the owl-path and save options are defined. 5 | 6 | Main structure 7 | ---------------- 8 | 9 | after each controller type e.g. machine, there needs to be a dict with the following keys: 10 | 11 | .. list-table:: 12 | :widths: 20 80 13 | :header-rows: 1 14 | 15 | * - Key 16 | - Value 17 | * - java_path 18 | - defines the java path to your jre or jdk java version 19 | * - owl_save_path 20 | - default list of save options [{'type','save':bool (True or False),'path':relative_path}] 21 | 22 | the following types are defined: 23 | 24 | * production_without_task_defect: saves the plain production without task and defect in an owl-file 25 | * production: saves the complete production in an owl-file 26 | 27 | Example 28 | --------- 29 | 30 | this file is available in ``example/config/owl_config.ini`` 31 | 32 | .. code-block:: JSON 33 | 34 | [OWL] 35 | java_path="C:/Program Files (x86)/Java/jre1.8.0_261/bin/java.exe" 36 | owl_save_path=[{'type':"production_without_task_defect",'save':True,'path':"/example/owl/production_without_task_defect.owl"}, 37 | {'type':"production",'save':True,'path':"/example/owl/production.owl"} 38 | ] 39 | 40 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/controller/machine_controller/MachineController_EDD.py: -------------------------------------------------------------------------------- 1 | from collections import defaultdict 2 | 3 | from ontologysim.ProductionSimulation.controller.machine_controller.MachineController import MachineController 4 | from ontologysim.ProductionSimulation.sim.Enum import Queue_Enum 5 | 6 | 7 | class MachineController_EDD(MachineController): 8 | """ 9 | EDD= Earlist Due Date, since there is currently no due date, the start time is used for the production of the part 10 | """ 11 | 12 | def sort_products(self, machine_onto): 13 | """ 14 | output of all products in the machine queue, scheduled after EDD 15 | 16 | :param machine_onto: 17 | :return: 18 | """ 19 | erg_queue = machine_onto.has_for_input_queue 20 | erg = [] 21 | for queue in erg_queue: 22 | position_list = queue.has_for_position 23 | for position in position_list: 24 | for product in position.has_for_product: 25 | if product.blocked_for_machine == 0 and product.has_for_product_state[0].state_name != "sink": 26 | erg.append([product, product.start_of_production_time]) 27 | erg.sort(key=lambda x: x[1]) 28 | 29 | return erg 30 | -------------------------------------------------------------------------------- /docs/build/_sources/configs/owl/owl_config.rst.txt: -------------------------------------------------------------------------------- 1 | OWL ini 2 | ============== 3 | 4 | in this ini the owl-path and save options are defined. 5 | 6 | Main structure 7 | ---------------- 8 | 9 | after each controller type e.g. machine, there needs to be a dict with the following keys: 10 | 11 | .. list-table:: 12 | :widths: 20 80 13 | :header-rows: 1 14 | 15 | * - Key 16 | - Value 17 | * - java_path 18 | - defines the java path to your jre or jdk java version 19 | * - owl_save_path 20 | - default list of save options [{'type','save':bool (True or False),'path':relative_path}] 21 | 22 | the following types are defined: 23 | 24 | * production_without_task_defect: saves the plain production without task and defect in an owl-file 25 | * production: saves the complete production in an owl-file 26 | 27 | Example 28 | --------- 29 | 30 | this file is available in ``example/config/owl_config.ini`` 31 | 32 | .. code-block:: JSON 33 | 34 | [OWL] 35 | java_path="C:/Program Files (x86)/Java/jre1.8.0_261/bin/java.exe" 36 | owl_save_path=[{'type':"production_without_task_defect",'save':True,'path':"/example/owl/production_without_task_defect.owl"}, 37 | {'type':"production",'save':True,'path':"/example/owl/production.owl"} 38 | ] 39 | 40 | -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/database/models/QueueKPI.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String, Text, Float, TypeDecorator 2 | from sqlalchemy.orm import relationship, backref 3 | 4 | from ontologysim.ProductionSimulation.database.models.Base import Base 5 | from sqlalchemy.ext.declarative import declarative_base 6 | 7 | 8 | class QueueKPI(Base): 9 | __tablename__ = 'QueueKPI' 10 | id = Column(Integer, primary_key=True) 11 | name = Column(String,nullable=True) 12 | FillLevel = Column(Float(decimal_return_scale=7,asdecimal=True),nullable=True) 13 | simulationRunID = Column(Integer, ForeignKey("SimulationRun.id"),nullable=True) 14 | 15 | class QueueTimeKPIValue(Base): 16 | __tablename__ = 'QueueTimeKPIValue' 17 | id = Column(Integer, primary_key=True) 18 | time = Column(Float(decimal_return_scale=7,asdecimal=True), nullable=True) 19 | FillLevel = Column(Float(decimal_return_scale=7, asdecimal=True), nullable=True) 20 | queueTimeKPIID = Column(Integer, ForeignKey("QueueTimeKPI.id"),nullable=True) 21 | 22 | 23 | class QueueTimeKPI(Base): 24 | __tablename__ = 'QueueTimeKPI' 25 | id = Column(Integer, primary_key=True) 26 | name = Column(String) 27 | queueTimeKPIValue = relationship(QueueTimeKPIValue) 28 | simulationRunID = Column(Integer, ForeignKey("SimulationRun.id"), nullable=True) -------------------------------------------------------------------------------- /ontologysim/Flask/FlaskMain.py: -------------------------------------------------------------------------------- 1 | import inspect 2 | import os 3 | import sys 4 | 5 | 6 | current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) 7 | parent_dir = os.path.dirname(current_dir) 8 | parent_parent_dir = os.path.dirname(parent_dir) 9 | sys.path.insert(0, parent_dir) 10 | sys.path.insert(0,parent_parent_dir) 11 | 12 | 13 | 14 | from ontologysim.Flask.FlaskApp import FlaskAppWrapper 15 | #if not set as path variable 16 | #owlready2.owlready2.JAVA_EXE = java path 17 | 18 | #path to example 19 | 20 | from ontologysim.ProductionSimulation.init.Initializer import Initializer; 21 | 22 | 23 | 24 | 25 | def main(): 26 | init = Initializer(current_dir) 27 | 28 | production_config_path = "/ontologysim/Flask/Assets/DefaultFiles/production_config_lvl3.ini" 29 | owl_config_path = "/ontologysim/Flask/Assets/DefaultFiles/owl_config.ini" 30 | controller_config_path = "/ontologysim/Flask/Assets/DefaultFiles/controller_config.ini" 31 | logger_config_path = "/ontologysim/Flask/Assets/DefaultFiles/logger_config_lvl3.ini" 32 | a = FlaskAppWrapper('wrap', init, {'production': production_config_path, 'owl': owl_config_path, 33 | 'controller': controller_config_path, 'logger': logger_config_path}) 34 | a.addSwaggerUI() 35 | a.run() 36 | 37 | if( __name__ == "__main__"): 38 | main() 39 | 40 | -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/DataBase/GetSimulationRunAction.py: -------------------------------------------------------------------------------- 1 | import inspect 2 | import json 3 | import os 4 | import sys 5 | 6 | from ontologysim.Flask.Actions.APIAction import APIAction 7 | from ontologysim.ProductionSimulation.database.models.SimulationRun import SimulationRun 8 | from ontologysim.ProductionSimulation.database.models.User import User 9 | 10 | 11 | class GetSimulationRunAction(APIAction): 12 | """ 13 | 14 | /database/simulationrun: /get: get all elements of simulationRun table 15 | """ 16 | def __call__(self, *args): 17 | """ 18 | 19 | :param args: 20 | :return: 21 | """ 22 | self.action() 23 | 24 | 25 | simulation_list = [] 26 | 27 | session=self.flaskApp.db.createSession(self.flaskApp.db.db_engine) 28 | 29 | #for row in self.flaskApp.db.db_engine.execute("SELECT * FROM SimulationRun"): 30 | # print(row) 31 | 32 | 33 | 34 | for simulation_run in session.query(SimulationRun).all(): 35 | 36 | simulation_dict = {} 37 | simulation_dict["id"] = simulation_run.id 38 | simulation_dict["start"] = str(simulation_run.start) 39 | #print(simulation_dict) 40 | simulation_list.append(simulation_dict) 41 | 42 | self.response = self.response200OK(json.dumps({"result": simulation_list})) 43 | return self.response -------------------------------------------------------------------------------- /example/config/archive/matrix_print_config.ini: -------------------------------------------------------------------------------- 1 | 2 | [EventLogger] 3 | #setting={'type':"csv and database",'path_csv':"/log/main_log.csv"} 4 | #setting={'type':"database",'path_csv':""} 5 | setting={'type':"csv",'path_csv':"/example/log/main_log.csv"} 6 | 7 | 8 | [DataBase] 9 | connection_string=(r"Driver={SQL Server};" 10 | r"Server=DESKTOP-F5CM3H1;" 11 | r"Trusted_connection=yes;") 12 | database_name="logger" 13 | 14 | 15 | [QueueLogger] 16 | setting={'type':"csv",'path_csv':"/example/log/queue_log.csv"} 17 | #setting={'type':"database",'path_csv':""} 18 | #setting={'type':"csv and database",'path_csv':"/log/queue_log.csv"} 19 | #'time_intervall' 20 | 21 | [MachineLogger] 22 | setting={'type':"csv",'path_csv':"/example/log/machine_log.csv"} 23 | #setting={'type':"database",'path_csv':""} 24 | #setting={'type':"csv and database",'path_csv':"/log/machine_log.csv"} 25 | 26 | [TransportLogger] 27 | setting={'type':"csv",'path_csv':"/example/log/transport_log.csv"} 28 | #setting={'type':"database",'path_csv':""} 29 | #setting={'type':"csv and database",'path_csv':"/log/transport_log.csv"} 30 | 31 | [ProductFinishedLogger] 32 | setting={'type':"csv",'path_csv':"/example/log/product_finished_log.csv"} 33 | #setting={'type':"database",'path_csv':""} 34 | #setting={'type':"csv and database",'path_csv':"/log/product_finished_log.csv"} 35 | 36 | [OWL] 37 | setting={'path':"/example/owl/production_after_run.owl"} -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/utilities/sub_class_utilities.py: -------------------------------------------------------------------------------- 1 | class SubClassUtility: 2 | """ 3 | given a parent class and it finds all sub classes 4 | """ 5 | @classmethod 6 | def get_all_subclasses(cls, python_class): 7 | """ 8 | Helper function to get all the subclasses of a class. 9 | 10 | :param python_class: Any Python class that implements __subclasses__() 11 | :return: [] 12 | """ 13 | 14 | subclasses = set() 15 | check_these = [python_class] 16 | 17 | while check_these: 18 | parent = check_these.pop() 19 | for child in parent.__subclasses__(): 20 | 21 | if child not in subclasses: 22 | subclasses.add(child) 23 | check_these.append(child) 24 | 25 | return sorted(subclasses, key=lambda x: x.__name__) 26 | 27 | @classmethod 28 | def get_all_subclasses_dict(self, python_class): 29 | """ 30 | Helper function to get all the subclasses of a class. 31 | 32 | :param python_class: Any Python class that implements __subclasses__() 33 | :return: dict 34 | """ 35 | class_dict = {} 36 | for subclass in self.get_all_subclasses(python_class): 37 | class_dict[subclass.__name__] = subclass 38 | class_dict[python_class.__name__] = python_class 39 | 40 | return class_dict 41 | -------------------------------------------------------------------------------- /ontologysim/Flask/static/Simulation/productionModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "DeadlockQueue", 5 | "EndQueue", 6 | "Machine", 7 | "MachineQueue", 8 | "Position", 9 | "ProcessQueue", 10 | "Product", 11 | "ProductType", 12 | "StartQueue", 13 | "Task", 14 | "Transporter", 15 | "TransporterQueue" 16 | ], 17 | "properties": { 18 | "DeadlockQueue": { 19 | "$ref": "../Production/DeadlockQueue.json" 20 | }, 21 | "EndQueue": { 22 | "$ref": "../Production/EndQueue.json" 23 | }, 24 | "Machine": { 25 | "$ref": "../Production/Machine.json" 26 | }, 27 | "MachineQueue": { 28 | "$ref": "../Production/MachineQueue.json" 29 | }, 30 | "Position": { 31 | "$ref": "../Production/Position.json" 32 | }, 33 | "ProcessQueue": { 34 | "$ref": "../Production/ProcessQueue.json" 35 | }, 36 | "Product": { 37 | "$ref": "../Production/Product.json" 38 | }, 39 | "ProductType": { 40 | "$ref": "../Production/ProductType.json" 41 | }, 42 | "StartQueue": { 43 | "$ref": "../Production/StartQueue.json" 44 | }, 45 | "Task": { 46 | "$ref": "../Production/Task.json" 47 | }, 48 | "Transporter": { 49 | "$ref": "../Production/Transporter.json" 50 | }, 51 | "TransporterQueue": { 52 | "$ref": "../Production/TransporterQueue.json" 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /ontologysim/Flask/static/DataBase/simulationrun.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "get": { 4 | "tags": [ 5 | "DataBase" 6 | ], 7 | "summary": "get simulation table", 8 | "operationId": "get simulation", 9 | "requestBody": { 10 | "description": "provides id list of process", 11 | "content": { 12 | "application/json": { 13 | } 14 | }, 15 | "required": true 16 | }, 17 | "responses": { 18 | "400": { 19 | "description": "request body is not correct", 20 | "content": {} 21 | }, 22 | "200": { 23 | "description": "request body is not correct", 24 | "content": { 25 | "application/json": { 26 | "schema": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "./SimulationRunModel.json" 30 | } 31 | }, 32 | "examples": { 33 | "value": { 34 | "result": [ 35 | { 36 | "id": 1, 37 | "start": "20.01.2021", 38 | "number_of_parts": 1 39 | } 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /ontologysim/Flask/Actions/Simulation/SimulationLoadAction.py: -------------------------------------------------------------------------------- 1 | from flask import json, request 2 | 3 | from ontologysim.Flask.Actions.APIAction import APIAction 4 | from ontologysim.ProductionSimulation.init.API.IntitializerProducttypeAPI import InitializerProducttypeAPI 5 | 6 | import os 7 | from os import listdir 8 | from os.path import isfile, join 9 | 10 | from ontologysim.ProductionSimulation.utilities.path_utilities import PathTest 11 | 12 | 13 | class SimulationLoadAction(APIAction): 14 | """ 15 | parent class for simulation load, define default path 16 | """ 17 | 18 | def __init__(self,action, flaskApp): 19 | """ 20 | 21 | :param action: 22 | :param flaskApp: 23 | """ 24 | super().__init__(action, flaskApp) 25 | self.path="/ontologysim/Flask/Assets/DefaultFiles" 26 | 27 | self.fullPath = PathTest.check_dir_path_current_dir_given(self.path,os.path.dirname(__file__)) 28 | 29 | class FileLoadAction(SimulationLoadAction): 30 | """ 31 | get: /load_files: return all file names from default directory 32 | """ 33 | 34 | def __call__(self, *args): 35 | """ 36 | 37 | :param args: 38 | :return: 39 | """ 40 | self.action() 41 | 42 | onlyfiles = [f for f in listdir(self.fullPath) if isfile(join(self.fullPath, f))] 43 | 44 | self.response=self.response200OK(json.dumps({"files":onlyfiles})) 45 | 46 | return self.response 47 | 48 | -------------------------------------------------------------------------------- /example/controller/MachineController_FIFO2.py: -------------------------------------------------------------------------------- 1 | from collections import defaultdict 2 | 3 | from ontologysim.ProductionSimulation.controller.machine_controller.MachineController import MachineController 4 | from ontologysim.ProductionSimulation.sim.Enum import Queue_Enum 5 | 6 | 7 | class MachineController_FIFO2(MachineController): 8 | 9 | def sort_products(self,machine_onto): 10 | """ 11 | 12 | :param machine_onto: 13 | :return: 14 | """ 15 | erg_queue = machine_onto.has_for_input_queue 16 | erg = [] 17 | for queue in erg_queue: 18 | position_list = queue.has_for_position 19 | for position in position_list: 20 | for product in position.has_for_product: 21 | #product.marking != "sink" 22 | if product.blocked_for_machine == 0 and product.has_for_product_state[0].state_name != "sink": 23 | event_list = position.is_position_event_of 24 | for event in event_list: 25 | if event.type == Queue_Enum.Change.value: 26 | erg.append([product, event.time]) 27 | erg.sort(key=lambda x: x[1]) 28 | 29 | res = defaultdict(list) 30 | for v, k in erg: res[v].append(k) 31 | 32 | # TODO optimization add type directly 33 | erg = [[k, v[-1]] for k, v in res.items()] 34 | erg.sort(key=lambda x: x[1]) 35 | return erg -------------------------------------------------------------------------------- /example/config/archive/product_10.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 8 | 9 | 10 | 11 | 12 | sink 13 | 14 | 15 | 16 | 17 | source 18 | 19 | 20 | 21 | 22 | 1 23 | 24 | 25 | 26 | 27 | 4 28 | 29 | 30 | 31 | 32 | 3 33 | 34 | 35 | 36 | 37 | 5 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_11.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 1 13 | 14 | 15 | 16 | 17 | 0 18 | 19 | 20 | 21 | 22 | sink 23 | 24 | 25 | 26 | 27 | 5 28 | 29 | 30 | 31 | 32 | 3 33 | 34 | 35 | 36 | 37 | 7 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_12.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 1 13 | 14 | 15 | 16 | 17 | 0 18 | 19 | 20 | 21 | 22 | sink 23 | 24 | 25 | 26 | 27 | 4 28 | 29 | 30 | 31 | 32 | 5 33 | 34 | 35 | 36 | 37 | 6 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_13.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 1 8 | 9 | 10 | 11 | 12 | sink 13 | 14 | 15 | 16 | 17 | source 18 | 19 | 20 | 21 | 22 | 0 23 | 24 | 25 | 26 | 27 | 6 28 | 29 | 30 | 31 | 32 | 5 33 | 34 | 35 | 36 | 37 | 7 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_14.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 1 8 | 9 | 10 | 11 | 12 | sink 13 | 14 | 15 | 16 | 17 | source 18 | 19 | 20 | 21 | 22 | 0 23 | 24 | 25 | 26 | 27 | 5 28 | 29 | 30 | 31 | 32 | 4 33 | 34 | 35 | 36 | 37 | 8 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_15.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 0 13 | 14 | 15 | 16 | 17 | 1 18 | 19 | 20 | 21 | 22 | sink 23 | 24 | 25 | 26 | 27 | 5 28 | 29 | 30 | 31 | 32 | 8 33 | 34 | 35 | 36 | 37 | 7 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_2.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | sink 13 | 14 | 15 | 16 | 17 | 0 18 | 19 | 20 | 21 | 22 | 1 23 | 24 | 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | 5 33 | 34 | 35 | 36 | 37 | 3 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_3.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 0 13 | 14 | 15 | 16 | 17 | sink 18 | 19 | 20 | 21 | 22 | 1 23 | 24 | 25 | 26 | 27 | 6 28 | 29 | 30 | 31 | 32 | 1 33 | 34 | 35 | 36 | 37 | 0 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_4.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 0 13 | 14 | 15 | 16 | 17 | 1 18 | 19 | 20 | 21 | 22 | sink 23 | 24 | 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | 2 33 | 34 | 35 | 36 | 37 | 3 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_5.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 8 | 9 | 10 | 11 | 12 | sink 13 | 14 | 15 | 16 | 17 | source 18 | 19 | 20 | 21 | 22 | 1 23 | 24 | 25 | 26 | 27 | 2 28 | 29 | 30 | 31 | 32 | 4 33 | 34 | 35 | 36 | 37 | 3 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_6.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 0 13 | 14 | 15 | 16 | 17 | 1 18 | 19 | 20 | 21 | 22 | sink 23 | 24 | 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | 7 33 | 34 | 35 | 36 | 37 | 3 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_7.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 1 13 | 14 | 15 | 16 | 17 | 0 18 | 19 | 20 | 21 | 22 | sink 23 | 24 | 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | 7 33 | 34 | 35 | 36 | 37 | 2 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_8.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 0 13 | 14 | 15 | 16 | 17 | sink 18 | 19 | 20 | 21 | 22 | 1 23 | 24 | 25 | 26 | 27 | 4 28 | 29 | 30 | 31 | 32 | 2 33 | 34 | 35 | 36 | 37 | 5 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /example/config/archive/product_9.pnml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | source 8 | 9 | 10 | 11 | 12 | 1 13 | 14 | 15 | 16 | 17 | sink 18 | 19 | 20 | 21 | 22 | 0 23 | 24 | 25 | 26 | 27 | 5 28 | 29 | 30 | 31 | 32 | 2 33 | 34 | 35 | 36 | 37 | 7 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /docs/source/production_simulation/controller/ProductionSimulation.controller.machine_controller.rst: -------------------------------------------------------------------------------- 1 | 2 | Machine Controller 3 | ---------------------------------------------------------------------------- 4 | 5 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | Machine Controller EDD 11 | --------------------------------------------------------------------------------- 12 | 13 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController_EDD 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | Machine Controller FIFO 19 | ---------------------------------------------------------------------------------- 20 | 21 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController_FIFO 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | Machine Controller Hybrid 27 | ------------------------------------------------------------------------------------ 28 | 29 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController_Hybrid 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | Machine Controller LIFO 35 | ---------------------------------------------------------------------------------- 36 | 37 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController_LIFO 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/controller/ProductionSimulation.controller.machine_controller.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | Machine Controller 3 | ---------------------------------------------------------------------------- 4 | 5 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | Machine Controller EDD 11 | --------------------------------------------------------------------------------- 12 | 13 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController_EDD 14 | :members: 15 | :undoc-members: 16 | :show-inheritance: 17 | 18 | Machine Controller FIFO 19 | ---------------------------------------------------------------------------------- 20 | 21 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController_FIFO 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | Machine Controller Hybrid 27 | ------------------------------------------------------------------------------------ 28 | 29 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController_Hybrid 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | Machine Controller LIFO 35 | ---------------------------------------------------------------------------------- 36 | 37 | .. automodule:: ontologysim.ProductionSimulation.controller.machine_controller.MachineController_LIFO 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/source/production_simulation/simulation/ProductionSimulation.sim.RepairService.rst: -------------------------------------------------------------------------------- 1 | 2 | Repair Service Structure 3 | ----------------------------------------------------------- 4 | 5 | The machine service and transport service are identical. Each service consist of a waiting list, where defect machines are saved and 6 | service places called service operator. 7 | 8 | The way how defects are handled: 9 | 10 | 1. a defect event is created and the defect is saved to the service waiting list 11 | 2. the service operator evaluates, which defect is repaired 12 | 3. the defect instance gets repaired at a service operator 13 | 14 | Repair service 15 | ------------------------------ 16 | 17 | .. automodule:: ontologysim.ProductionSimulation.sim.RepairService.RepairService 18 | :members: 19 | :undoc-members: 20 | :show-inheritance: 21 | 22 | Repair Service Machine 23 | ------------------------------------------------------------------ 24 | 25 | .. automodule:: ontologysim.ProductionSimulation.sim.RepairService.RepairServiceMachine 26 | :members: 27 | :undoc-members: 28 | :show-inheritance: 29 | 30 | Repair Service Transporter 31 | ---------------------------------------------------------------------- 32 | 33 | .. automodule:: ontologysim.ProductionSimulation.sim.RepairService.RepairServiceTransporter 34 | :members: 35 | :undoc-members: 36 | :show-inheritance: 37 | 38 | Defect 39 | -------------------------------------- 40 | 41 | .. automodule:: ontologysim.ProductionSimulation.sim.Defect 42 | :members: 43 | :undoc-members: 44 | :show-inheritance: 45 | 46 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/simulation/ProductionSimulation.sim.RepairService.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | Repair Service Structure 3 | ----------------------------------------------------------- 4 | 5 | The machine service and transport service are identical. Each service consist of a waiting list, where defect machines are saved and 6 | service places called service operator. 7 | 8 | The way how defects are handled: 9 | 10 | 1. a defect event is created and the defect is saved to the service waiting list 11 | 2. the service operator evaluates, which defect is repaired 12 | 3. the defect instance gets repaired at a service operator 13 | 14 | Repair service 15 | ------------------------------ 16 | 17 | .. automodule:: ontologysim.ProductionSimulation.sim.RepairService.RepairService 18 | :members: 19 | :undoc-members: 20 | :show-inheritance: 21 | 22 | Repair Service Machine 23 | ------------------------------------------------------------------ 24 | 25 | .. automodule:: ontologysim.ProductionSimulation.sim.RepairService.RepairServiceMachine 26 | :members: 27 | :undoc-members: 28 | :show-inheritance: 29 | 30 | Repair Service Transporter 31 | ---------------------------------------------------------------------- 32 | 33 | .. automodule:: ontologysim.ProductionSimulation.sim.RepairService.RepairServiceTransporter 34 | :members: 35 | :undoc-members: 36 | :show-inheritance: 37 | 38 | Defect 39 | -------------------------------------- 40 | 41 | .. automodule:: ontologysim.ProductionSimulation.sim.Defect 42 | :members: 43 | :undoc-members: 44 | :show-inheritance: 45 | 46 | -------------------------------------------------------------------------------- /example/Main.py: -------------------------------------------------------------------------------- 1 | import inspect 2 | import os 3 | import sys 4 | import owlready2 5 | 6 | 7 | current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) 8 | parent_dir = os.path.dirname(current_dir) 9 | sys.path.insert(0, parent_dir) 10 | 11 | 12 | from ontologysim.ProductionSimulation.analyse.TimeAnalyse import TimeAnalyse 13 | from ontologysim.ProductionSimulation.init.Initializer import Initializer 14 | 15 | #path to example 16 | def main(): 17 | init=Initializer(current_dir) 18 | init.initSimCore() 19 | production_config_path="/example/config/production_config_lvl3.ini" 20 | owl_config_path="/example/config/owl_config.ini" 21 | controller_config_path="/example/config/controller_config.ini" 22 | logger_config_path="/example/config/logger_config_lvl3.ini" 23 | 24 | #choose between load from owl or create from config 25 | init.createProduction(production_config_path,owl_config_path) 26 | #init.loadProductionFromOWL("ontologysim/example/owl/production_without_task_defect.owl") 27 | 28 | 29 | #add Tasks 30 | init.addTaskPathGiven(production_config_path) 31 | 32 | #(optional) 33 | init.addDefectPathGiven(production_config_path) 34 | 35 | 36 | #add Logger 37 | init.addLoggerAndDataBasePathGiven(logger_config_path) 38 | 39 | #set controller 40 | init.loadControllerPathGiven(controller_config_path) 41 | 42 | #init.set_save_time(400) 43 | 44 | #run Simulation 45 | init.run() 46 | 47 | #TimeAnalyse.save_dict_to_csv() 48 | 49 | init.s.destroyOnto() 50 | 51 | if __name__ == "__main__": 52 | main() -------------------------------------------------------------------------------- /ontologysim/ProductionSimulation/database/models/TransporterLocation.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String, Text, Float, TypeDecorator 2 | from sqlalchemy.orm import relationship, backref 3 | 4 | from ontologysim.ProductionSimulation.database.models.Base import Base 5 | from sqlalchemy.ext.declarative import declarative_base 6 | 7 | 8 | class TransporterLocationKPI(Base): 9 | __tablename__ = 'TransporterLocationKPI' 10 | id = Column(Integer, primary_key=True) 11 | name = Column(String,nullable=True) 12 | location = Column(String,nullable=False) 13 | value = Column(Float(decimal_return_scale=7,asdecimal=True),nullable=True) 14 | simulationRunID = Column(Integer, ForeignKey("SimulationRun.id"),nullable=True) 15 | 16 | class TransporterLocationTimeKPIValue(Base): 17 | __tablename__ = 'TransporterLocationTimeKPIValue' 18 | id = Column(Integer, primary_key=True) 19 | time = Column(Float(decimal_return_scale=7,asdecimal=True), nullable=True) 20 | location = Column(String, nullable=False) 21 | value = Column(Float(decimal_return_scale=7, asdecimal=True), nullable=True) 22 | transporterLocationKPIID = Column(Integer, ForeignKey("TransporterLocationTimeKPI.id"),nullable=True) 23 | 24 | 25 | class TransporterLocationTimeKPI(Base): 26 | __tablename__ = 'TransporterLocationTimeKPI' 27 | id = Column(Integer, primary_key=True) 28 | name = Column(String) 29 | transporterLocationTimeKPIValue = relationship(TransporterLocationTimeKPIValue) 30 | simulationRunID = Column(Integer, ForeignKey("SimulationRun.id"), nullable=True) -------------------------------------------------------------------------------- /ontologysim/Flask/static/Simulation/owlDownload.json: -------------------------------------------------------------------------------- 1 | { 2 | "get": { 3 | "tags": [ 4 | "Simulation" 5 | ], 6 | "summary": "download owl file of current simulation", 7 | "operationId": "owlDownload", 8 | "request": { 9 | 10 | }, 11 | "responses": { 12 | "200": { 13 | "description": "owl file data", 14 | "content": { 15 | "application/json": { 16 | "schema": { 17 | "type": "object", 18 | "required": [ 19 | "file" 20 | ], 21 | "properties": { 22 | "file": { 23 | "type": "string" 24 | } 25 | } 26 | }, 27 | "example": 28 | { 29 | "file":"\n 0): 30 | self.response = Response(status=200, headers={}, response={json.dumps(dictIDs)}, 31 | mimetype='application/json') 32 | else: 33 | self.response = Response(status=400, headers={}, response={json.dumps({ 34 | "code": '400', 35 | "name": 'getID', 36 | "description": "type is not definied: " + type, 37 | })}, 38 | mimetype='application/json') 39 | except Exception as e: 40 | print(e) 41 | self.response = Response(status=500,headers={}, response={json.dumps({ 42 | "code": '500', 43 | "name": 'getID', 44 | "description": "ontology not created", 45 | })}) 46 | 47 | return self.response -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | Ontologysim: a Owlready2 library for applied production simulation 2 | ==================================================================== 3 | 4 | Ontologysim is an open-source production simulation framework, with an emphasis on modularized flexible library design and straightforward usability for applications in research and practice. Ontologysim is built on top of `Owlready2 framework `_ and requires Python >3.7. 5 | 6 | Ontologysim follows a set of high-level design choices which differentiate it from other similar libraries: 7 | 8 | * the simulation can be saved at any time and started from a defined point 9 | * high degrees of freedom and possibilities due to the ontology 10 | 11 | 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | :caption: Tutorial 16 | 17 | tutorial/installation 18 | tutorial/creating_a_simulation 19 | tutorial/example_folder 20 | 21 | .. toctree:: 22 | :maxdepth: 1 23 | :caption: Config & Pnml 24 | 25 | configs/ini_file 26 | configs/pnml 27 | 28 | 29 | 30 | .. toctree:: 31 | :maxdepth: 1 32 | :caption: Production Simulation 33 | 34 | production_simulation/deep_dive 35 | production_simulation/controller 36 | production_simulation/logger 37 | production_simulation/simulation 38 | production_simulation/side_package 39 | 40 | 41 | 42 | .. toctree:: 43 | :maxdepth: 1 44 | :caption: Flask 45 | 46 | flask/starting 47 | flask/flask 48 | 49 | .. toctree:: 50 | :maxdepth: 1 51 | :caption: Visualisation React 52 | 53 | visualisation/visualisation 54 | 55 | .. toctree:: 56 | :maxdepth: 1 57 | :caption: Documentation 58 | 59 | documentation/documentation 60 | documentation/upcoming 61 | -------------------------------------------------------------------------------- /docs/source/production_simulation/logger/ProductionSimulation.logger.depreciated_logger.rst: -------------------------------------------------------------------------------- 1 | 2 | depreciated logger, currently not used 3 | 4 | Data base 5 | --------------------------------------------------------------- 6 | 7 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.DataBase 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | Logger 2 13 | -------------------------------------------------------------- 14 | 15 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.Logger2 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | Machine Logger 2 21 | --------------------------------------------------------------------- 22 | 23 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.MachineLogger2 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | Product Finished Logger 29 | ---------------------------------------------------------------------------- 30 | 31 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.ProductFinishedLogger 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | Queue Logger 37 | ------------------------------------------------------------------ 38 | 39 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.QueueLogger 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | 44 | Transport Logger 45 | ---------------------------------------------------------------------- 46 | 47 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.TransportLogger 48 | :members: 49 | :undoc-members: 50 | :show-inheritance: 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/source/production_simulation/deep_dive/transporter.md: -------------------------------------------------------------------------------- 1 | Transporter 2 | =================== 3 | 4 | Transporter types 5 | ------------------ 6 | 7 | ### Free: 8 | 9 | The transporter vehicles are not restricted to a route or limit to a place 10 | 11 | ### Restricted: 12 | 13 | The transporter is only allowed to drive to certain queues, the order doesn't matter 14 | 15 | ### Ordered: 16 | 17 | > currently not working 18 | > 19 | The transporter is only allowed to drive to certain queues, the order can not be changed. 20 | 21 | 22 | Deadlock 23 | ---------- 24 | 25 | The current transporter controller contains a deadlock detection and deadlock strategy 26 | 27 | ### Detection: 28 | 29 | The transporter scans all parts in machine, start and end queues and evaluates them according to a heuristic e.g. FIFO. These evaluated parts are then checked to see if the next machine is available. If no machine is available for the product, the next prioritised part is evaluated. If no part can be processed further. If a deadlock handling is carried out. 30 | 31 | ### Deadlock strategy: 32 | 33 | At deadlock the transporter first drives to a start queue if there is still room for an additional product. If this is not the case, it places a part in the deadlock queue as soon as a part is placed in the deadlock queue. 34 | Then no more new parts are inserted into the system. After removing one part from the transporter. The evaluation starts again. The parts on the deadlock queue are blocked for transportation for a certain time. 35 | 36 | > Important: for Restricted or Ordered Transporters the deadlock and start queues does not need to be added. For a deadlock case the transporter is allowed to drive to these queues -------------------------------------------------------------------------------- /docs/build/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | Ontologysim: a Owlready2 library for applied production simulation 2 | ==================================================================== 3 | 4 | Ontologysim is an open-source production simulation framework, with an emphasis on modularized flexible library design and straightforward usability for applications in research and practice. Ontologysim is built on top of `Owlready2 framework `_ and requires Python >3.7. 5 | 6 | Ontologysim follows a set of high-level design choices which differentiate it from other similar libraries: 7 | 8 | * the simulation can be saved at any time and started from a defined point 9 | * high degrees of freedom and possibilities due to the ontology 10 | 11 | 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | :caption: Tutorial 16 | 17 | tutorial/installation 18 | tutorial/creating_a_simulation 19 | tutorial/example_folder 20 | 21 | .. toctree:: 22 | :maxdepth: 1 23 | :caption: Config & Pnml 24 | 25 | configs/ini_file 26 | configs/pnml 27 | 28 | 29 | 30 | .. toctree:: 31 | :maxdepth: 1 32 | :caption: Production Simulation 33 | 34 | production_simulation/deep_dive 35 | production_simulation/controller 36 | production_simulation/logger 37 | production_simulation/simulation 38 | production_simulation/side_package 39 | 40 | 41 | 42 | .. toctree:: 43 | :maxdepth: 1 44 | :caption: Flask 45 | 46 | flask/starting 47 | flask/flask 48 | 49 | .. toctree:: 50 | :maxdepth: 1 51 | :caption: Visualisation React 52 | 53 | visualisation/visualisation 54 | 55 | .. toctree:: 56 | :maxdepth: 1 57 | :caption: Documentation 58 | 59 | documentation/documentation 60 | documentation/upcoming 61 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/logger/ProductionSimulation.logger.depreciated_logger.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | depreciated logger, currently not used 3 | 4 | Data base 5 | --------------------------------------------------------------- 6 | 7 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.DataBase 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | Logger 2 13 | -------------------------------------------------------------- 14 | 15 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.Logger2 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | Machine Logger 2 21 | --------------------------------------------------------------------- 22 | 23 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.MachineLogger2 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | Product Finished Logger 29 | ---------------------------------------------------------------------------- 30 | 31 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.ProductFinishedLogger 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | Queue Logger 37 | ------------------------------------------------------------------ 38 | 39 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.QueueLogger 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | 44 | Transport Logger 45 | ---------------------------------------------------------------------- 46 | 47 | .. automodule:: ontologysim.ProductionSimulation.logger.depreciated_logger.TransportLogger 48 | :members: 49 | :undoc-members: 50 | :show-inheritance: 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/build/_sources/production_simulation/deep_dive/transporter.md.txt: -------------------------------------------------------------------------------- 1 | Transporter 2 | =================== 3 | 4 | Transporter types 5 | ------------------ 6 | 7 | ### Free: 8 | 9 | The transporter vehicles are not restricted to a route or limit to a place 10 | 11 | ### Restricted: 12 | 13 | The transporter is only allowed to drive to certain queues, the order doesn't matter 14 | 15 | ### Ordered: 16 | 17 | > currently not working 18 | > 19 | The transporter is only allowed to drive to certain queues, the order can not be changed. 20 | 21 | 22 | Deadlock 23 | ---------- 24 | 25 | The current transporter controller contains a deadlock detection and deadlock strategy 26 | 27 | ### Detection: 28 | 29 | The transporter scans all parts in machine, start and end queues and evaluates them according to a heuristic e.g. FIFO. These evaluated parts are then checked to see if the next machine is available. If no machine is available for the product, the next prioritised part is evaluated. If no part can be processed further. If a deadlock handling is carried out. 30 | 31 | ### Deadlock strategy: 32 | 33 | At deadlock the transporter first drives to a start queue if there is still room for an additional product. If this is not the case, it places a part in the deadlock queue as soon as a part is placed in the deadlock queue. 34 | Then no more new parts are inserted into the system. After removing one part from the transporter. The evaluation starts again. The parts on the deadlock queue are blocked for transportation for a certain time. 35 | 36 | > Important: for Restricted or Ordered Transporters the deadlock and start queues does not need to be added. For a deadlock case the transporter is allowed to drive to these queues --------------------------------------------------------------------------------