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

Add a possibility to load chronics from a numpy array #271

Closed
BDonnot opened this issue Dec 20, 2021 · 0 comments · Fixed by #278 or #279
Closed

Add a possibility to load chronics from a numpy array #271

BDonnot opened this issue Dec 20, 2021 · 0 comments · Fixed by #278 or #279
Labels
enhancement New feature or request

Comments

@BDonnot
Copy link
Collaborator

BDonnot commented Dec 20, 2021

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Ex. This is how i would like it to be done:

import grid2op
from grid2op.Chronics import FromNPY

my_chronics = ...  # Something with FromNPY
my_chronics .init(load_p, load_q, gen_p, gen_v)
# load_p, load_q, gen_p and gen_v are computed somewhere else and compatible with the environment
# and the backend (right number of elements, right order etc.)

env_name = ...
env = grid2op.make(env_name, ..., chronics_class=FromNPY)

# etc.
...

This would make things easier for

Describe alternatives you've considered

No real alternative at the moment, the closest thing is to compute everything from the beginning.

Additional context

Be carefull: grid2op is probably initialized with class at the moment, and this makes it a bit more complex (especially when used
in parrallel environment)

@BDonnot BDonnot added the enhancement New feature or request label Dec 20, 2021
@BDonnot BDonnot linked a pull request Jan 19, 2022 that will close this issue
@BDonnot BDonnot linked a pull request Jan 19, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant