NervousModel.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5
6#include "engine/common/system/Model.h"
7#include "engine/common/system/Systems.h"
8
11class SEFluidCircuit;
12
13namespace pulse
14{
15 class PBPhysiology;
16 class EngineTest;
21 class PULSE_DECL NervousModel : public NervousSystem, public Model
22 {
23 friend PBPhysiology;//friend the serialization class
24 friend EngineTest;
25 public:
26 NervousModel(Data& data);
27 virtual ~NervousModel();
28
29 void Clear() override;
30
31 // Set members to a stable homeostatic state
32 void Initialize() override;
33 // Set pointers and other member variables common to both homeostatic initialization and loading a state
34 void SetUp() override;
35
36 void AtSteadyState() override;
37 void PreProcess() override;
38 void Process(bool solve_and_transport = true) override;
39 void PostProcess(bool solve_and_transport = true) override;
40
41
42 virtual void SetBaroreceptorFeedback(eSwitch s) override;
43 virtual void SetChemoreceptorFeedback(eSwitch s) override;
44
45 protected:
46 void ComputeExposedModelParameters() override;
47
48 void BaroreceptorFeedback();
49 void InitializeBaroreceptors();
50 void CheckBrainStatus();
51 void ChemoreceptorFeedback();
52 void SetPupilEffects();
53 void CerebralSpinalFluidUpdates();
54 void SetBaselines();
55
56
57 // Serializable member variables (Set in Initialize and in schema)
58 bool m_BaroreceptorFeedbackStatus;
59 bool m_BaroreceptorSaturationStatus;
60 double m_ArterialOxygenBaseline_mmHg;
61 double m_ArterialCarbonDioxideBaseline_mmHg;
62 double m_BaroreceptorActiveTime_s;
63 double m_BaroreceptorEffectivenessParameter;
64 double m_BaroreceptorSaturationTime_s;
65 double m_LastMeanArterialPressure_mmHg;
66 double m_PreviousBloodVolume_mL;
67 // Arrhythmia Support
68 eHeartRhythm m_PreviousHeartRhythm;
69 //double m_BaroreceptorPauseTimer;
70 //bool m_BaroreceptorPauseTimerStatus;
71
72 //SERIALIZE THESE AARON - should be system values
73 double m_CSFAbsorptionRate_mLPermin;
74 double m_CSFProductionRate_mlPermin;
75
76 // Stateless member variable (Set in SetUp())
77 // Configuration fractions representing the amount by which each quantity can change due to feedback;
78 double m_NormalizedGammaHeartRate;
79 double m_NormalizedGammaElastance;
80 double m_NormalizedGammaCompliance;
81 double m_NormalizedGammaResistance;
82 double m_NormalizedAlphaHeartRate;
83 double m_NormalizedAlphaElastance;
84 double m_NormalizedAlphaCompliance;
85 double m_NormalizedAlphaResistance;
86 double m_NormalizedBetaHeartRate;
87
88 SEFluidCircuitNode* m_IntracranialSpace;
89 SEFluidCircuitPath* m_CSFProductAbsorptionPath;
90 SEFluidCircuitPath* m_BrainVasculatureCompliancePath;
91 SEFluidCircuitPath* m_BrainVasculatureResistancePath;
92 };
93END_NAMESPACE
Definition: PBPhysiology.h:24
Definition: SEFluidCircuit.h:12
Definition: SEFluidCircuitNode.h:10
Definition: SEFluidCircuitPath.h:9
Definition: Logger.h:14

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.