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

Not able to start a generator which states is off #88

Closed
camiloromers opened this issue May 15, 2020 · 2 comments
Closed

Not able to start a generator which states is off #88

camiloromers opened this issue May 15, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@camiloromers
Copy link

camiloromers commented May 15, 2020

Hello,

I am not able to start a generator which is state at time T is 0MW or off. In the following script, I tried to start gen at node 23 increasing its power but I got an exception:

Grid2OpException AmbiguousAction InvalidRedispatching InvalidRedispatching('Impossible to dispatched a turned off generator')

import numpy as np
import grid2op

env = grid2op.make('wcci_test')

env.chronics_handler.tell_id(183)
print(env.chronics_handler.get_name())

# Set min up/down time = 0
env.gen_min_downtime = np.zeros(shape=env.gen_min_downtime.shape)
env.gen_min_uptime = np.zeros(shape=env.gen_min_uptime.shape)
env.gen_uptime = np.zeros(shape=env.gen_uptime.shape)
env.gen_downtime = np.zeros(shape=env.gen_downtime.shape)

# Run Game from specific ts
t0, tf = 7163, 7168

# Run donothing and trying to start a thermal unit
obs = env.reset()
env.fast_forward_chronics(t0)
for i in range(tf-t0+1):
    if t0+i == 7165:
        action = {'redispatch': [(13, +2.5)]} # Start a thermal unit 18 at node 23
    else:
        action = {} # Do nothing
    obs, reward, done, info = env.step(env.action_space(action))
    print ('Thermal MW: {:2f} MW at ts {:1d}'.format(obs.prod_p[13], t0+i))
    print (info['exception'])

EDIT (BD): I updated the above script to work

BDonnot referenced this issue in BDonnot/Grid2Op May 15, 2020
@BDonnot BDonnot added the enhancement New feature or request label May 15, 2020
@BDonnot
Copy link
Collaborator

BDonnot commented May 15, 2020

This was not a bug but rather the normal behaviour. Indeed, as you saw, it's clearly stipulated that today you cannot redispatch a turned off generator.

In the next realese we'll see how to best address this by giving the possibility to either:

  • forbid the dispatch on the turned off generator (which is totally irrealistic btw)
  • allow it for simplicity (which would make the game easier, not to mention the generation of the chronics...)

Thanks for raising this issue

Benjamin

@BDonnot
Copy link
Collaborator

BDonnot commented May 19, 2020

Fixed in version 0.9.0.

@BDonnot BDonnot closed this as completed May 19, 2020
BDonnot added a commit that referenced this issue Jul 3, 2020
Adding example dataset for track1, improving some docs
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

No branches or pull requests

2 participants