{"id":28383662,"url":"https://github.com/ghackenberg/spineml","last_synced_at":"2025-06-25T14:30:54.469Z","repository":{"id":110013706,"uuid":"574981114","full_name":"ghackenberg/SpineML","owner":"ghackenberg","description":"In this project we study techniques for reducing the effort of factory layout planning (FLP) and optimal job shop scheduling (JSS).","archived":false,"fork":false,"pushed_at":"2025-05-02T19:00:32.000Z","size":1350,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T07:46:41.072Z","etag":null,"topics":["discrete-event-simulation","plant-simulation","python","salabim"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghackenberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-12-06T13:51:44.000Z","updated_at":"2025-05-02T19:00:35.000Z","dependencies_parsed_at":"2023-04-25T05:14:01.760Z","dependency_job_id":"4967cf96-08cb-4cb4-aa35-91eaf2a64742","html_url":"https://github.com/ghackenberg/SpineML","commit_stats":null,"previous_names":["ghackenberg/grid-plant","ghackenberg/salabim-grid-plant","ghackenberg/salabim-grid-plant-3d","ghackenberg/spineml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ghackenberg/SpineML","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2FSpineML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2FSpineML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2FSpineML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2FSpineML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghackenberg","download_url":"https://codeload.github.com/ghackenberg/SpineML/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2FSpineML/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261891658,"owners_count":23225766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discrete-event-simulation","plant-simulation","python","salabim"],"created_at":"2025-05-30T07:08:05.061Z","updated_at":"2025-06-25T14:30:54.444Z","avatar_url":"https://github.com/ghackenberg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpineML\n\nIn this project we study techniques for reducing the effort of factory layout planning (FLP) and optimal job shop scheduling (JSS).\nTo achieve this goal, we develop an easy-to-use configurator and simulator for a particular class of factories.\nMore precisely, we concentrate on flexible manufacturing systems, which can be adapted to a variety of products and processes.\nWe assume that the material flow between the work stations of the factory is handled completely by gantry robots.\n\n## 🖼️ Screenshots\n\nHere are some screenshots of our software tool:\n\n- **3D animation** of the factory components including robots and machines\n- **Performance evaluation** of the factory layout in a given order scenario\n- **Graph visualization** of the underlying factory configuration data model\n- **Route visualization** for a given job and a given factory layout\n\nIn the following, we explain the software outputs in more detail.\n\n### 3D animation\n\nOur software is based on [Salabim](https://www.salabim.org/), a Python framework for Discrete Event Simulation (DES).\nDES is a standard tool for factory layout planning and performance evaluation.\nSalabim comes with an integrated 3D animation engine, which supports both primitive shapes and Computer-Aided Design (CAD) models in OBJ Wavefront format.\n\n![Salabim screenshot](./screenshots/salabim.png)\n\n### Performance evaluation\n\nThe goal of Discrete Event Simulation (DES) is to evaluate the performance of your factory layout plan early in the planning process.\nPerformance evaluation typically concentrates on the utilization of resources such as workers, machines, and storage areas.\nOur software automatically tracks the most relevant performance characteristics.\n\n#### Console output\n\nThe performance data can be printed to the console.\n\n![Console screenshot](./screenshots/console.png)\n\n#### PyPlot output\n\nThe performance data can be visualized using bar charts.\n\n![PyPlot screenshot](./screenshots/pyplot.png)\n\n### 🖼️ Graph visualization\n\nFurthermore, we support basic graph visualizations for debugging your factory configuration models.\nThe following graph visualization displays the product types and manufacturing operations of a configuration model.\nProduct types represent everything from raw material to end products, while operations consume and product them.\n\n![NetworkX screenshot](./screenshots/networkx.png)\n\n### 🖼️ Route visualization\n\nFinally, we provide a visualization of all possible routes through a given layout for a given job.\nNote that for a given job at first only the source and the target product type are known.\nFrom this information, the possible sequence of operation types is computed leading from source to target product type.\nFinally, from all possible sequences of operation types the possible sequences of machine types can be computed performing these operations.\nThe goal of optimization is to determine the best sequence of machines for a given job at a given time.\n\n![Tkinter screenshot](./screenshots/routes.png)\n\n## Requirements\n\nTo use this project, you need to install the following software packages on your machine.\nNote that simulation experiments can be carried out without the optional software packages.\n\n* **Python**\n* *Discrete event simulation support*\n  * **Salabim**\n  * *3D animation support (optional)*\n    * PyOpenGL\n    * PyOpenGL_accelerate\n  * *OBJ Wavefront file format support (optional)*\n    * PyWavefront\n    * PyGlet\n  * *Video production support (optional)*\n    * opencv-python\n    * numpy\n* *Chart visualization support*\n  * **Matplotlib**\n* *Graph visualization support (optional)*\n  * NetworkX\n\n## 👨‍💻 Examples\n\nWhen performing a simulation study, we suggest working in four phases:\n\n1. **Basic configuration** defines the products as well as the processes to product them.\n2. **Scenario configuration** defines the situations, in which the factory must operate.\n3. **Layout configuration** defines the number and arrangement of the factory resources.\n4. **Performance evaluation** simulates the performance of the layout in a given scenario.\n\nIn the following, we describe each phase in more  detail.\n\n### **Phase 1:** Basic configuration\n\n**Step 1:** Import the Factory Design Automation (FDA) library.\n\n```python\nfrom SpineML import *\n```\n\n**Step 2:** Define your product, tool, and machine types.\n\n```python\n# Step 2.1: Define your product types\n# (everything from raw material to end product)\npt1 = ProductType(\"Raw material 1\", ...)\npt2 = ProductType(\"End product 1\", ...)\n\n# Step 2.2: Define your tool types\n# (all types of tools you are using in your production)\ntt1 = ToolType(...)\n\n# Step 2.3: Define your machine types\n# (all types of machines you are using in your production)\nmt1 = MachineType(...)\n```\n\n**Step 3:** Define your executable operations.\n\n```python\n# Produce PT2 from PT1 on MT1 with TT1\not1 = OperationType(..., mt1, tt1, pt1, pt2)\n```\n\n### **Phase 2:** Scenario configuration\n\n**Step 4:** Define your scenarios including orders for product types (see *Basic Configuration*)\n\n```python\n# Step 4.1: Define your scenarios\ns1 = Scenario(...)\n# Step 4.2: Define your orders in the scenarios\no1 = Order(..., pt1, s1)\n```\n\n### **Phase 3:** Layout configuration\n\n**Step 5:** Define your factory layouts including corridors, and machines (i.e. instances of machine types).\n\n```python\n# Step 5.1: Define your layout variants\nl1 = Layout(...)\n# Step 5.2: Define your corridors for the layout variants\nc1 = Corridor(..., l1)\n# Step 5.3: Define your machines for the corridors of the layout variants\nm1 = Machine(..., mt1, c1, ...)\n```\n\n### **Phase 4:** Performance evaluation\n\n**Step 6:** Evaluate the performance of a layout variant in a given scenario.\n\n```python\n# Simulate L1 on S1\nsimulate(l1, s1)\n```\n\n## 📈 Models\n\nHere are some models explaining our overall idea:\n\n### Configuration model\n\nThe configuration model contains the ***design-time* object model** of the application.\nThe model comprises three submodels, namely a **definition model**, a **solution model**, and an **evaluation model**.\nThe definition model includes the product type, machine type, tool type, and operation type classes.\nThe solution model includes the layout, corridor, and machine classes.\nThe evaluation model includes the scenario and order classes.\n\n![Class model](./models/configuration-model-full.png)\n\n### Simulation model\n\nThe simulation model contains the ***run-time* object model** of the application, which is based on the configuration model as well as the [Salabim](https://www.salabim.org/) package.\nThe simulation scenario, order, and order job classes represent the evaluation model elements at run-time.\nThe simulation layout, corridor, corridor arm, robot main, roboto corridor arm, and machine classes represent the solution model elements at run-time.\nThe simulation tool class represents a definition model element at run-time.\n\n![Class model](./models/simulation-model-full.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghackenberg%2Fspineml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghackenberg%2Fspineml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghackenberg%2Fspineml/lists"}