{"id":15047135,"url":"https://github.com/iml130/lotlan-scheduler","last_synced_at":"2025-10-04T05:31:52.759Z","repository":{"id":54560307,"uuid":"334894585","full_name":"iml130/lotlan-scheduler","owner":"iml130","description":"A scheduler for the Logistic Task Language (LoTLan)","archived":true,"fork":false,"pushed_at":"2021-03-23T17:35:28.000Z","size":8117,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T15:54:50.112Z","etag":null,"topics":["cpps","dsl","logistics","robotic-control","robotics","scheduler","transportation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iml130.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-01T09:21:47.000Z","updated_at":"2024-01-08T10:50:42.000Z","dependencies_parsed_at":"2022-08-13T19:40:37.760Z","dependency_job_id":null,"html_url":"https://github.com/iml130/lotlan-scheduler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/iml130/lotlan-scheduler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iml130%2Flotlan-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iml130%2Flotlan-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iml130%2Flotlan-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iml130%2Flotlan-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iml130","download_url":"https://codeload.github.com/iml130/lotlan-scheduler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iml130%2Flotlan-scheduler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276863371,"owners_count":25717961,"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","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cpps","dsl","logistics","robotic-control","robotics","scheduler","transportation"],"created_at":"2024-09-24T20:54:44.669Z","updated_at":"2025-10-04T05:31:52.390Z","avatar_url":"https://github.com/iml130.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LoTLan Scheduler\n![Unit-Tests](https://github.com/iml130/lotlan-scheduler/workflows/Unit-Tests/badge.svg?branch=feature%2Fgithub-action-for-unittests)\n\nScheduler for [LoTLan](https://lotlan.readthedocs.io/en/latest/) tasks. Parses LoTLan files and accepts events defined in the files to schedule.\n\nThe repository for the LoTLan grammar can be found [here](https://github.com/iml130/LoTLan)\n## Task examples\n\nYou can find many LoTLan files / examples in the LoTLan Scheduler [repository](https://github.com/iml130/lotlan-scheduler) or in the official [Documentation](https://lotlan-scheduler.readthedocs.io)\n\n## Quickstart / Example\n\nHere is an example how the scheduler can be used\n```python\nimport sys\n\nfrom lotlan_scheduler.scheduler import LotlanScheduler\nfrom lotlan_scheduler.api.event import Event\n\n# gets called for each materialflow that is waiting for\n# the triggeredBy condition to be satisfied\n# event information contains info about the events in tb\ndef cb_triggered_by(mf_uuid, _uuid, event_information):\n    print(\"cb_triggered_by from mf: \" + str(mf_uuid))\n    print(\"UUID: \" + str(_uuid), \"Event_Info: \" + str(event_information))\n    # foreach event in event_information\n\n# gets called when triggeredBy condition is satisfied\n# transport_orders contains the next transport orders which \n# can be executed\ndef cb_next_to(mf_uuid, transport_orders):\n    print(\"cb_next_to from mf: \" + str(mf_uuid))\n    print(str(transport_orders))\n\n# gets called for each materialflow that is waiting for\n# the finishedBy condition to be satisfied\n# event information contains info about the events in fb\ndef cb_finished_by(mf_uuid, _uuid, event_information):\n    print(\"cb_finished_by from mf: \" + str(mf_uuid))\n    print(\"UUID: \" + str(_uuid), \"Event_Info: \" + str(event_information))\n\n# gets called if a task with the id _uuid has finished\ndef cb_task_finished(mf_uuid, _uuid):\n    print(\"cb_task_finished from mf: \" + str(mf_uuid))\n    print(\"task with uuid \" + str(_uuid) + \" finished\")\n\n# gets called if every task is finished\n# will never be called if the LoTLan file contains a cycle\ndef cb_all_finished(mf_uuid):\n    print(\"cb_all_finished from mf: \" + str(mf_uuid))\n\n\ndef main():\n    test_flag = False\n    lotlan_string = \"\"\n\n    if len(sys.argv) \u003e= 2:\n        if sys.argv[1] == \"--test\":\n            test_flag = True\n            with open(sys.argv[2], 'r') as file:\n                lotlan_string = file.read()\n        else:\n            with open(sys.argv[1], 'r') as file:\n                lotlan_string = file.read()\n\n        lotlan_logic = LotlanScheduler(lotlan_string, test_flag)\n        material_flows = lotlan_logic.get_materialflows()\n\n        for material_flow in material_flows:\n            material_flow.register_callback_triggered_by(cb_triggered_by)\n            material_flow.register_callback_next_to(cb_next_to)\n            material_flow.register_callback_finished_by(cb_finished_by)\n            material_flow.register_callback_task_finished(cb_task_finished)\n            material_flow.register_callback_all_finished(cb_all_finished)\n            material_flow.start()\n\n        material_flow_running = True\n        while (material_flow_running):\n            _input = str(input(\"Wait for input:\u003e\"))\n            mf_number = 0\n            uid = 0\n            input_name = \"buttonPressed\"\n            input_value = \"True\"\n\n            if _input != \"\":\n                mf_number, uid, input_name, input_value = _input.split(\" \")\n\n            mf_number = int(mf_number)\n\n            if mf_number \u003c len(material_flows):\n                material_flows[mf_number].fire_event(str(uid), Event(input_name, \"\", \"bool\", input_value == \"True\"))\n\n            # check if a material flow is still running\n            # if every material flow is finished we are done otherwise continue\n            material_flow_running = False\n            for mf in material_flows:\n                if mf.is_running() is True:\n                    material_flow_running = True\n\nif __name__ == '__main__':\n    main()\n\n```\n\n## License\nLoTLan Scheduler is licensed under the terms of the Apache license. See [LICENCSE](./LICENSE) for more information.\n\n## Contributors\nPeter Detzner, Maximilian Hoerstrup, Dominik Lux\n\n\n## Conference\n\nP. Detzner, T. Kirks and J. Jost, \"[A Novel Task Language for Natural Interaction in Human-Robot Systems for Warehouse Logistics](https://ieeexplore.ieee.org/document/8845336)\", 2019 14th International Conference on Computer Science \u0026 Education (ICCSE), Toronto, ON, Canada, 2019, pp. 725-730.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiml130%2Flotlan-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiml130%2Flotlan-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiml130%2Flotlan-scheduler/lists"}