Parameters¶
The challenge “learning to run a power network” offers different _parameters to be customized, or to learn an
grid2op.BaseAgent
that will perform better for example.
This class is an attempt to group them all inside one single structure.
For now, Parameters
have default value, but the can be read back / from json. Other serialization method will
come soon.
-
class
grid2op.Parameters.
Parameters
(parameters_path=None)[source]¶ Main classes representing the _parameters of the game. The main paratemeters are describe bellow.
Note that changing the values of these _parameters might not be enough. If these _parameters are not used in the
grid2op.RulesChecker
, then modifying them will have no impact at all.-
NO_OVERFLOW_DISCONNECTION
¶ If set to
True
then thegrid2op.Environment
will not disconnect powerline above their thermal limit. Default isFalse
- Type
bool
-
NB_TIMESTEP_POWERFLOW_ALLOWED
¶ Number of timesteps for which a soft overflow is allowed, default 2. This means that a powerline will be disconnected (if
NO_OVERFLOW_DISCONNECTION
is set toFalse
) after 2 time steps above its thermal limit. This is called a “soft overflow”.- Type
int
-
NB_TIMESTEP_RECONNECTION
¶ Number of timesteps a powerline disconnected for security motives (for example due to
NB_TIMESTEP_POWERFLOW_ALLOWED
orHARD_OVERFLOW_THRESHOLD
) will remain disconnected. It’s set to 10 timestep by default.- Type
int
-
NB_TIMESTEP_LINE_STATUS_REMODIF
¶ When someone acts on a powerline by changing its status (connected / disconnected) this number indicates how many timesteps the
grid2op.BaseAgent.BaseAgent
has to wait before being able to modify this status again. For examle, if this is 1, this means that an BaseAgent can act on status of a powerline 1 out of 2 time step (1 time step it acts, another one it cools down, and the next one it can act again). Having it at 0 it equivalent to deactivate this feature (default).- Type
int
-
NB_TIMESTEP_TOPOLOGY_REMODIF
¶ When someone changes the topology of a substations, this number indicates how many timesteps the
grid2op.BaseAgent.BaseAgent
has to wait before being able to modify the topology on this same substation. It has the same behaviour asParameters.NB_TIMESTEP_LINE_STATUS_REMODIF
. To deactivate this feature, put it at 0 (default).- Type
int
-
HARD_OVERFLOW_THRESHOLD
¶ If a the powerflow on a line is above HARD_OVERFLOW_THRESHOLD * thermal limit (and
NO_OVERFLOW_DISCONNECTION
is set toFalse
) then it is automatically disconnected, regardless of the number of timesteps it is on overflow). This is called a “hard overflow”- Type
float
-
ENV_DC
¶ Whether or not making the simulations of the environment in the “direct current” approximation. This can be usefull for early training of agent, as this mode is much faster to compute than the corresponding “alternative current” powerflow. It is also less precise. The default is
False
- Type
bool
-
FORECAST_DC
¶ Whether to use the direct current approximation in the
grid2op.BaseObservation.forecasts()
method. Default isFalse
. This can speed up the computation.- Type
bool
-
MAX_SUB_CHANGED
¶ Maximum number of substations that can be reconfigured between two consecutive timesteps by an
grid2op.BaseAgent
. Default value is 1.- Type
int
- MAX_LINE_STATUS_CHANGED:
int
Maximum number of powerlines statuses that can be changed between two consecutive timestetps by an
grid2op.BaseAgent
. Default value is 1.
-
init_from_dict
(dict_)[source]¶ Initialize the object given a dictionary. All keys are optional. If a key is not present in the dictionnary, the default parameters is used.
- Parameters
dict (
dict
) – The dictionary representing the parameters to load.
-
If you still can’t find what you’re looking for, try in one of the following pages: