OpenCARP Actors
This project sets up the environment for openCARP-Actors. With this directory you can launch a docker container with the required software including the openCARP-Actors code.
Environment Set Up
The best way to set up the development environment is to use docker. Inside the environment_setup
folder there are files for setting up the docker environment.
Setting up the environment should require no modification to the existing files. However, if you need something different, you can modify the files. If you do
modify the docker environment, please add the installation of the required software to the Dockerfile
, this way the environment can easily be recreated with the
addition of the new software.
To build and run the docker container, run the following commands from the environment_setup
folder:
- ./build_container.sh
- ./run_container.sh
These commands should start a docker container with the required software installed. Additionally, this git project should now be mounted in the docker container.
The files that make up this repository should appear in /code
inside the docker container.
Legacy Scripts
The original bash scripts for interacting with openCARP are in the legacy_scripts
folder. These are not used in the current implementation, but are kept as they
are the basis for the actors script.
Actors Program
Introduction
The actors program is a combination of a c++ program that invokes python scripts that interact with openCARP.
The C++ program manages the actors and the logic behind finding the optimal S1 and S2 intervals. The python scripts are used to interact with openCARP.
Compiling the actors porgram
To compile the actors program, run the following commands:
- mkdir build
- cd build
- cmake ..
- make
Upon success a s1_s2_simulation binary will be created in the top-level directory.
Running the actor program
List of command line arguments: --duration (Duration of simulation in [ms]) --S1-min (minimum S1 strength for bisection [uA/cm^2]) --S1-max (maximum S1 strength for bisection [uA/cm^2]) --S1-dur (Duration of S1 stimulus in [ms]) --tol (Tolerance of Bisection Method) --S2-min (minimum S2 strength for bisection [uA/cm^2]) --S2-max (maximum S2 strength for bisection [uA/cm^2]) --S2-interval-min (minimum S2 interval for bisection [ms]) --S2-interval-max (maximum S2 interval for bisection [ms]) --S2-interval-inc (increment of S2 interval for bisection [ms]);
Running the code: ./s1_s2_simulation --duration 1000 --S1-min 0.1 --S1-max 0.5 --S1-dur 2 --tol 0.01 --S2-min 0.1 --S2-max 0.5 --S2-interval-min 100 --S2-interval-max 200 --S2-interval-inc 10
All command line arguments are set to a default value. If you do not specify a command line argument, the default value will be used.