{"id":27656287,"url":"https://github.com/andrewmsilva/simtool","last_synced_at":"2025-09-17T23:44:03.927Z","repository":{"id":148270234,"uuid":"305458594","full_name":"andrewmsilva/SimTool","owner":"andrewmsilva","description":"An experimental framework for creating general simulation models","archived":false,"fork":false,"pushed_at":"2021-01-21T16:48:18.000Z","size":736,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T14:17:09.523Z","etag":null,"topics":["simulation","simulator"],"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/andrewmsilva.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-19T17:15:02.000Z","updated_at":"2021-01-21T16:48:21.000Z","dependencies_parsed_at":"2023-05-19T14:45:51.917Z","dependency_job_id":null,"html_url":"https://github.com/andrewmsilva/SimTool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andrewmsilva/SimTool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmsilva%2FSimTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmsilva%2FSimTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmsilva%2FSimTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmsilva%2FSimTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewmsilva","download_url":"https://codeload.github.com/andrewmsilva/SimTool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmsilva%2FSimTool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275685255,"owners_count":25509528,"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-17T02:00:09.119Z","response_time":84,"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":["simulation","simulator"],"created_at":"2025-04-24T06:14:32.063Z","updated_at":"2025-09-17T23:44:03.920Z","avatar_url":"https://github.com/andrewmsilva.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimTool\n\nSimTool is an experimental framework for creating general simulation models.\n\n```python\nfrom src.SimTool import Model\n\nmodel = Model()\n```\n\n## Components\n\n### Generator\n\nGenerators create entities according to a time interval with a random distribution (uniform or normal).\n\n```python\nmodel.createGenerator(\n    name='Begin',\n    target='Reception',\n    min_range=2,\n    max_range=5,\n    distribution='normal',\n    entity_name='Patient'\n)\n```\n\n### Process\n\nProcesses subject generated entities to a process executed by some resources with duration in a time interval with a random distribution (uniform or normal).\n\n```python\nmodel.createProcess(\n    name='Reception',\n    target='Router',\n    min_range=7,\n    max_range=12,\n    distribution='normal',\n    num_resources=2,\n    resource_name='Receptionist'\n)\n```\n\n### Router\n\nRouters send entities to other target components with a random distribution (uniform or normal).\n\n```python\nmodel.createRouter(\n    name='Router',\n    targets=['Medical', 'End'],\n    distribution='uniform'\n)\n```\n\n### Terminator\n\nTerminators receive entities that finished the simulation.\n\n```python\nmodel.createTerminator(name='End')\n```\n\n## Simulating\n\nAfter creating all components in a model, just call the `run` method.\n\n```python\nmodel.run(stop_at=30)\n```\n\n## Example\n\n\nThe file [test.py](https://github.com/andrewmsilva/SimTool/blob/main/test.py) presents an example of a model simulating the behavior of a fictional medical clinic. The resulting log is in the following.\n\n```\nReception: Patient 0 entered the queue at 4\nReception: Patient 0 started the process at 4 by Receptionist 0\nReception: Patient 1 entered the queue at 8\nReception: Patient 1 started the process at 8 by Receptionist 1\nReception: Patient 2 entered the queue at 12\nReception: Patient 0 finished the process at 14 with duration 10\nMedical: Patient 0 entered the queue at 14\nReception: Patient 2 started the process at 14 by Receptionist 0\nMedical: Patient 0 started the process at 14 by Doctor 0\nReception: Patient 3 entered the queue at 16\nReception: Patient 1 finished the process at 17 with duration 9\nMedical: Patient 1 entered the queue at 17\nReception: Patient 3 started the process at 17 by Receptionist 1\nReception: Patient 4 entered the queue at 21\nReception: Patient 2 finished the process at 22 with duration 8\nMedical: Patient 2 entered the queue at 22\nReception: Patient 4 started the process at 22 by Receptionist 0\nReception: Patient 5 entered the queue at 26\nReception: Patient 3 finished the process at 27 with duration 10\nMedical: Patient 3 entered the queue at 27\nReception: Patient 5 started the process at 27 by Receptionist 1\nReception: Patient 4 finished the process at 31 with duration 9\nMedical: Patient 4 entered the queue at 31\nReception: Patient 5 finished the process at 35 with duration 8\nMedical: Patient 5 entered the queue at 35\nMedical: Patient 0 finished the process at 39 with duration 25\nEnd: Patient 0 finished the simulation at 39\nMedical: Patient 1 started the process at 39 by Doctor 0\nMedical: Patient 1 finished the process at 55 with duration 16\nEnd: Patient 1 finished the simulation at 55\nMedical: Patient 2 started the process at 55 by Doctor 0\nMedical: Patient 2 finished the process at 78 with duration 23\nEnd: Patient 2 finished the simulation at 78\nMedical: Patient 3 started the process at 78 by Doctor 0\nMedical: Patient 3 finished the process at 99 with duration 21\nEnd: Patient 3 finished the simulation at 99\nMedical: Patient 4 started the process at 99 by Doctor 0\nMedical: Patient 4 finished the process at 119 with duration 20\nEnd: Patient 4 finished the simulation at 119\nMedical: Patient 5 started the process at 119 by Doctor 0\nMedical: Patient 5 finished the process at 139 with duration 20\nEnd: Patient 5 finished the simulation at 139\nSimulation ended\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewmsilva%2Fsimtool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewmsilva%2Fsimtool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewmsilva%2Fsimtool/lists"}