sinergym.utils.common.setpoints_transform

sinergym.utils.common.setpoints_transform(action: Union[int, float, numpy.integer, numpy.ndarray, List[Any], Tuple[Any]], action_space: gym.spaces.box.Box, setpoints_space: List[List[Union[int, float]]]) List[Union[int, float]]

Given an action inner gym action_space, this will be converted into an action inner setpoints_space (Sinergym Simulation).

Parameters
  • action (Union[int, float, np.integer, np.ndarray, List[Any], Tuple[Any]]) – Action of a step in gym simulation.

  • action_space (gym.spaces.Box) – Gym action space

  • setpoints_space (List[List[Union[int, float]]]) – Sinergym simulation action space

Returns

Action transformed into simulation action space.

Return type

List[Union[int, float]]