{"id":19289913,"url":"https://github.com/garro95/desim","last_synced_at":"2025-04-22T05:32:07.530Z","repository":{"id":37735407,"uuid":"127355094","full_name":"garro95/desim","owner":"garro95","description":"A discrete-time events simulation framework, written in rust, using the generator experimental feature","archived":false,"fork":false,"pushed_at":"2024-09-23T21:44:16.000Z","size":112,"stargazers_count":55,"open_issues_count":4,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T22:17:46.546Z","etag":null,"topics":["discrete","events","framework","simulator","time"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garro95.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-03-29T22:47:28.000Z","updated_at":"2024-11-01T14:30:16.000Z","dependencies_parsed_at":"2023-11-28T00:47:16.764Z","dependency_job_id":null,"html_url":"https://github.com/garro95/desim","commit_stats":{"total_commits":75,"total_committers":10,"mean_commits":7.5,"dds":"0.21333333333333337","last_synced_commit":"c3698417e272950498171a0f7cc1e24ba2bfb728"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garro95%2Fdesim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garro95%2Fdesim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garro95%2Fdesim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garro95%2Fdesim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garro95","download_url":"https://codeload.github.com/garro95/desim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250175078,"owners_count":21387133,"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","events","framework","simulator","time"],"created_at":"2024-11-09T22:17:24.844Z","updated_at":"2025-04-22T05:32:07.217Z","avatar_url":"https://github.com/garro95.png","language":"Rust","readme":"# desim\n[![crate](https://img.shields.io/crates/v/desim.svg)](https://crates.io/crates/desim)\n[![Build](https://github.com/garro95/desim/actions/workflows/build.yml/badge.svg)](https://github.com/garro95/desim/actions/workflows/build.yml)\n[![Test](https://github.com/garro95/desim/actions/workflows/test.yml/badge.svg)](https://github.com/garro95/desim/actions/workflows/test.yml)\n\ndesim stands for Discrete-time Events SIMulator.\nIt aims to be a high quality, easy to use simulation framework for physical or\nlogical systems that are based on processes that are triggered by events\nand that can cause other events to occur.\n\nIt is inspired by the Simpy environment for Python,\nbut with the aim of being more efficient and to provide also a concurrent\nimplementation.\nTo achieve the same ease of use remaining light and efficient, it is based on\nthe experimental _coroutines_ rust feature.\n\nYou can read the [API documentation here](https://docs.rs/desim)\n\n## Usage\nTo use the framework, add the following line to your Cargo.toml:\n```\ndesim = \"0.4\"\n```\nVersion numbers follow the [semver](https://semver.org/) convention.\n\nThe simulation environment is provided by the `Simulation` struct, which exposes\nmethods to spawn processes, allocate resources and schedule events.\nMoreover it offers getters to retrieve the current time and the ordered list of\nprocessed events and methods to process the next event in the simulation and to\nrun all the events until a certain condition is verified.\n\nA process is a coroutine that yields a variant of the `Effect` enum.\nUsing this type the process may interact with the simulation,\nfor example scheduling events or requesting resources.\n\nFor more information see the API documentation linked above.\n\n## Examples\nThe examples folder contains some simulations that use desim.\nYou can build and run them with `cargo run --example \u003cname\u003e`.\n\n## Contributing\nFeel free to contribute to this project with pull requests and/or issues.\nAll contribution should be under a license compatible with the GNU GPLv3.\n\n\u003e Why did you chose the GNU GPL instead of a more permissive license like Apache/MIT?\n\nBecause I wrote a piece of free software and I don't want it to be used as the\nbasis of a proprietary one. Improvements of this work or simulation software\nwritten using desim as a library should be free software as well.\n\n## Changes\n* 0.4.0 Replace every occurrence of `generator` with `coroutine`\n* 0.3.0 Allow the definition of custom Resource types.  \n   WARNING: contains breaking changes: \n   - `SimGen` has been renamed to `Process`\n   - `Resource` is now a trait and the `create_resource` method has been updated to take in input a `Box\u003cdyn Resource\u003cT\u003e\u003e`\n   - The old resource type can still be used creating an instance of `SimpleResource`\n* 0.2.0 With generators resume arguments support, add a Simulation Context that is passed to processes on resume and can be used to retrieve the simulation time or the event that caused the generator to resume\n* 0.1.0 First release\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarro95%2Fdesim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarro95%2Fdesim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarro95%2Fdesim/lists"}