Commit 7ad41db0 authored by pkda001's avatar pkda001

Merge branch 'master' of https://gitlab.bucknell.edu/fmg005/cmd

parents 36cad1e4 26404674
......@@ -7,10 +7,9 @@ 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/)
include_directories(include)
# source files directory -> handle multiple controllers
set(CMD_SRC_DIR src)
# source files directory -> To handle multiple controllers switch between different
# source directories
set(CMD_SRC_DIR src_ctrl2)
# source files
set(MY_SOURCE_FILES
......@@ -26,23 +25,18 @@ set(MY_SOURCE_FILES
add_executable(cmd ${MY_SOURCE_FILES})
## This is how you connect that executable to Pulse
# Find the Pulse package
# Again, set Pulse_DIR to the install directory with the PulseConfig.cmake file, or make the developer set this when building the code
find_package(Pulse REQUIRED NO_MODULE) # If you don't, CMake will halt here
# You will now have access to all the variables set in the PulseConfig.cmake in the Pulse install directory
# Go open it and look through to see what you have
#cmd depends on pulse this will call will give you access to pulse directories
#needed by cmd
find_package(Pulse REQUIRED NO_MODULE)
#include directories
target_include_directories(cmd PRIVATE ${Pulse_INCLUDE_DIRS})
target_include_directories(cmd PRIVATE ${CONFIG++_INCLUDE_DIR})
# Some debug libraries have different names than the release libs
target_include_directories(cmd PRIVATE include/)
#libraries
target_link_libraries(cmd debug "${Pulse_DEBUG_LIBS}")
target_link_libraries(cmd optimized "${Pulse_LIBS}")
target_link_libraries(cmd optimized "${CONFIG++_LIBRARY}")
# That is it, your program is now linked to Pulse
install(TARGETS cmd RUNTIME DESTINATION ${Pulse_INSTALL}/bin)
......@@ -12,12 +12,12 @@ Controller::Controller(CMD::Environment* env, PhysiologyData* data, std::map<str
// Initalize algorithm configuration variables
currentNorepiInfusionRate = 0;
SalineInfusionRate = 75.0;
maxNorepinephrineInfusionRate = 112.5;
SalineInfusionRate = 50.0;
maxNorepinephrineInfusionRate = 84;
targetMAPRangeMax = 80.0;
targetMAPRangeMin = 75.0;
MAPIncreaseThreshold = 85;
percentOfRate = 0;
MAPIncreaseThreshold = 80;
percentOfRate = 0.75;
currentMAP = 0;
/* The first action the controller should take is initialize infusions */
......
......@@ -12,7 +12,7 @@ Pump::Pump()
Pump::Pump(CMD::Environment* env, PhysiologyData* data, string substance): m_env(env), m_data(data),
m_substance(substance), pump_rate(0), LOG_INITIAL_PUMP_RATE(true), pump_data{make_pair(0.0,0ul)} {
NorepiConcentration = 32;
NorepiConcentration = 16;
SalineBagVolume = 500;
......
......@@ -85,7 +85,7 @@ int main(){
t1 = clock();
Simulation("Hassan");
Simulation("Jeff");
t2 = clock();
......
......@@ -12,12 +12,12 @@ Controller::Controller(CMD::Environment* env, PhysiologyData* data, std::map<str
// Initalize algorithm configuration variables
currentNorepiInfusionRate = 0;
SalineInfusionRate = 75.0;
maxNorepinephrineInfusionRate = 112.5;
SalineInfusionRate = 50.0;
maxNorepinephrineInfusionRate = 84;
targetMAPRangeMax = 80.0;
targetMAPRangeMin = 75.0;
MAPIncreaseThreshold = 85;
percentOfRate = 0;
MAPIncreaseThreshold = 80;
percentOfRate = 0.875;
currentMAP = 0;
/* The first action the controller should take is initialize infusions */
......
......@@ -12,7 +12,7 @@ Pump::Pump()
Pump::Pump(CMD::Environment* env, PhysiologyData* data, string substance): m_env(env), m_data(data),
m_substance(substance), pump_rate(0), LOG_INITIAL_PUMP_RATE(true), pump_data{make_pair(0.0,0ul)} {
NorepiConcentration = 32;
NorepiConcentration = 16;
SalineBagVolume = 500;
......
......@@ -85,7 +85,7 @@ int main(){
t1 = clock();
Simulation("Hassan");
Simulation("ExtremeFemale");
t2 = clock();
......
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