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

Change bus action += or __iadd__ behavior #116

Closed
Tezirg opened this issue Jun 13, 2020 · 1 comment
Closed

Change bus action += or __iadd__ behavior #116

Tezirg opened this issue Jun 13, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Tezirg
Copy link
Contributor

Tezirg commented Jun 13, 2020

Environment

  • Grid2op version: 0.9.4
  • System: Ubuntu20.04

Bug description

It seems using the += operator with change_bus action is not working correctly.
Bus changes are transformed into bus sets actions, with invalid bus index. (Here, bus 3 in the provided snippet)

How to reproduce

Command line

Code snippet

import grid2op

env = grid2op.make("rte_case14_realistic")
t =  env.action_space({})
t1 = env.action_space({
    "change_bus": {
        "substations_id": [(0, 0)]
    }
})
print (t)
print (t1)
t += t1
print (t)

Current output

This action will:
     - NOT change anything to the injections
     - NOT perform any redispatching action
     - NOT force any line status
     - NOT switch any line status
     - NOT switch anything in the topology
     - NOT force any particular bus configuration
This action will:
     - NOT change anything to the injections
     - NOT perform any redispatching action
     - NOT force any line status
     - NOT switch any line status
     - Change the bus of the following element:
          - switch bus of line (origin) 0 [on substation 0]
     - NOT force any particular bus configuration
This action will:
     - NOT change anything to the injections
     - NOT perform any redispatching action
     - NOT force any line status
     - NOT switch any line status
     - NOT switch anything in the topology
     - Set the bus of the following element:
          - assign bus 3 to line (origin) 0 [on substation 0]

Expected output

This action will:
     - NOT change anything to the injections
     - NOT perform any redispatching action
     - NOT force any line status
     - NOT switch any line status
     - NOT switch anything in the topology
     - NOT force any particular bus configuration
This action will:
     - NOT change anything to the injections
     - NOT perform any redispatching action
     - NOT force any line status
     - NOT switch any line status
     - Change the bus of the following element:
          - switch bus of line (origin) 0 [on substation 0]
     - NOT force any particular bus configuration
This action will:
     - NOT change anything to the injections
     - NOT perform any redispatching action
     - NOT force any line status
     - NOT switch any line status
     - Change the bus of the following element:
          - switch bus of line (origin) 0 [on substation 0]
     - NOT force any particular bus configuration
@Tezirg Tezirg added the bug Something isn't working label Jun 13, 2020
Tezirg referenced this issue in BDonnot/Grid2Op Jun 15, 2020
Fix issue #116 by tdd: Make sure adding change only actions result in change action, Make sure changes on same element cancels out
@BDonnot
Copy link
Collaborator

BDonnot commented Jun 24, 2020

Issue addressed and fixed in 1.0.0

@BDonnot BDonnot closed this as completed Jun 24, 2020
BDonnot added a commit that referenced this issue Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants