Updates will be applied on October 27th between 12pm - 12:45pm EDT (UTC-0400). Gitlab may be slow during the maintenance window.

Commit 2ed7fed7 authored by Bradley Feiger's avatar Bradley Feiger
Browse files

Reverted some changes and fixed nervous system feedback.

parent da69f06c
......@@ -190,10 +190,6 @@ void PBPhysiology::Serialize(const CDM_BIND::CardiovascularSystemData& src, SECa
PBProperty::Load(src.meanarterialcarbondioxidepartialpressuredelta(), dst.GetMeanArterialCarbonDioxidePartialPressureDelta());
if (src.has_meancentralvenouspressure())
PBProperty::Load(src.meancentralvenouspressure(), dst.GetMeanCentralVenousPressure());
if (src.has_meancerebralbloodflow())
PBProperty::Load(src.meancerebralbloodflow(), dst.GetMeanCerebralBloodFlow());
if (src.has_meancerebralperfusionpressure())
PBProperty::Load(src.meancerebralperfusionpressure(), dst.GetMeanCerebralPerfusionPressure());
if (src.has_meanskinflow())
PBProperty::Load(src.meanskinflow(), dst.GetMeanSkinFlow());
if (src.has_pulmonaryarterialpressure())
......@@ -263,10 +259,6 @@ void PBPhysiology::Serialize(const SECardiovascularSystem& src, CDM_BIND::Cardio
dst.set_allocated_meanarterialcarbondioxidepartialpressuredelta(PBProperty::Unload(*src.m_MeanArterialCarbonDioxidePartialPressureDelta));
if (src.HasMeanCentralVenousPressure())
dst.set_allocated_meancentralvenouspressure(PBProperty::Unload(*src.m_MeanCentralVenousPressure));
if (src.HasMeanCerebralBloodFlow())
dst.set_allocated_meancerebralbloodflow(PBProperty::Unload(*src.m_MeanCerebralBloodFlow));
if (src.HasMeanCerebralPerfusionPressure())
dst.set_allocated_meancerebralperfusionpressure(PBProperty::Unload(*src.m_MeanCerebralPerfusionPressure));
if (src.HasMeanSkinFlow())
dst.set_allocated_meanskinflow(PBProperty::Unload(*src.m_MeanSkinFlow));
if (src.HasPulmonaryArterialPressure())
......
......@@ -33,8 +33,6 @@ SECardiovascularSystem::SECardiovascularSystem(Logger* logger) : SESystem(logger
m_MeanArterialCarbonDioxidePartialPressure = nullptr;
m_MeanArterialCarbonDioxidePartialPressureDelta = nullptr;
m_MeanCentralVenousPressure = nullptr;
m_MeanCerebralBloodFlow = nullptr;
m_MeanCerebralPerfusionPressure = nullptr;
m_MeanSkinFlow = nullptr;
m_PulmonaryArterialPressure = nullptr;
m_PulmonaryCapillariesWedgePressure = nullptr;
......@@ -76,8 +74,6 @@ void SECardiovascularSystem::Clear()
SAFE_DELETE(m_MeanArterialCarbonDioxidePartialPressure);
SAFE_DELETE(m_MeanArterialCarbonDioxidePartialPressureDelta);
SAFE_DELETE(m_MeanCentralVenousPressure);
SAFE_DELETE(m_MeanCerebralBloodFlow);
SAFE_DELETE(m_MeanCerebralPerfusionPressure);
SAFE_DELETE(m_MeanSkinFlow);
SAFE_DELETE(m_PulmonaryArterialPressure);
SAFE_DELETE(m_PulmonaryCapillariesWedgePressure);
......@@ -127,10 +123,6 @@ const SEScalar* SECardiovascularSystem::GetScalar(const std::string& name)
return &GetMeanArterialCarbonDioxidePartialPressureDelta();
if (name.compare("MeanCentralVenousPressure") == 0)
return &GetMeanCentralVenousPressure();
if (name.compare("MeanCerebralBloodFlow") == 0)
return &GetMeanCerebralBloodFlow();
if (name.compare("MeanCerebralPerfusionPressure") == 0)
return &GetMeanCerebralPerfusionPressure();
if (name.compare("MeanSkinFlow") == 0)
return &GetMeanSkinFlow();
if (name.compare("PulmonaryArterialPressure") == 0)
......@@ -441,40 +433,6 @@ double SECardiovascularSystem::GetMeanCentralVenousPressure(const PressureUnit&
return m_MeanCentralVenousPressure->GetValue(unit);
}
bool SECardiovascularSystem::HasMeanCerebralBloodFlow() const
{
return m_MeanCerebralBloodFlow == nullptr ? false : m_MeanCerebralBloodFlow->IsValid();
}
SEScalarVolumePerTime& SECardiovascularSystem::GetMeanCerebralBloodFlow()
{
if (m_MeanCerebralBloodFlow == nullptr)
m_MeanCerebralBloodFlow = new SEScalarVolumePerTime();
return *m_MeanCerebralBloodFlow;
}
double SECardiovascularSystem::GetMeanCerebralBloodFlow(const VolumePerTimeUnit& unit) const
{
if (m_MeanCerebralBloodFlow == nullptr)
return SEScalar::dNaN();
return m_MeanCerebralBloodFlow->GetValue(unit);
}
bool SECardiovascularSystem::HasMeanCerebralPerfusionPressure() const
{
return m_MeanCerebralPerfusionPressure == nullptr ? false : m_MeanCerebralPerfusionPressure->IsValid();
}
SEScalarPressure& SECardiovascularSystem::GetMeanCerebralPerfusionPressure()
{
if (m_MeanCerebralPerfusionPressure == nullptr)
m_MeanCerebralPerfusionPressure = new SEScalarPressure();
return *m_MeanCerebralPerfusionPressure;
}
double SECardiovascularSystem::GetMeanCerebralPerfusionPressure(const PressureUnit& unit) const
{
if (m_MeanCerebralPerfusionPressure == nullptr)
return SEScalar::dNaN();
return m_MeanCerebralPerfusionPressure->GetValue(unit);
}
bool SECardiovascularSystem::HasMeanSkinFlow() const
{
return m_MeanSkinFlow == nullptr ? false : m_MeanSkinFlow->IsValid();
......
......@@ -87,14 +87,6 @@ public:
virtual SEScalarPressure& GetMeanCentralVenousPressure();
virtual double GetMeanCentralVenousPressure(const PressureUnit& unit) const;
virtual bool HasMeanCerebralBloodFlow() const;
virtual SEScalarVolumePerTime& GetMeanCerebralBloodFlow();
virtual double GetMeanCerebralBloodFlow(const VolumePerTimeUnit& unit) const;
virtual bool HasMeanCerebralPerfusionPressure() const;
virtual SEScalarPressure& GetMeanCerebralPerfusionPressure();
virtual double GetMeanCerebralPerfusionPressure(const PressureUnit& unit) const;
virtual bool HasMeanSkinFlow() const;
virtual SEScalarVolumePerTime& GetMeanSkinFlow();
virtual double GetMeanSkinFlow(const VolumePerTimeUnit& unit) const;
......@@ -166,8 +158,6 @@ protected:
SEScalarPressure* m_MeanArterialCarbonDioxidePartialPressure;
SEScalarPressure* m_MeanArterialCarbonDioxidePartialPressureDelta;
SEScalarPressure* m_MeanCentralVenousPressure;
SEScalarVolumePerTime* m_MeanCerebralBloodFlow;
SEScalarPressure* m_MeanCerebralPerfusionPressure;
SEScalarVolumePerTime* m_MeanSkinFlow;
SEScalarPressure* m_PulmonaryArterialPressure;
SEScalarPressure* m_PulmonaryCapillariesWedgePressure;
......@@ -176,9 +166,9 @@ protected:
SEScalarVolumePerTime* m_PulmonaryMeanCapillaryFlow;
SEScalarVolumePerTime* m_PulmonaryMeanShuntFlow;
SEScalarPressure* m_PulmonarySystolicArterialPressure;
SEScalarPressureTimePerVolume* m_PulmonaryVascularResistance;
SEScalarPressureTimePerVolume* m_PulmonaryVascularResistance;
SEScalarPressureTimePerVolumeArea* m_PulmonaryVascularResistanceIndex;
SEScalarPressure* m_PulsePressure;
SEScalarPressure* m_SystolicArterialPressure;
SEScalarPressureTimePerVolume* m_SystemicVascularResistance;
SEScalarPressureTimePerVolume* m_SystemicVascularResistance;
};
\ No newline at end of file
......@@ -94,8 +94,6 @@ void PBPulsePhysiology::Serialize(const PULSE_BIND::CardiovascularData& src, Car
PBProperty::Load(src.cardiaccyclepulmonaryshuntflow_ml_per_s(), *dst.m_CardiacCyclePulmonaryShuntFlow_mL_Per_s);
PBProperty::Load(src.cardiaccyclepulmonaryarterypressure_mmhg(), *dst.m_CardiacCyclePulmonaryArteryPressure_mmHg);
PBProperty::Load(src.cardiaccyclecentralvenouspressure_mmhg(), *dst.m_CardiacCycleCentralVenousPressure_mmHg);
PBProperty::Load(src.cardiaccyclecerebralbloodflow_ml_per_s(), *dst.m_CardiacCycleCerebralBloodFlow_mL_Per_s);
PBProperty::Load(src.cardiaccyclecerebralperfusionpressure_mmhg(), *dst.m_CardiacCycleCerebralPerfusionPressure_mmHg);
PBProperty::Load(src.cardiaccycleskinflow_ml_per_s(), *dst.m_CardiacCycleSkinFlow_mL_Per_s);
// As these are dynamically added to the system during run time,
......@@ -184,8 +182,6 @@ void PBPulsePhysiology::Serialize(const Cardiovascular& src, PULSE_BIND::Cardiov
dst.set_allocated_cardiaccyclepulmonaryshuntflow_ml_per_s(PBProperty::Unload(*src.m_CardiacCyclePulmonaryShuntFlow_mL_Per_s));
dst.set_allocated_cardiaccyclepulmonaryarterypressure_mmhg(PBProperty::Unload(*src.m_CardiacCyclePulmonaryArteryPressure_mmHg));
dst.set_allocated_cardiaccyclecentralvenouspressure_mmhg(PBProperty::Unload(*src.m_CardiacCycleCentralVenousPressure_mmHg));
dst.set_allocated_cardiaccyclecerebralbloodflow_ml_per_s(PBProperty::Unload(*src.m_CardiacCycleCerebralBloodFlow_mL_Per_s));
dst.set_allocated_cardiaccyclecerebralperfusionpressure_mmhg(PBProperty::Unload(*src.m_CardiacCycleCerebralPerfusionPressure_mmHg));
dst.set_allocated_cardiaccycleskinflow_ml_per_s(PBProperty::Unload(*src.m_CardiacCycleSkinFlow_mL_Per_s));
for (auto* l : src.m_HemorrhageLinks)
......@@ -329,8 +325,6 @@ void PBPulsePhysiology::Load(const PULSE_BIND::NervousData& src, Nervous& dst)
void PBPulsePhysiology::Serialize(const PULSE_BIND::NervousData& src, Nervous& dst)
{
PBPhysiology::Serialize(src.common(), dst);
// We assume state have to be after all stabilization
dst.m_FeedbackActive = true;
dst.m_ArterialOxygenBaseline_mmHg = src.arterialoxygenbaseline_mmhg();
dst.m_ArterialCarbonDioxideBaseline_mmHg = src.arterialcarbondioxidebaseline_mmhg();
dst.m_BaroreceptorFeedbackStatus = src.baroreceptorfeedbackstatus();
......
......@@ -73,8 +73,6 @@ Cardiovascular::Cardiovascular(PulseData& data) : PulseCardiovascularSystem(data
m_CardiacCyclePulmonaryShuntFlow_mL_Per_s = new SERunningAverage();
m_CardiacCyclePulmonaryArteryPressure_mmHg = new SERunningAverage();
m_CardiacCycleCentralVenousPressure_mmHg = new SERunningAverage();
m_CardiacCycleCerebralBloodFlow_mL_Per_s = new SERunningAverage();
m_CardiacCycleCerebralPerfusionPressure_mmHg = new SERunningAverage();
m_CardiacCycleSkinFlow_mL_Per_s = new SERunningAverage();
Clear();
}
......@@ -91,8 +89,6 @@ Cardiovascular::~Cardiovascular()
delete m_CardiacCyclePulmonaryShuntFlow_mL_Per_s;
delete m_CardiacCyclePulmonaryArteryPressure_mmHg;
delete m_CardiacCycleCentralVenousPressure_mmHg;
delete m_CardiacCycleCerebralBloodFlow_mL_Per_s;
delete m_CardiacCycleCerebralPerfusionPressure_mmHg;
delete m_CardiacCycleSkinFlow_mL_Per_s;
}
......@@ -172,8 +168,6 @@ void Cardiovascular::Clear()
m_CardiacCyclePulmonaryShuntFlow_mL_Per_s->Clear();
m_CardiacCyclePulmonaryArteryPressure_mmHg->Clear();
m_CardiacCycleCentralVenousPressure_mmHg->Clear();
m_CardiacCycleCerebralBloodFlow_mL_Per_s->Clear();
m_CardiacCycleCerebralPerfusionPressure_mmHg->Clear();
m_CardiacCycleSkinFlow_mL_Per_s->Clear();
m_HemorrhageLinks.clear();
......@@ -229,8 +223,6 @@ void Cardiovascular::Initialize()
// Set system data based on physiology norms
GetMeanCentralVenousPressure().SetValue(5.0, PressureUnit::mmHg);
GetMeanCerebralBloodFlow().SetValue(0, VolumePerTimeUnit::mL_Per_s);
GetMeanCerebralPerfusionPressure().SetValue(85, PressureUnit::mmHg);
m_CardiacCycleArterialCO2PartialPressure_mmHg->Sample(60.0);
m_LastCardiacCycleMeanArterialCO2PartialPressure_mmHg = 60.0;
GetMeanArterialCarbonDioxidePartialPressure().SetValue(60, PressureUnit::mmHg);
......@@ -669,8 +661,6 @@ void Cardiovascular::CalculateVitalSigns()
// Grab data from the circuit in order to calculate a running mean
double AortaNodePressure_mmHg = m_Aorta->GetPressure(PressureUnit::mmHg);
double AortaNodeCO2PartialPressure_mmHg = m_AortaCO2 == nullptr ? 0 : m_AortaCO2->GetPartialPressure(PressureUnit::mmHg); // This is here so we can Tune circuit w/o substances
double BrainFlow_mL_Per_s = m_Brain->GetInFlow(VolumePerTimeUnit::mL_Per_s);
double BrainNodePerfusionPressure_mmHg = AortaNodePressure_mmHg - m_Brain->GetPressure(PressureUnit::mmHg);
double LeftPulmonaryArteryVolume_mL = m_LeftPulmonaryArteries->GetVolume(VolumeUnit::mL);
double RightPulmonaryArteryVolume_mL = m_RightPulmonaryArteries->GetVolume(VolumeUnit::mL);
double TotalPulmonaryArteryVolume_mL = LeftPulmonaryArteryVolume_mL + RightPulmonaryArteryVolume_mL;
......@@ -695,6 +685,7 @@ void Cardiovascular::CalculateVitalSigns()
double SkinFlow_mL_Per_s = m_pAortaToSkin->GetNextFlow(VolumePerTimeUnit::mL_Per_s);
double LHeartFlow_mL_Per_s = m_LeftHeartToAorta->GetNextFlow(VolumePerTimeUnit::mL_Per_s);
double LHeartVolume_mL = m_LeftHeart->GetVolume(VolumeUnit::mL);
double muscleFlow_mL_Per_s = m_pAortaToMuscle->GetNextFlow(VolumePerTimeUnit::mL_Per_s);
double gutFlow_mL_Per_s = m_pAortaToLargeIntestine->GetNextFlow(VolumePerTimeUnit::mL_Per_s) +
......@@ -735,8 +726,6 @@ void Cardiovascular::CalculateVitalSigns()
m_CardiacCyclePulmonaryShuntFlow_mL_Per_s->Sample(PulmShuntFlow_mL_Per_s);
m_CardiacCyclePulmonaryArteryPressure_mmHg->Sample(PulmonaryArteryNodePressure_mmHg);
m_CardiacCycleCentralVenousPressure_mmHg->Sample(VenaCavaPressure_mmHg);
m_CardiacCycleCerebralBloodFlow_mL_Per_s->Sample(BrainFlow_mL_Per_s);
m_CardiacCycleCerebralPerfusionPressure_mmHg->Sample(BrainNodePerfusionPressure_mmHg);
m_CardiacCycleSkinFlow_mL_Per_s->Sample(SkinFlow_mL_Per_s);
/// \todo Make sure irreversible state is hit before we get here.
......@@ -893,12 +882,6 @@ void Cardiovascular::RecordAndResetCardiacCycle()
// Mean Central Venous Pressure
GetMeanCentralVenousPressure().SetValue(m_CardiacCycleCentralVenousPressure_mmHg->Value(), PressureUnit::mmHg);
m_CardiacCycleCentralVenousPressure_mmHg->Clear();
// Mean Cerebral Blood Flow
GetMeanCerebralBloodFlow().SetValue(m_CardiacCycleCerebralBloodFlow_mL_Per_s->Value(), VolumePerTimeUnit::mL_Per_s);
m_CardiacCycleCerebralBloodFlow_mL_Per_s->Clear();
// Mean Cerebral Perfusion Pressure
GetMeanCerebralPerfusionPressure().SetValue(m_CardiacCycleCerebralPerfusionPressure_mmHg->Value(), PressureUnit::mmHg);
m_CardiacCycleCerebralPerfusionPressure_mmHg->Clear();
// Mean Skin Flow
GetMeanSkinFlow().SetValue(m_CardiacCycleSkinFlow_mL_Per_s->Value(), VolumePerTimeUnit::mL_Per_s);
m_CardiacCycleSkinFlow_mL_Per_s->Clear();
......@@ -2036,31 +2019,25 @@ void Cardiovascular::AdjustVascularTone()
double UpdatedCompliance_mL_Per_mmHg = 0.0;
double totalResistanceChange_mmHg_s_Per_mL = 0.0;
double totalComplianceChange_mL_Per_mmHg = 0.0;
if (m_data.GetConfiguration().IsNervousFeedbackEnabled())
{
if (m_data.GetNervous().HasBaroreceptorResistanceScale())
{
for (SEFluidCircuitPath* Path : m_systemicResistancePaths)
{
/// \todo We are treating all systemic resistance paths equally, including the brain.
UpdatedResistance_mmHg_s_Per_mL = m_data.GetNervous().GetBaroreceptorResistanceScale().GetValue() * Path->GetResistanceBaseline(PressureTimePerVolumeUnit::mmHg_s_Per_mL);
if (UpdatedResistance_mmHg_s_Per_mL < m_minIndividialSystemicResistance__mmHg_s_Per_mL)
{
UpdatedResistance_mmHg_s_Per_mL = m_minIndividialSystemicResistance__mmHg_s_Per_mL;
}
Path->GetNextResistance().SetValue(UpdatedResistance_mmHg_s_Per_mL, PressureTimePerVolumeUnit::mmHg_s_Per_mL);
}
}
if (m_data.GetNervous().HasBaroreceptorComplianceScale())
{
for (SEFluidCircuitPath* Path : m_systemicCompliancePaths)
{
UpdatedCompliance_mL_Per_mmHg = m_data.GetNervous().GetBaroreceptorComplianceScale().GetValue() * Path->GetComplianceBaseline(VolumePerPressureUnit::mL_Per_mmHg);
Path->GetNextCompliance().SetValue(UpdatedCompliance_mL_Per_mmHg, VolumePerPressureUnit::mL_Per_mmHg);
}
}
}
if (m_data.GetConfiguration().IsNervousFeedbackEnabled())
{
for (SEFluidCircuitPath* Path : m_systemicResistancePaths)
{
/// \todo We are treating all systemic resistance paths equally, including the brain.
UpdatedResistance_mmHg_s_Per_mL = m_data.GetNervous().GetBaroreceptorResistanceScale().GetValue() * Path->GetResistanceBaseline(PressureTimePerVolumeUnit::mmHg_s_Per_mL);
if (UpdatedResistance_mmHg_s_Per_mL < m_minIndividialSystemicResistance__mmHg_s_Per_mL)
{
UpdatedResistance_mmHg_s_Per_mL = m_minIndividialSystemicResistance__mmHg_s_Per_mL;
}
Path->GetNextResistance().SetValue(UpdatedResistance_mmHg_s_Per_mL, PressureTimePerVolumeUnit::mmHg_s_Per_mL);
}
for (SEFluidCircuitPath* Path : m_systemicCompliancePaths)
{
UpdatedCompliance_mL_Per_mmHg = m_data.GetNervous().GetBaroreceptorComplianceScale().GetValue() * Path->GetComplianceBaseline(VolumePerPressureUnit::mL_Per_mmHg);
Path->GetNextCompliance().SetValue(UpdatedCompliance_mL_Per_mmHg, VolumePerPressureUnit::mL_Per_mmHg);
}
}
//The drug response adjusts the systemic resistances according to the mean arterial pressure change calculated in Drugs.cpp
double ResistanceChange = 0.0;
......
......@@ -129,8 +129,6 @@ protected:
SERunningAverage* m_CardiacCyclePulmonaryShuntFlow_mL_Per_s;
SERunningAverage* m_CardiacCyclePulmonaryArteryPressure_mmHg;
SERunningAverage* m_CardiacCycleCentralVenousPressure_mmHg;
SERunningAverage* m_CardiacCycleCerebralBloodFlow_mL_Per_s;
SERunningAverage* m_CardiacCycleCerebralPerfusionPressure_mmHg;
SERunningAverage* m_CardiacCycleSkinFlow_mL_Per_s;
// Stateless member variable (Set in SetUp())
......
......@@ -84,6 +84,7 @@ void Nervous::Initialize()
void Nervous::SetUp()
{
m_dt_s = m_data.GetTimeStep().GetValue(TimeUnit::s);
m_FeedbackActive = m_data.GetConfiguration().IsNervousFeedbackEnabled();
m_NormalizedGammaHeartRate = m_data.GetConfiguration().GetNormalizedHeartRateIntercept();
m_NormalizedGammaElastance = m_data.GetConfiguration().GetNormalizedHeartElastanceIntercept();
m_NormalizedGammaCompliance = m_data.GetConfiguration().GetNormalizedComplianceIntercept();
......
......@@ -169,9 +169,6 @@ bool SARunner::RunSimulationUntilStable(std::string const& outDir, pulse::study:
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("HeartStrokeVolume", VolumeUnit::mL);
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("IntracranialPressure", PressureUnit::mmHg);
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("MeanArterialPressure", PressureUnit::mmHg);
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("MeanCentralVenousPressure", PressureUnit::mmHg);
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("MeanCerebralBloodFlow", VolumePerTimeUnit::L_Per_min);
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("MeanCerebralPerfusionPressure", PressureUnit::mmHg);
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("PulmonaryArterialPressure", PressureUnit::mmHg);
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("PulmonaryCapillariesWedgePressure", PressureUnit::mmHg);
pulse->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("PulmonaryDiastolicArterialPressure", PressureUnit::mmHg);
......@@ -247,9 +244,8 @@ bool SARunner::RunSimulationUntilStable(std::string const& outDir, pulse::study:
double currentBlood_mL = pulse->GetCardiovascularSystem()->GetBloodVolume(VolumeUnit::mL);
pulse->GetEngineTracker()->TrackData(time_s);
stableTime_s += timeStep_s;
time_s += timeStep_s;
stableTime_s += timeStep_s;
bool stableMAP = true;
if (GeneralMath::PercentDifference(previoustMap_mmHg, currentMap_mmHg) > stabPercentTolerance)
{
......@@ -291,6 +287,10 @@ bool SARunner::RunSimulationUntilStable(std::string const& outDir, pulse::study:
}
}
// TODO BF Check that what we overrided is still set to the same value
// This ensures the engine did not do anything to our resistances for some reason
// If they are different, we need to return false and look into why
// Fill out our results
sim.set_achievedstabilization(stable);
sim.set_stabilizationtime_s(profiler.GetElapsedTime_s("Total"));
......@@ -306,9 +306,6 @@ bool SARunner::RunSimulationUntilStable(std::string const& outDir, pulse::study:
sim.set_heartstrokevolume_ml(pulse->GetCardiovascularSystem()->GetHeartStrokeVolume(VolumeUnit::mL));
sim.set_intracranialpressure_mmhg(pulse->GetCardiovascularSystem()->GetIntracranialPressure(PressureUnit::mmHg));
sim.set_meanarterialpressure_mmhg(pulse->GetCardiovascularSystem()->GetMeanArterialPressure(PressureUnit::mmHg));
sim.set_meancentralvenouspressure_mmhg(pulse->GetCardiovascularSystem()->GetMeanCentralVenousPressure(PressureUnit::mmHg));
sim.set_meancerebralbloodflow_l_per_min(pulse->GetCardiovascularSystem()->GetMeanCerebralBloodFlow(VolumePerTimeUnit::L_Per_min));
sim.set_meancerebralperfusionpressure_mmhg(pulse->GetCardiovascularSystem()->GetMeanCerebralPerfusionPressure(PressureUnit::mmHg));
sim.set_pulmonaryarterialpressure_mmhg(pulse->GetCardiovascularSystem()->GetPulmonaryArterialPressure(PressureUnit::mmHg));
sim.set_pulmonarycapillarieswedgepressure_mmhg(pulse->GetCardiovascularSystem()->GetPulmonaryCapillariesWedgePressure(PressureUnit::mmHg));
sim.set_pulmonarydiastolicarterialpressure_mmhg(pulse->GetCardiovascularSystem()->GetPulmonaryDiastolicArterialPressure(PressureUnit::mmHg));
......
......@@ -49,8 +49,6 @@ int main(int argc, char* argv[])
pulse::study::sensitivity_analysis::bind::SimulationListData simList;
simList.set_outputrootdir("./test_results/sesitivity_analysis");
// TODO Lots of loops adding runs to our simList
std::cout << "Generated " << simList.simulation_size() << " simulations" << std::endl;
return !sar.Run(simList);
}
......
......@@ -83,21 +83,19 @@ message CardiovascularSystemData
ScalarPressureData MeanArterialCarbonDioxidePartialPressure = 15;/**<< @brief The mean of the partial pressure of carbon dioxide in the aorta over a cardiac cycle.*/
ScalarPressureData MeanArterialCarbonDioxidePartialPressureDelta = 16;/**<< @brief The change of the the mean of the partial pressure of carbon dioxide in the aorta from the previous cardiac cycle.*/
ScalarPressureData MeanCentralVenousPressure = 17;/**<< @brief The average pressure in the vena cava over the course of a cardiac cycle.*/
ScalarVolumePerTimeData MeanCerebralBloodFlow = 18;/**<< @brief The blood flow to the brain averaged over the current cardiac cycle time*/
ScalarPressureData MeanCerebralPerfusionPressure = 19;/**<< @brief The average pressure in the brain over the course of a cardiac cycle.*/
ScalarVolumePerTimeData MeanSkinFlow = 20;/**<< @brief The blood flow to the skin averaged over the current cardiac cycle time*/
ScalarPressureData PulmonaryArterialPressure = 21;/**<< @brief The current pressure in the pulmonary arteries.*/
ScalarPressureData PulmonaryCapillariesWedgePressure = 22;/**<< @brief The pressure within the pulmonary capillaries.*/
ScalarPressureData PulmonaryDiastolicArterialPressure = 23;/**<< @brief The minimum pressure that occurs in the pulmonary arteries over the course of a cardiac cycle.*/
ScalarPressureData PulmonaryMeanArterialPressure = 24;/**<< @brief The average pressure that occurs in the pulmonary arteries over the course of a cardiac cycle.*/
ScalarVolumePerTimeData PulmonaryMeanCapillaryFlow = 25;/**<< @brief The average blood flow in the pulmonary capillaries over the course of a cardiac cycle.*/
ScalarVolumePerTimeData PulmonaryMeanShuntFlow = 26;/**<< @brief The average blood flow diverted from the pulmonary capillaries (not oxygenated) over the course of a cardiac cycle.*/
ScalarPressureData PulmonarySystolicArterialPressure = 27;/**<< @brief The maximum pressure in the pulmonary arteries over the course of a cardiac cycle.*/
ScalarPressureTimePerVolumeData PulmonaryVascularResistance = 28;/**<< @brief The resistance offered by the pulmonary circulation.*/
ScalarPressureTimePerVolumeAreaData PulmonaryVascularResistanceIndex = 29;/**<< @brief Relates pulmonary circulation performance to the size of the individual. */
ScalarPressureData PulsePressure = 30;/**<< @brief The difference between the systolic and diastolic pressures.*/
ScalarPressureTimePerVolumeData SystemicVascularResistance = 31;/**<< @brief The resistance to blood flow through the entire systemic vasculature, not including the pulmonary circulation.*/
ScalarPressureData SystolicArterialPressure = 32;/**<< @brief The maximum pressure in the aorta over the course of a cardiac cycle.*/
ScalarVolumePerTimeData MeanSkinFlow = 18;/**<< @brief The blood flow to the skin averaged over the current cardiac cycle time*/
ScalarPressureData PulmonaryArterialPressure = 19;/**<< @brief The current pressure in the pulmonary arteries.*/
ScalarPressureData PulmonaryCapillariesWedgePressure = 20;/**<< @brief The pressure within the pulmonary capillaries.*/
ScalarPressureData PulmonaryDiastolicArterialPressure = 21;/**<< @brief The minimum pressure that occurs in the pulmonary arteries over the course of a cardiac cycle.*/
ScalarPressureData PulmonaryMeanArterialPressure = 22;/**<< @brief The average pressure that occurs in the pulmonary arteries over the course of a cardiac cycle.*/
ScalarVolumePerTimeData PulmonaryMeanCapillaryFlow = 23;/**<< @brief The average blood flow in the pulmonary capillaries over the course of a cardiac cycle.*/
ScalarVolumePerTimeData PulmonaryMeanShuntFlow = 24;/**<< @brief The average blood flow diverted from the pulmonary capillaries (not oxygenated) over the course of a cardiac cycle.*/
ScalarPressureData PulmonarySystolicArterialPressure = 25;/**<< @brief The maximum pressure in the pulmonary arteries over the course of a cardiac cycle.*/
ScalarPressureTimePerVolumeData PulmonaryVascularResistance = 26;/**<< @brief The resistance offered by the pulmonary circulation.*/
ScalarPressureTimePerVolumeAreaData PulmonaryVascularResistanceIndex = 27;/**<< @brief Relates pulmonary circulation performance to the size of the individual. */
ScalarPressureData PulsePressure = 28;/**<< @brief The difference between the systolic and diastolic pressures.*/
ScalarPressureTimePerVolumeData SystemicVascularResistance = 29;/**<< @brief The resistance to blood flow through the entire systemic vasculature, not including the pulmonary circulation.*/
ScalarPressureData SystolicArterialPressure = 30;/**<< @brief The maximum pressure in the aorta over the course of a cardiac cycle.*/
}
/** @brief Provides transport of drugs through the blood and air in the cardiovascular and respiratory systems, respectively.
......
......@@ -51,14 +51,12 @@ message CardiovascularData
pulse.cdm.bind.RunningAverageData CardiacCyclePulmonaryShuntFlow_mL_Per_s = 29;
pulse.cdm.bind.RunningAverageData CardiacCyclePulmonaryArteryPressure_mmHg = 30;
pulse.cdm.bind.RunningAverageData CardiacCycleCentralVenousPressure_mmHg = 31;
pulse.cdm.bind.RunningAverageData CardiacCycleCerebralBloodFlow_mL_Per_s = 32;
pulse.cdm.bind.RunningAverageData CardiacCycleCerebralPerfusionPressure_mmHg = 33;
pulse.cdm.bind.RunningAverageData CardiacCycleSkinFlow_mL_Per_s = 34;
pulse.cdm.bind.RunningAverageData CardiacCycleSkinFlow_mL_Per_s = 32;
repeated string HemorrhageLinks = 35;
repeated string HemorrhagePaths = 36;
repeated string InternalHemorrhageLinks = 37;
repeated string InternalHemorrhagePaths = 38;
repeated string HemorrhageLinks = 33;
repeated string HemorrhagePaths = 34;
repeated string InternalHemorrhageLinks = 35;
repeated string InternalHemorrhagePaths = 36;
}
message DrugData
......
......@@ -26,21 +26,18 @@ message SimulationData
double HeartStrokeVolume_mL = 13;
double IntracranialPressure_mmHg = 14;
double MeanArterialPressure_mmHg = 15;
double MeanCentralVenousPressure_mmHg = 16;
double MeanCerebralBloodFlow_L_Per_min = 17;
double MeanCerebralPerfusionPressure_mmHg = 18;
double PulmonaryArterialPressure_mmHg = 19;
double PulmonaryCapillariesWedgePressure_mmHg = 20;
double PulmonaryDiastolicArterialPressure_mmHg = 21;
double PulmonaryMeanArterialPressure_mmHg = 22;
double PulmonaryMeanCapillaryFlow_L_Per_min = 23;
double PulmonarySystolicArterialPressure_mmHg = 24;
double SystolicArterialPressure_mmHg = 25;
double SystemicVascularResistance_mmHg_s_Per_L = 26;
double PulmonaryArterialPressure_mmHg = 16;
double PulmonaryCapillariesWedgePressure_mmHg = 17;
double PulmonaryDiastolicArterialPressure_mmHg = 18;
double PulmonaryMeanArterialPressure_mmHg = 19;
double PulmonaryMeanCapillaryFlow_L_Per_min = 20;
double PulmonarySystolicArterialPressure_mmHg = 21;
double SystolicArterialPressure_mmHg = 22;
double SystemicVascularResistance_mmHg_s_Per_L = 23;
// Stabilization Information
bool AchievedStabilization = 27;
double StabilizationTime_s = 28;
bool AchievedStabilization = 24;
double StabilizationTime_s = 25;
}
......
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