SimSharp 3.1.1

Sim# aims to port the concepts used in SimPy ( to the .NET world. It is implemented in C# and builds on the .NET Framework 4.5 / .NET Standard 2.0. Sim# uses an efficient event queue (adapted from The MachineShop benchmark comes close to 3.5 million events per second on a Core i7-7 2.7Ghz.

SimPy allows modeling processes easily and with little boiler plate code. A process is described as a method that yields events. When an event is yielded, the process waits on it. Processes are themselves events and so it is convenient to spawn sub-processes that can either be waited upon or that run next to each other. There is no need to inherit from classes or understand a complex object oriented design.

Install-Package SimSharp -Version 3.1.1
dotnet add package SimSharp --version 3.1.1
<PackageReference Include="SimSharp" Version="3.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SimSharp --version 3.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

- Fixes a bug when canceling a request of ResourcePool while it is still in the request queue (added unit test)
- Improves When* events with respect to canceled requests for all resources

- Introduce a faster non-thread safe Simulation class (Environment is now obsolete - backwards compatibility should be preserved)
- Introduce When* events for resources allowing to observe changes without having to fall back to using tiny intervals
- Introduce PriorityStore that can be used whenever a simple priority queue should be modeled
- Introduce permuted congruential generator (PCG) as default random number generator in Simulation (Environment will still default to System.Random as before)
- Change method to generate normal distributed random values to Marsaglia-polar method (Environment still uses the old method)
- Introduce additional API methods to provide a separate RNG instance
- Introduce additional API for generating log-normal distributed values (by giving desired mean and stdev)
- Remove warnings by changing "Process" property of events to "Owner" also enabling to set it (when ownership changes, e.g. as the request is handed to a different process)
- PreemptiveResource now uses the same priority handling as SimPy (breaks backwards compatibility - results may change)
- Remove net40 target (simplifies the build)
- Fix GasStationRefueling sample

- Fixed bug that would cause an infinite loop in ResourcePool when requesting unavailable objects

- Added target for .NET Standard 2.0 in addition to .NET Framework 4 and .NET Framework 4.5
- Fixed bug that would allow a process to continue if it yielded a failed process that has already been processed

- Fixed bug that would not dispose of resource requests if they are released before they are processed

  • .NETFramework 4.5

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.1.1 185 1/4/2019
3.1.0 122 12/17/2018 219 6/26/2018
3.0.10 366 9/27/2017
3.0.9 448 3/23/2016
3.0.8 421 8/21/2015
3.0.7 371 3/1/2015
3.0.5 401 9/14/2014
3.0.4 333 8/25/2014