{"id":15683958,"url":"https://github.com/wamuir/simpy-stockout","last_synced_at":"2025-05-07T14:40:50.559Z","repository":{"id":135903821,"uuid":"175316973","full_name":"wamuir/simpy-stockout","owner":"wamuir","description":"Discrete-event simulation of inventories in Python via SimPy","archived":false,"fork":false,"pushed_at":"2020-11-13T14:06:51.000Z","size":9,"stargazers_count":15,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T11:01:56.886Z","etag":null,"topics":["discrete-event","inventories","python","replication","simpy","simulation"],"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/wamuir.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}},"created_at":"2019-03-13T00:28:49.000Z","updated_at":"2024-11-22T08:00:40.000Z","dependencies_parsed_at":"2023-07-12T01:01:24.394Z","dependency_job_id":null,"html_url":"https://github.com/wamuir/simpy-stockout","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"858043b3a1910056360458c6403fc6f57330585e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fsimpy-stockout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fsimpy-stockout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fsimpy-stockout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fsimpy-stockout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wamuir","download_url":"https://codeload.github.com/wamuir/simpy-stockout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252897287,"owners_count":21821415,"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","inventories","python","replication","simpy","simulation"],"created_at":"2024-10-03T17:09:20.602Z","updated_at":"2025-05-07T14:40:50.521Z","avatar_url":"https://github.com/wamuir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simpy-stockout\n\n\n## About\n\nThis is a replication, in Python, of the discrete event simulation given by Law and Kelton (2000) for a single-product inventory system (s,S), previously written in FORTRAN (p. 66) and in C (p. 73).\n\nNote that Law and Kelton run a single replication, as does this Python replication, and thus the output will differ some between the simulations due, for instance, to the use of different random number streams.\n\n\n### Results given in Law and Kelton (2000)\n\n| Inventory Policy | Average total cost | Average ordering cost | Average holding cost | Average shortage cost |\n| :----: | :----------------: | :-------------------: | :------------------: | :-------------------: |\n| ( 20, 40) | 126.61 |  99.26 |  9.25 | 18.10 |\n| ( 20, 60) | 122.74 |  90.52 | 17.39 | 14.83 |\n| ( 20, 80) | 123.86 |  87.36 | 26.24 | 10.26 |\n| ( 20,100) | 125.32 |  81.37 | 36.00 |  7.95 |\n| ( 40, 60) | 126.37 |  98.43 | 25.99 |  1.95 |\n| ( 40, 80) | 125.46 |  88.40 | 35.92 |  1.14 |\n| ( 40,100) | 132.34 |  84.62 | 46.42 |  1.30 |\n| ( 60, 80) | 150.02 | 105.69 | 44.02 |  0.31 |\n| ( 60,100) | 143.20 |  89.05 | 53.91 |  0.24 |\n\n\n### Results from replication in Python (using SimPy DES library)\n\n| Inventory Policy | Average total cost | Average ordering cost | Average holding cost | Average shortage cost |\n| :----: | :----------------: | :-------------------: | :------------------: | :-------------------: |\n| ( 20, 40) | 126.87 | 97.36 |  8.61 | 20.90 |\n| ( 20, 60) | 124.72 | 92.13 | 15.87 | 16.71 |\n| ( 20, 80) | 128.44 | 90.36 | 24.19 | 13.89 |\n| ( 20,100) | 126.37 | 81.82 | 37.24 |  7.31 |\n| ( 40, 60) | 125.92 | 99.18 | 25.16 |  1.57 |\n| ( 40, 80) | 120.65 | 85.70 | 34.55 |  0.39 |\n| ( 40,100) | 131.16 | 85.11 | 45.76 |  0.29 |\n| ( 60, 80) | 138.88 | 92.85 | 45.96 |  0.07 |\n| ( 60,100) | 145.83 | 88.98 | 56.85 |  0.00 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwamuir%2Fsimpy-stockout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwamuir%2Fsimpy-stockout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwamuir%2Fsimpy-stockout/lists"}