Skip to content

Simulation-based analysis of complex systems involving people, devices, physical elements, and dynamic environments.

License

Notifications You must be signed in to change notification settings

Autodesk/sydevs

Repository files navigation

SyDEVS

The SyDEVS C++ library provides a framework for implementing complex systems simulation code in a modular and hierarchical fashion.

The framework combines three modeling paradigms: discrete event simulation, agent-based modeling, and dataflow programming. The discrete event simulation aspect is based on DEVS, a well-regarded modeling formalism involving two types of models that correspond with the atomic and composite nodes of SyDEVS. SyDEVS also includes collection nodes, which extend DEVS with agent-based modeling capabilities, and function nodes, for dataflow programming. Atomic, composite, collection, and function nodes communicate through flow ports as part of a dataflow programming network. Atomic, composite, and collection nodes also communicate in a DEVS-like fashion through message ports.

In addition to supporting multiple modeling paradigms, the SyDEVS library provides comprehensive and reusable Modern C++ implementations of multidimensional arrays, Standard International (SI) units, a multiscale time representation, and other technical computing elements.

The main SyDEVS website is at https://autodesk.github.io/sydevs.

The SyDEVS API reference is at https://autodesk.github.io/sydevs/doc/html.

Instructions

Using SyDEVS

The recommended way to use SyDEVS in a simulation project is to include the latest release as an external library, as described in the Getting Started tutorial.

Building SyDEVS using MSVC on Windows

To build the SyDEVS examples and tests using CMake and Visual Studio 2022, follow the instructions below.

  1. Open a command prompt and navigate to the sydevs project directory.
  2. mkdir build
  3. cd build/
  4. cmake -G "Visual Studio 17 2022" -A x64 ..
  5. Open build/SyDEVS.sln in Visual Studio
  6. Recommendation: In Tools -> Options -> Text Editor -> C/C++ -> Tabs, select Insert spaces with a Tab size and Indent size of 4

Building SyDEVS using GCC on Windows

To build the SyDEVS examples and tests using CMake and TDM-GCC, follow the instructions below.

  1. Install the 64+32-bit MinGW-w64 edition of TDM-GCC.
  2. Open a command prompt and navigate to the sydevs project directory.
  3. mkdir bin
  4. cd bin/
  5. cmake -G "MinGW Makefiles" ..
  6. mingw32-make

Testing SyDEVS

Unit and regression tests are run automatically during the build process.

The unit testing framework used in SyDEVS is Catch2. See the documentation for a tutorial and reference material. Catch2 is released under the Boost Software License 1.0.

Note that the complete set of regression tests will only run if MSVC is used. If another compiler is used, the regression tests involving random distributions will be skipped, since different compilers are expected to generate different random samples.

Generating the API documentation

To build or update the documentation files with Doxygen, make sure you are in the top level directory where doxygen.config is located, and execute the following command:

  • doxygen doxygen.config

This will build the documentation in the doc directory. To view the documentation, go to docs/html and open index.html in your web browser.

You should update the documentation on a regular basis to keep it in sync with the code.

Releasing a new version of SyDEVS

When releasing a new version of SyDEVS, remember to perform the following steps:

  1. In doxygen.config, update the PROJECT_NUMBER.
  2. Ensure the change above is merged into the main branch of the repo.
  3. Create the new release.
  4. Generate the API documentation, and copy the contents of doc/html.
  5. Checkout the gh-pages branch of the repo.
  6. In the gh-pages branch, replace the contents of doc/html with the contents copied above.

Documentation

Website

The Main SyDEVS Website includes an Overview, a Getting Started tutorial, a User Manual, and the API Reference for the latest release.

Examples

Examples of SyDEVS-based simulations are found in the src/examples directory.

The best examples for learning the library are those in demo.

In particular, the queueing project features one well-commented example of each of the four main types of nodes:

Contributing

Review the contributing guidelines before you consider working on SyDEVS and proposing contributions.

License

SPDX-License-Identifier: Apache-2.0

About

Simulation-based analysis of complex systems involving people, devices, physical elements, and dynamic environments.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •