Open drozzy opened 1 year ago
Something like this:
from abc import ABC, abstractmethod
class Patient(ABC):
"""
Actual proper base class for patient,
that includes the parts missing from simglucose definition
"""
@abstractmethod
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
"""
...
@abstractmethod
def reset(self):
"""
Reset to the initial state
Return observation
"""
...
@property
@abstractmethod
def t(self):
...
@property
@abstractmethod
def state(self):
...
@property
@abstractmethod
def observation(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.
What do you think?
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.