gym_anm.envs.utils.check_env_args

gym_anm.envs.utils.check_env_args(K, delta_t, lamb, gamma, observation, aux_bounds, state_bounds)[source]

Raises an error if the arguments of the new environment do not match the requirements.

Parameters:
  • K (int) – The number of auxiliary variables.

  • delta_t (float) – The interval of time between two consecutive time steps (fraction of hour).

  • lamb (int or float) – The factor multiplying the penalty associated with violating operational constraints (used in the reward signal).

  • gamma (float) – The discount factor in [0, 1].

  • observation (callable or str or list) – The observation space. It can be specified as “state” to construct a fully observable environment (\(o_t = s_t\)); as a callable function such that \(o_t = observation(s_t)\); or as a list of tuples (x, y, z) that refers to the electrical quantity x (str) at the nodes/branches/devices y (list) in unit z (str, optional).

  • aux_bounds (np.ndarray) – The bounds on the auxiliary internal variables as a 2D array where the \(k^{th}-1\) auxiliary variable is bounded by [aux_bounds[k, 0], aux_bounds[k, 1]]. This can be useful if auxiliary variables are to be included in the observation vectors and a bounded observation space is desired.

  • state_bounds (dict of {str : dict}) – The bounds on the state variables of the distribution network.