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
I'm trying to run a gym env without any meal (ideally I would like a controller which can also suggest carb but from what I understood it's not supported).
I did the following:
start_time = datetime.now()
no_meal_scenario = CustomScenario(start_time=start_time, scenario=[])
register(
id='env-v0',
entry_point='simglucose.envs:T1DSimEnv',
kwargs={'patient_name': 'adult#001',
'custom_scenario': no_meal_scenario}
)
env = gym.make('env-v0')
min_insulin = env.action_space.low
max_insulin = env.action_space.high
observation = env.reset()
for t in range(100):
env.render(mode='human')
print(observation)
action = np.random.uniform(min_insulin, max_insulin)
print(action)
observation, reward, done, info = env.step(action)
if done:
print("Episode finished after {} timesteps".format(t + 1))
break
But I still het carbohydrates inputs sometimes:
What is the correct way to do that ?
Thank you !
The text was updated successfully, but these errors were encountered:
Yes, I did not expose the meal as an action here. I treat the random meal as a challenge for the control algorithm. You might want to implement the meal action yourself for now.
I will consider adding meal as an input in the future.
Hey,
Thank you for this awesome library.
I'm trying to run a gym env without any meal (ideally I would like a controller which can also suggest carb but from what I understood it's not supported).
I did the following:
But I still het carbohydrates inputs sometimes:
What is the correct way to do that ?
Thank you !
The text was updated successfully, but these errors were encountered: