diff --git a/src/pymgrid/modules/genset_module.py b/src/pymgrid/modules/genset_module.py index d0cb992e..e17bb36c 100644 --- a/src/pymgrid/modules/genset_module.py +++ b/src/pymgrid/modules/genset_module.py @@ -360,8 +360,13 @@ def _non_instantaneous_update(self, goal_status): assert self._steps_until_down > 0 self._update_up_down_times() - def sample_action(self, strict_bound=False, **kwargs): - return np.array([np.random.rand(), super().sample_action(strict_bound=strict_bound)]) + def sample_action(self, strict_bound=False): + on_off = np.random.rand() + power = np.random.uniform( + self.running_min_production, + self.running_max_production + ) + return np.array([on_off, power]) def _raise_error(self, ask_value, available_value, as_source=False, as_sink=False, lower_bound=False): try: