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

extending tauEncoding given list to retrive topo_sub even if a line i… #12

Closed
wants to merge 1 commit into from

Conversation

marota
Copy link

@marota marota commented Jun 22, 2022

…s disconnected

Related to this issue #11

@BDonnot
Copy link
Owner

BDonnot commented Jun 23, 2022

Job is done in the next PR

@BDonnot BDonnot closed this Jun 23, 2022
@marota
Copy link
Author

marota commented Jun 28, 2022

@BDonnot Current code doesn't disregard disconnected lines in all cases.
The following test currently fails when one line is disconnected from bus bar 1 and one line is disconnected from bus bar 2

       #test for 2 line disconnections: one on bus bar 1 and one on bus bar 2
        obs = env.reset()
        indices_sub_1=range(proxy.subs_index[1][0],proxy.subs_index[1][1])
        obs.topo_vect[indices_sub_1]=[2, 1, 2, 1, -1, - 1]
        #act = env.action_space({"set_bus": {"substations_id": [(1, (2, 1, 2, 2, -1, - 1))]}})  # (2, 1, 2, 2, 1, 1)
        #obs, reward, done, info = env.step(act) #simulation is diverging so just modifying the obs directly
        res = proxy.topo_vect_handler(obs)
        assert np.sum(res) == 1
        assert res[6] == 1.

On my side, this test fails on the current code, but succeeds with the less optimized code initially proposed in the PR

@BDonnot BDonnot reopened this Jun 28, 2022
@BDonnot BDonnot closed this Jun 28, 2022
BDonnot added a commit that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants