def transition(self, action):
    self.state = self.state.copy_state()
    if (action.antibiotic == 1):
        self.transition_antibiotics_on()
        hr_fluctuate = False
        sysbp_fluctuate = False
    elif (self.state.antibiotic_state == 1):
        self.transition_antibiotics_off()
        hr_fluctuate = False
        sysbp_fluctuate = False
    else:
        hr_fluctuate = True
        sysbp_fluctuate = True
    if (action.ventilation == 1):
        self.transition_vent_on()
        percoxyg_fluctuate = False
    elif (self.state.vent_state == 1):
        self.transition_vent_off()
        percoxyg_fluctuate = False
    else:
        percoxyg_fluctuate = True
    glucose_fluctuate = True
    if (action.vasopressors == 1):
        self.transition_vaso_on()
        sysbp_fluctuate = False
        glucose_fluctuate = False
    elif (self.state.vaso_state == 1):
        self.transition_vaso_off()
        sysbp_fluctuate = False
    self.transition_fluctuate(hr_fluctuate, sysbp_fluctuate, percoxyg_fluctuate, glucose_fluctuate)
    return self.calculateReward()
def transition(self, action):
    self.state = self.state.copy_state()
    if (action.antibiotic == 1):
        self.transition_antibiotics_on()
        hr_fluctuate = False
        sysbp_fluctuate = False
    elif (self.state.antibiotic_state == 1):
        self.transition_antibiotics_off()
        hr_fluctuate = False
        sysbp_fluctuate = False
    else:
        hr_fluctuate = True
        sysbp_fluctuate = True
    if (action.ventilation == 1):
        self.transition_vent_on()
        percoxyg_fluctuate = False
    elif (self.state.vent_state == 1):
        self.transition_vent_off()
        percoxyg_fluctuate = False
    else:
        percoxyg_fluctuate = True
    glucose_fluctuate = True
    if (action.vasopressors == 1):
        self.transition_vaso_on()
        sysbp_fluctuate = False
        glucose_fluctuate = False
    elif (self.state.vaso_state == 1):
        self.transition_vaso_off()
        sysbp_fluctuate = False
    self.transition_fluctuate(hr_fluctuate, sysbp_fluctuate, percoxyg_fluctuate, glucose_fluctuate)
    return self.calculateReward()