Skip to content

2. Installation

Román Cárdenas edited this page Jul 2, 2022 · 11 revisions

Cadmium 2 is a header-only library. This means that you don't need to compile nor install it in your machine. You just have to include the header files to your project. To "install" Cadmium, you just have to download this repository and all its submodules on your local machine using git. Open a terminal (a Cygwin terminal in Windows) and insert the following commands:

cd <WORKSPACE>  # Set the terminal working directory to taste
git clone https://github.com/SimulationEverywhere/cadmium_v2.git  # Download Cadmium 2
cd cadmium_v2  # move to the parent folder of Cadmium 2
git submodule update --init --recursive  # Download the git submodules of Cadmium 2

And that's it: you already have everything you need for using Cadmium 2. Now, you just have to include the include/ directory of Cadmium 2 to your project. If you use CMake to build your Cadmium models (we highly recommend you to use it), you just have to include this directory in the CMakeLists.txt of your project:

include_directories(<RELATIVE_PATH_TO_WORKSPACE_FROM_YOUR_PROJECT>/cadmium_v2/include)

If you want to develop Cell-DEVS models, you will need to include additional directory to help Cadmium to parse your JSON configuration files. Again, if you use CMake, you just have to include this directory in the CMakeLists.txt of your project:

include_directories(<RELATIVE_PATH_TO_WORKSPACE_FROM_YOUR_PROJECT>/cadmium_v2/json/include)

Testing the Software

We use GitHub Actions, a tool for Continuous Integration (CI), to ensure that the devel and main branches pass all the tests. You can check there whether the code is stable or not. However, you may want to run some tests to make sure that everything works as expected. You have two options:

  1. Use make to run the tests:
cd build
make test
  1. Run the run_tests.sh shell script:
./run_tests.sh

Running Examples

To do.

GPT/EFP

To do.

DEVStone

To do.

Cell-DEVS SIR pandemic models

To do.

Clone this wiki locally