You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Base class for patient"""
class Patient(object):
def step(self, action):
"""
Run one time step of the patient dynamiBodySimiFace_setPatisetPatient
Input
action: a namedtuple
------
Outputs
t: current time
state: updated state
observation: the observable states
"""
raise NotImplementedError
@staticmethod
def model(t, state, action, params):
"""
ordinary differential equations
"""
raise NotImplementedError
def reset(self):
"""
Reset to the initial state
Return observation
"""
raise NotImplementedError
However, the code uses patient.observation, patient.state and patient.t.
Should those properties be part of the interface or not?
Additionally, it seems like the static method model is not really part of required interface, so could be removed.
The text was updated successfully, but these errors were encountered:
drozzy
changed the title
Patient interface missing observation and t
Patient interface missing observation, state and t
Oct 30, 2023
fromabcimportABC, abstractmethodclassPatient(ABC):
""" Actual proper base class for patient, that includes the parts missing from simglucose definition """@abstractmethoddefstep(self, action):
""" Run one time step of the patient dynamiBodySimiFace_setPatisetPatient Input action: a namedtuple ------ Outputs t: current time state: updated state observation: the observable states """
...
@abstractmethoddefreset(self):
""" Reset to the initial state Return observation """
...
@property@abstractmethoddeft(self):
...
@property@abstractmethoddefstate(self):
...
@property@abstractmethoddefobservation(self):
...
The patient interface is a premature design choice. There is only one class T1DPatient is inheriting the interface. Any design on the base interface is redundant.
I think we should delete the Patient interface, and if we have plan to add say T2DPatient etc. in the future, we will add the base back with a design that meets the actual needs.
Patient interface is defined as :
However, the code uses
patient.observation
,patient.state
andpatient.t
.Should those properties be part of the interface or not?
Additionally, it seems like the static method
model
is not really part of required interface, so could be removed.The text was updated successfully, but these errors were encountered: