epidemioptim/environments/gym_envs/epidemic_vaccination_16.py
def reset(self):
        """
        Reset the environment and the tracking of data.

        Returns
        -------
        nd.array
            The initial environment state.

        """
        # initialize history of states, internal model states, actions, cost_functions, deaths
        self.history = dict(env_states=[],
                            model_states=[],
                            env_timesteps=[],
                            actions=[],
                            aggregated_costs=[],
                            costs=[],
                            vaccinations=[],
                            deaths=[])
        # initialize time and lockdown days counter
        self.t = 0
        self.count_deaths = 0
        self.count_since_start_politic = 0
        self.count_since_last_politic = 0

        self.vaccination_politic = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1]
        self.previous_politic = self.vaccination_politic
        self.cumulative_costs = [0 for _ in range(self.nb_costs)]

        # initialize model internal state and params
        self.model.reset()
        self.model_state = self.model._get_current_state()

        self._update_previous_env_state()
        self._update_env_state()

        self.history['env_states'].append(self.env_state.copy())
        self.history['model_states'].append(self.model_state.copy())
        self.history['env_timesteps'].append(self.t)

        return self._normalize_env_state(self.env_state)

        Reset the environment and the tracking of data.

        Returns
        -------
        nd.array
            The initial environment state.

        
Reset the environment and the tracking of data.
Returns

nd.array
The initial environment state.
Reset the environment and the tracking of data . Returns nd . array The initial environment state .
def reset(self):
        self.history = dict(env_states=[],
                            model_states=[],
                            env_timesteps=[],
                            actions=[],
                            aggregated_costs=[],
                            costs=[],
                            vaccinations=[],
                            deaths=[])
        self.t = 0
        self.count_deaths = 0
        self.count_since_start_politic = 0
        self.count_since_last_politic = 0
        self.vaccination_politic = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1]
        self.previous_politic = self.vaccination_politic
        self.cumulative_costs = [0 for _ in range(self.nb_costs)]
        self.model.reset()
        self.model_state = self.model._get_current_state()
        self._update_previous_env_state()
        self._update_env_state()
        self.history['env_states'].append(self.env_state.copy())
        self.history['model_states'].append(self.model_state.copy())
        self.history['env_timesteps'].append(self.t)
        return self._normalize_env_state(self.env_state)
def reset ( self ) : self . history = dict ( env_states = [ ] , model_states = [ ] , env_timesteps = [ ] , actions = [ ] , aggregated_costs = [ ] , costs = [ ] , vaccinations = [ ] , deaths = [ ] ) self . t = 0 self . count_deaths = 0 self . count_since_start_politic = 0 self . count_since_last_politic = 0 self . vaccination_politic = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 ] self . previous_politic = self . vaccination_politic self . cumulative_costs = [ 0 for _ in range ( self . nb_costs ) ] self . model . reset ( ) self . model_state = self . model . _get_current_state ( ) self . _update_previous_env_state ( ) self . _update_env_state ( ) self . history [ 'env_states' ] . append ( self . env_state . copy ( ) ) self . history [ 'model_states' ] . append ( self . model_state . copy ( ) ) self . history [ 'env_timesteps' ] . append ( self . t ) return self . _normalize_env_state ( self . env_state )
Reset the environment and the tracking of data.
Reset the environment and the tracking of data .
"""
        Reset the environment and the tracking of data.

        Returns
        -------
        nd.array
            The initial environment state.

        """ # initialize history of states, internal model states, actions, cost_functions, deaths # initialize time and lockdown days counter # initialize model internal state and params
self