{"id":21293350,"url":"https://github.com/ejw-data/sim-elevator","last_synced_at":"2025-03-15T16:44:33.808Z","repository":{"id":60763368,"uuid":"542198285","full_name":"ejw-data/sim-elevator","owner":"ejw-data","description":"Discrete event simulation of an elevator system using a SimPy model","archived":false,"fork":false,"pushed_at":"2022-10-28T06:02:06.000Z","size":612,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T06:47:17.400Z","etag":null,"topics":["discrete-event-simulation","python","simpy"],"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/ejw-data.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}},"created_at":"2022-09-27T17:03:35.000Z","updated_at":"2022-10-03T08:58:48.000Z","dependencies_parsed_at":"2023-01-20T13:50:10.138Z","dependency_job_id":null,"html_url":"https://github.com/ejw-data/sim-elevator","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/ejw-data%2Fsim-elevator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejw-data%2Fsim-elevator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejw-data%2Fsim-elevator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejw-data%2Fsim-elevator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejw-data","download_url":"https://codeload.github.com/ejw-data/sim-elevator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243762236,"owners_count":20343976,"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","python","simpy"],"created_at":"2024-11-21T13:54:25.684Z","updated_at":"2025-03-15T16:44:33.789Z","avatar_url":"https://github.com/ejw-data.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sim-elevator\n\nAuthor:  Erin James Wills, ejw.data@gmail.com  \n\n![Elevator Simulation](./images/elevator-simpy.png)  \n\u003ccite\u003ePhoto by \u003ca href=\"https://unsplash.com/@mbuff?utm_source=unsplash\u0026utm_medium=referral\u0026utm_content=creditCopyText\"\u003eSung Jin Cho\u003c/a\u003e on \u003ca href=\"https://unsplash.com/s/photos/elevator?utm_source=unsplash\u0026utm_medium=referral\u0026utm_content=creditCopyText\"\u003eUnsplash\u003c/a\u003e\u003c/cite\u003e\n\u003cbr\u003e\n\n## Overview  \n\u003chr\u003e  \nDiscrete event simulation of an elevator system using the simpy library.   \n\n### Phase 1\n- Developed procedural model using functions/generators with simpy\n- Works with only one elevator correctly\n- Model is getting complex due to chaining functions and passing function parameters\n\n### Phase 2\n- Converted procedural model to object oriented\n- Reduced code complexity\n- Works only with one elevator correctly\n\n### Phase 3\n- Updating model to work with multiple elevators\n- Initial thought was to create dictionary holding elevator information and floors but does not look promising\n- Looking at other options.\n\n### Phase 4  \n- Found several options from documentation and stackoverflow.  \n- Initially tried using simpy.Store but having issues integrating into existing code and determining effect.\n- Creating simple model to test functionality and then will integrate into existing OOP version.\n- New file called `scheduling_test_store.py`.  \n- After several tries, using `simpy.FilteredStore` method works but only when combined with `simpy.Resources`.  My method uses the Resources method to allocate resources upon request and upon making a request the FilteredStore method allocates a name and other properties to the model.  The big picture idea is that I am doing two checkout steps - checking out an elevator resource and at the same time checking out an available elevator data store.  Before the request is checked in, I checkin the store so the two checkout systems are synchronized.  I can use this method to pass specific parameters related to that elevator or update those parameters and I can customize which elevator is selected at the store level (in many scenarios); thus, allowing custom logic for elevator activity.  \n\n### Phase 5 (current)\n\n- Integrated `scheduling_test_store.py` verified method into main script - `elevator_oop.py`.  \n- Need to validate results\n- Need to clean printout results\n- Need to store trip results as dataframe or csv\n\n\n\u003cbr\u003e\n\n## Technologies    \n*  Python\n\n\u003cbr\u003e\n\n\n## Data Source  \nNo external data was used for this project.  All numbers used were estimates or randomly selected.\n\n\u003cbr\u003e\n\n## Setup and Installation  \n1. Environment needs the following:  \n    *  Python 3.6+   \n    *  simpy\n    *  random\n1. Activate your environment\n1. Clone the repo to your local machine\n1. Navigate the terminal to the repo folder\n1. In the terminal, run `python elevator.py`  \n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejw-data%2Fsim-elevator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejw-data%2Fsim-elevator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejw-data%2Fsim-elevator/lists"}