public DataCollector(Model cm) { currentModel = cm; // get the most common compartments and connectors LV = currentModel.FindModelComponent <BloodCompartment> ("LV"); LA = currentModel.FindModelComponent <BloodCompartment> ("LA"); RV = currentModel.FindModelComponent <BloodCompartment> ("RV"); RA = currentModel.FindModelComponent <BloodCompartment> ("RA"); AA = currentModel.FindModelComponent <BloodCompartment> ("AA"); AD = currentModel.FindModelComponent <BloodCompartment> ("AD"); PA = currentModel.FindModelComponent <BloodCompartment> ("PA"); IVC = currentModel.FindModelComponent <BloodCompartment> ("IVC"); SVC = currentModel.FindModelComponent <BloodCompartment> ("SVC"); LV_AA = currentModel.FindModelComponent <Valve> ("LV_AA"); LA_LV = currentModel.FindModelComponent <Valve> ("LA_LV"); RV_PA = currentModel.FindModelComponent <Valve> ("RV_PA"); RA_RV = currentModel.FindModelComponent <Valve> ("RA_RV"); IVC_RA = currentModel.FindModelComponent <BloodConnector> ("IVC_RA"); SVC_RA = currentModel.FindModelComponent <BloodConnector> ("SVC_RA"); OFO = currentModel.FindModelComponent <Shunt> ("OFO"); PDA = currentModel.FindModelComponent <Shunt> ("PDA"); VSD = currentModel.FindModelComponent <Shunt> ("VSD"); // get the most common compartments and connectors OUT = currentModel.FindModelComponent <GasCompartment> ("OUT"); NCA = currentModel.FindModelComponent <GasCompartment> ("NCA"); ALL = currentModel.FindModelComponent <GasCompartment> ("ALL"); ALR = currentModel.FindModelComponent <GasCompartment> ("ALR"); VENTIN = currentModel.FindModelComponent <GasCompartment> ("VENTIN"); TUBINGIN = currentModel.FindModelComponent <GasCompartment> ("TUBINGIN"); YPIECE = currentModel.FindModelComponent <GasCompartment> ("YPIECE"); TUBINGOUT = currentModel.FindModelComponent <GasCompartment> ("TUBINGOUT"); VENTOUT = currentModel.FindModelComponent <GasCompartment> ("VENTOUT"); CHEST_L = currentModel.FindModelComponent <Container> ("CHEST_L"); CHEST_R = currentModel.FindModelComponent <Container> ("CHEST_R"); OUT_NCA = currentModel.FindModelComponent <GasConnector> ("OUT_NCA"); NCA_ALL = currentModel.FindModelComponent <GasConnector> ("NCA_ALL"); NCA_ALR = currentModel.FindModelComponent <GasConnector> ("NCA_ALR"); VENTIN_TUBINGIN = currentModel.FindModelComponent <GasConnector> ("VENTIN_TUBINGIN"); TUBINGIN_YPIECE = currentModel.FindModelComponent <GasConnector> ("TUBINGIN_YPIECE"); YPIECE_NCA = currentModel.FindModelComponent <GasConnector> ("YPIECE_NCA"); YPIECE_TUBINGOUT = currentModel.FindModelComponent <GasConnector> ("YPIECE_TUBINGOUT"); TUBINGOUT_VENTOUT = currentModel.FindModelComponent <GasConnector> ("TUBINGOUT_VENTOUT"); StartDatarecording(); }
public MechanicalVentilatorModel(Model cm) { currentModel = cm; // find the relevant compartments and connectors VENTIN = currentModel.FindModelComponent <GasCompartment>("VENTIN"); TUBINGIN = currentModel.FindModelComponent <GasCompartment>("TUBINGIN"); YPIECE = currentModel.FindModelComponent <GasCompartment>("YPIECE"); TUBINGOUT = currentModel.FindModelComponent <GasCompartment>("TUBINGOUT"); VENTOUT = currentModel.FindModelComponent <GasCompartment>("VENTOUT"); VENTIN_TUBINGIN = currentModel.FindModelComponent <GasConnector>("VENTIN_TUBINGIN"); TUBINGIN_YPIECE = currentModel.FindModelComponent <GasConnector>("TUBINGIN_YPIECE"); YPIECE_NCA = currentModel.FindModelComponent <GasConnector>("YPIECE_NCA"); YPIECE_TUBINGOUT = currentModel.FindModelComponent <GasConnector>("YPIECE_TUBINGOUT"); TUBINGOUT_VENTOUT = currentModel.FindModelComponent <GasConnector>("TUBINGOUT_VENTOUT"); currentModel.modelInterface.StatusMessage = $"Initialized the mechanical ventilator model."; }