deluca.envs.DelayLung¶
-
class
deluca.envs.DelayLung(*args, **kwargs)[source]¶ Public Data Attributes:
assume observations are fully observable
Inherited from
Envreward_rangeaction_spaceobservation_spaceassume observations are fully observable
Inherited from
JaxObjectnameattrsInherited from
Envmetadatareward_rangespecaction_spaceobservation_spaceunwrappedCompletely unwrap this env.
Public Methods:
__init__([min_volume, R_lung, C_lung, …])Initialize self.
reset()Resets the environment to an initial state and returns an initial observation.
dynamics(state, action)state: (volume, pressure) action: (u_in, u_out)
step(action)Run one timestep of the environment’s dynamics.
Inherited from
Lungrender()Renders the environment.
Inherited from
Env__new__(cls, *args, **kwargs)For avoiding super().__init__()
check_spaces()__init_subclass__(*args, **kwargs)For avoiding a decorator for each subclass
reset()Resets the environment to an initial state and returns an initial observation.
dynamics(state, action)state: (volume, pressure) action: (u_in, u_out)
check_action(action)check_observation(observation)step(action)Run one timestep of the environment’s dynamics.
jacobian(func, state, action)hessian(func, state, action)close()Override close in your subclass to perform any necessary cleanup.
Inherited from
JaxObject__new__(cls, *args, **kwargs)For avoiding super().__init__()
__init_subclass__(*args, **kwargs)For avoiding a decorator for each subclass
__str__()Return str(self).
__setattr__(key, val)Implement setattr(self, name, value).
save(path)load(path)throw(err, msg)Inherited from
Envstep(action)Run one timestep of the environment’s dynamics.
reset()Resets the environment to an initial state and returns an initial observation.
render()Renders the environment.
close()Override close in your subclass to perform any necessary cleanup.
seed([seed])Sets the seed for this env’s random number generator(s).
__str__()Return str(self).
__enter__()Support with-statement for the environment.
__exit__(*args)Support with-statement for the environment.
-
__init__(min_volume=1.5, R_lung=10, C_lung=6, delay=25, inertia=0.995, control_gain=0.02, dt=0.03, waveform=None, reward_fn=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
property
observation¶ assume observations are fully observable
- Type
NOTE
-
reset()[source]¶ Resets the environment to an initial state and returns an initial observation.
Note that this function should not reset the environment’s random number generator(s); random variables in the environment’s state should be sampled independently between multiple calls to reset(). In other words, each call of reset() should yield an environment suitable for a new episode, independent of previous episodes.
- Returns
the initial observation.
- Return type
observation (object)
-
step(action)[source]¶ Run one timestep of the environment’s dynamics. When end of episode is reached, you are responsible for calling reset() to reset this environment’s state.
Accepts an action and returns a tuple (observation, reward, done, info).
- Parameters
action (object) – an action provided by the agent
- Returns
agent’s observation of the current environment reward (float) : amount of reward returned after previous action done (bool): whether the episode has ended, in which case further step() calls will return undefined results info (dict): contains auxiliary diagnostic information (helpful for debugging, and sometimes learning)
- Return type
observation (object)
-