Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to version 1.7.0 #309

Merged
merged 126 commits into from
Apr 29, 2022
Merged

Upgrade to version 1.7.0 #309

merged 126 commits into from
Apr 29, 2022

Conversation

BDonnot
Copy link
Collaborator

@BDonnot BDonnot commented Apr 29, 2022

This release introduces some new functionalities, such as the compatibility to generate data "on the fly" or add more data to an environment.

It also adds some useful features for the curtailment and storage units (some new attributes of the observation) and a first version of the environment used for l2rpn WCCI 2022 competition.

Python 3.6 support has been dropped.

Breaking changes

  • the L2RPNSandBoxScore, RedispReward and EconomicReward now properly computes the cost of the grid
    (there was an error between the conversion from MWh - cost is given in $ / MWh - and MW). This impacts also ScoreICAPS2021 and ScoreL2RPN2020.
  • in the "gym_compat" module the curtailment action type has
    for dimension the number of dispatchable generators (as opposed to all generators
    before) this was mandatory to fix issue Bug in the "BoxGymActSpace" when curtailment is allowed #282
  • the size of the continuous action space for the redispatching in
    case of gym compatibility has also been adjusted to be consistent with curtailment.
    Before it has the size of env.n_gen now np.sum(env.gen_redispatchable).
  • move the _ObsEnv module to Environment (was before in Observation).
  • adding the curtailment_limit_effective in the observation converted to gym. This changes
    the sizes of the gym observation.
  • officially drop python 3.6 supports (which could not benefit from all the features)

Fixed issues

  • a bug preventing to use backend.update_from_obs when there are shunts on the grid for PandapowerBackend
  • a bug in the gym action space: see issue Missing some keys when using GymEnv #281
  • a bug in the gym box action space: see issue Bug in BoxGymActSpace when some action types cannot be done in grid2op #283
  • a bug when using MultifolderWithCache and Runner (see issue MultifolderWithCache does not work well with Runner #285)
  • a bug in the env.train_val_split_random where sometimes some wrong chronics
    name were sampled.
  • the max value of the observation space is now 1.3 * pmax to account for the slack bus (it was
    1.01 of pmax before and was not sufficient in some cases)
  • a proper exception is added to the "except" kwargs of the "info" return argument of env.step(...)
    (previously it was only a string) when redispatching was illegal.
  • a bug in env.train_val_split_random when some non chronics files where present in the
    "chronics" folder of the environment.
  • an error in the redispatching: in some cases, the environment detected that the redispatching was infeasible when it
    was not and in some others it did not detect when it while it was infeasible. This was mainly the case
    when curtailment and storage units were heavily modified.
  • now possible to create an environment with the FromNPY chronixcs even if the "chronics" folder is absent.
  • a bug preventing to converte observation as networkx graph with oldest version of numpy and newest version of scipy.
  • a bug when using max_iter and Runner in case of max_iter being larger than the number of steps in the
    environment and nb_episode >= 2.
  • a bug in the hashing of environment in case of storage units (the characteristics of the storage units
    were not taken into account in the hash).
  • a bug in the obs.as_dict() method.
  • a bug in when using the "env.generate_classe()" Cannot use the "generate_classes" function on windows #310
  • another bug in when using the "env.generate_classe()" on windows Cannot load an environment after "env.generate_classes()" on windows #311

New features

  • a function normalize_attr allowing to easily scale some data for the
    BoxGymObsSpace and BoxGymActSpace
  • support for distributed slack in pandapower (if supported)
  • an attribute self.infos for the BaseEnv that contains the "info" return value of env.step(...)
  • the possibility to shuffle the chronics of a GymEnv (the default behavior is now to shuffle them)
  • two attribtues for the observation: obs.gen_margin_up and obs.gen_margin_down
  • support for hashing chronix2grid related components.
  • possibility to change the type of the opponent space type from the make(...) command
  • a method to "limit the curtailment / storage" action depending on the availability of controllable generators
    (see act.limit_curtail_storage(...))
  • a class to generate data "on the fly" using chronix2grid (for now really slow and only available for
    a single environment)
  • a first version (for testing only) for the l2rpn_wcci_2022 environment.
  • a method to compute the "simple" line reconnection actions (adding 2 actions per lines instead of 5)
    in the action space (see act_space.get_all_unitary_line_set_simple())

Improvements

  • better difference between env_path and grid_path in environments.
  • addition of a flag to control whether pandapower can use lightsim2grid (to solve the powerflows) or not
  • clean the warnings issued by pandas when used with pandapower
  • doc of observation module (some attributes were missing)
  • add support for setting the maximum number of iteration in the PandaPowerBackend
  • when the curtailment / storage is too "strong" at a given step, the environment will now allow
    every controllable turned-on generators to mitigate it. This should increase the possibility to act on the
    curtailment and storage units without "breaking" the environment.
  • have dedicated type of actions / observation for L2RPN competition environments,
    defined in the "conf.py" file (to make possible the use of different
    grid2op version transparently)
  • on some cases, the routine used to compute the redispatching would lead to a "redispatch" that would
    change even if you don't apply any, for no obvious reasons. This has been addressed, though it's not perfect.
  • finer resolution when measuring execution times

BDonnot and others added 30 commits January 25, 2022 10:10
Few byg fixes for the gym_compat module
Some improvments, mainly for gym_compat
Improvment of gym compat module
BDonnot and others added 19 commits April 12, 2022 12:10
Merge recent developments
Retrieve new developments
fix a bug when limiting the action automatically in the env
Fix an issue with the new parameters to limit the action
New redisp routine, fix notebooks with up to date information
Final notebook modifications before release + different redispatching starting point
BDonnot added 2 commits April 29, 2022 12:01
Fix the "env.generate_classes()" function
Fix "env.generate_classes()" and add basic tests for this function
@BDonnot BDonnot merged commit 28cd015 into master Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment