{"id":22105182,"url":"https://github.com/ghackenberg/simpy-tkinter-boilerplate","last_synced_at":"2025-08-13T11:47:47.465Z","repository":{"id":110013848,"uuid":"526643872","full_name":"ghackenberg/simpy-tkinter-boilerplate","owner":"ghackenberg","description":"Real-time visualization of discrete event simulation with SimPy and Tkinter","archived":false,"fork":false,"pushed_at":"2024-04-12T22:06:40.000Z","size":640,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-14T11:32:16.782Z","etag":null,"topics":["discrete-event-simulation","multithreading","python","simpy","tkinter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghackenberg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2022-08-19T14:42:19.000Z","updated_at":"2024-04-14T11:32:16.782Z","dependencies_parsed_at":"2023-08-30T14:16:28.526Z","dependency_job_id":null,"html_url":"https://github.com/ghackenberg/simpy-tkinter-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2Fsimpy-tkinter-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2Fsimpy-tkinter-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2Fsimpy-tkinter-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2Fsimpy-tkinter-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghackenberg","download_url":"https://codeload.github.com/ghackenberg/simpy-tkinter-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227502861,"owners_count":17781701,"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","multithreading","python","simpy","tkinter"],"created_at":"2024-12-01T06:39:14.296Z","updated_at":"2024-12-01T06:39:15.053Z","avatar_url":"https://github.com/ghackenberg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimPy + Tkinter Boilerplate\n\n![](./images/social_preview.png)\n\nThis boilerplate project demonstrates the use of **Tkinter** for real-time visualization of discrete event simulations with **SimPy**.\n\n## Examples\n\nThe following code snippet shows the basic structure of the simulation program. The simulation itself is executed in a separate simulation thread, while the GUI uses the main thread.\n\n```python\nimport threading\nimport tkinter\nimport simpy\nimport simpy.rt\n\n# define the simulation ticks per second\nticks_per_second = 30\n# define the total duration of the simulation run\nduration = 10 * ticks_per_second\n\n# create Tkinter common objects here\nwindow = tkinter.Tk()\n\ndef run():\n    env = simpy.rt.RealtimeEnvironment(factor=1/ticks_per_second, strict=False)\n    # define SimPy events here\n    # create SimPy resources here\n    # attach SimPy processes here\n    env.run(until=duration)\n\n# run SimPy simulation event processing in simulation thread\nthread = threading.Thread(target=run)\nthread.start()\n\n# run Tkinter interaction event processing and component rendering in main thread\nwindow.mainloop()\n```\n\n## Screenshots\n\nWhen executing the simulation program, you should see the following real-time visualization.\n\n![Screenshot](./images/screenshot.png)\n\n## Guides\n\n### Prepare the development environment\n\nDownload and install the SimPy discrete event simulation library.\n\n```\npip install simpy\n```\n\n### Run the simulation program\n\nExecute the simulation program with your standard Python interpreter.\n\n```\npython ./sources/main.py\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghackenberg%2Fsimpy-tkinter-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghackenberg%2Fsimpy-tkinter-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghackenberg%2Fsimpy-tkinter-boilerplate/lists"}