Commit 1d3d7700 authored by pkda001's avatar pkda001

Reorganized repo files

parent fed6ec2b
......@@ -8,10 +8,10 @@ if(POLICY CMP0053)
endif()
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
message( STATUS "64 bits compiler detected" )
message( STATUS "64 bits compiler detected" )
set( EX_CONFIG "" )
set(FIND_LIBRARY_USE_LIB64_PATHS ON)
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
message( STATUS "32 bits compiler detected" )
set( EX_CONFIG "32" )
set(FIND_LIBRARY_USE_LIB64_PATHS OFF)
......@@ -33,7 +33,7 @@ endif()
string(TOLOWER ${CONFIGURATION} CONFIGURATION)
set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo CACHE TYPE INTERNAL FORCE )
if(MSVC)
if(MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Zi /Ob2 /Oi /Od /RTC1" CACHE TYPE INTERNAL FORCE)
endif()
......@@ -51,4 +51,4 @@ if(UNIX)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:\$ORIGIN")
endif()
include(cmdsim.cmake)
include(clasim.cmake)
# CLASim
# CLAsim
The closed-loop assistant (CLA) simulation framework (CLASim) enables simulation of the interaction between closed-loop medical systems consisting of patient monitors, closed-loop physiology management algorithms, and infusion pumps, and patient physiology. It is writtne in C++ and relies on the <a href="https://physiology.kitware.com/">Pulse Physiology Engine</a> for simulating patient physiology.
## Getting Started
### Installing Pulse and CLASim
CLASim is has only been tested on Ubuntu 16.04. This is the recommended platform. We hope to support other platforms soon.
### Installing Pulse and CLAsim
CLAsim is has only been tested on Ubuntu 16.04. This is the recommended platform. We hope to support other platforms soon.
#### Pulse
To install <a href="https://gitlab.kitware.com/physiology/engine">Pulse repository</a> and follow the instructions there. Be sure to follow the instructions for Ubuntu. *For Java, be sure to use the openjdk version.*
#### CLASim
1. Check out the CLAsim repository into a folder of your choice
2. Install libconfig++
1. Check out the CLAsim repository into a folder of your choice.
2. Install libconfig++
~~~bash
# update packages
sudo apt-get update
$ sudo apt-get update
# install libconfig++
sudo apt-get install libconfig++-dev
$ sudo apt-get install libconfig++-dev
~~~
3. Use `$ dpkg -L libconfig++-dev` to find the location of `libconfig.h++` and `libconfig++.a`.
4. Fill in lines 5 and 6 of `clasim.cmake` with the information for the locations for `libconfig.h++` and `libconfig++.a`.
5. Install CLASim with CMake
~~~bash
# make sure you are in the CLAsim folder
$ cd <PathToCLAsim>
# create a builds directory
$ mkdir builds
# enter builds folder
$ cd builds
# connect Pulse and CLASim for CMake Install
$ cmake .. -DCMAKE_PREFIX_PATH= <PathToPulse>/builds/install/
# create CLASim add_executable
$ make
$ make Install
~~~
6. Test that the CLASim executable installed properly.
~~~bash
# go to Pulse bin directory
# (CLAsim executable installs there)
$ cd <PathToPulse>/builds/install/bin
# copy CLAsim config file to Pulse config folder
$ cp <PathToCLAsim>/resources/scenario.cfg config/
# run CLAsim
$ ./clasim
~~~
### Running Demo Examples
......@@ -2,16 +2,17 @@ cmake_minimum_required(VERSION 3.9.4)
project(cmd)
# use ddpkg -L libconfig++-dev to find the location of libconfig.h++ and libconfig++.so
find_path(CONFIG++_INCLUDE_DIR libconfig.h++ /usr/include /usr/local/include)
find_library(CONFIG++_LIBRARY NAMES libconfig++.a PATH /usr/lib/x86_64-linux-gnu/)
# use dpkg -L libconfig++-dev to find the location of libconfig.h++ and libconfig++.a
find_path(CONFIG++_INCLUDE_DIR libconfig.h++ <libconfig.h++ location>)
find_library(CONFIG++_LIBRARY NAMES libconfig++.a PATH <libconfig++.a location>)
# source files directory -> To handle multiple controllers switch between different
# source directories
set(CMD_SRC_DIR src_ctrl2)
# set your simulation source directory
set(SIM_SRC_DIR simsrc/mcps2018/algo2)
# source files
# *** include your source files
# list each file individually
set(MY_SOURCE_FILES
${CMD_SRC_DIR}/SimEngine.cpp
......@@ -25,14 +26,17 @@ set(MY_SOURCE_FILES
add_executable(cmd ${MY_SOURCE_FILES})
#cmd depends on pulse this will call will give you access to pulse directories
#cmd depends on pulse this will call will give you access to pulse directories
#needed by cmd
find_package(Pulse REQUIRED NO_MODULE)
find_package(Pulse REQUIRED NO_MODULE)
#include directories
target_include_directories(cmd PRIVATE ${Pulse_INCLUDE_DIRS})
target_include_directories(cmd PRIVATE ${CONFIG++_INCLUDE_DIR})
target_include_directories(cmd PRIVATE include/)
# *** include your simulation include directories here
target_include_directories(cmd PRIVATE simsrc/mcps2018/include/)
#libraries
target_link_libraries(cmd debug "${Pulse_DEBUG_LIBS}")
target_link_libraries(cmd optimized "${Pulse_LIBS}")
......
This "config file" goes inside pulse's "../install/bin/config/" directory
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment