npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sim-rs

v0.13.0

Published

Sim is a discrete event simulation package that facilitates Rust- and npm-based simulation products and projects

Downloads

14

Readme

stability-experimental GitHub Workflow Status Crates.io Crates.io npm npm docs.rs Codecov Crates.io

"Sim" or "SimRS" is a discrete event simulation package that facilitates Rust- and npm-based simulation products and projects.

This repository contains:

  1. Random variable framework, for easy specification of stochastic model behaviors.
  2. Out-of-the-box models, for quickly building out simulations of dynamic systems with common modular components.
  3. Output analysis framework, for analyzing simulation outputs statistically.
  4. Simulator engine, for managing and executing discrete event simulations.
  5. Custom model macros, for seamlessly integrating custom models into simulations.

Sim is compatible with a wide variety of compilation targets, including WebAssembly. Sim does not require nightly Rust.

Table of Contents

Background

Simulation is a powerful tool for analyzing and designing complex systems. However, most simulators have steep learning curves, are proprietary, and suffer from limited portability. Sim aspires to reduce the time required to build new simulation products, complete simulation projects, and learn simulation fundamentals. Sim is open source and, by virtue of compilation target flexibility, relatively portable.

Install

For use in Rust code bases, leverage the package as a cargo dependency

[dependencies]
sim = "0.13"

For use as a WebAssembly module in a JavaScript/TypeScript code base, leverage the package as a npm dependency

npm i sim-rs

Usage

Rust simulations are created by passing Models and Connectors to Simulation's post constructor. WebAssembly simulations are defined in a declarative YAML or JSON format, and then ingested through WebSimulation's post_yaml or post_json constructors. Both models and connectors are required to define the simulation. For descriptions of the out-of-the-box models, see MODELS.md.

Simulations may be stepped with the step, step_n, and step_until methods. Input injection is possible with the inject_input method.

Analyzing simulations will typically involve some combination of processing model records, collecting message transfers, and using output analysis tools. Analysis of IID samples and time series data are possible.

Please refer to the documentation at https://docs.rs/sim. Also, the test simulations are a good reference for creating, running, and analyzing simulations with Sim.

Contributing

Issues, feature requests, and pull requests are always welcome!

License

This project is licensed under either of Apache License, Version 2.0 or MIT License at your option.

Apache License, Version 2.0

MIT License

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in sim by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.