Skip to content

Commit

Permalink
Update ExpertAgent.py
Browse files Browse the repository at this point in the history
compatibility with Grid2Op which now expect topological actions to be array of int
  • Loading branch information
marota authored Jun 16, 2021
1 parent 47c99f7 commit ec6e198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion l2rpn_baselines/ExpertAgent/ExpertAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def reco_line(self, observation):
# for a substation we get the reference topology action
def reference_topology_sub_action(self, observation, sub_id):
topo_vec_sub = observation.state_of(substation_id=sub_id)['topo_vect']
topo_target = list(np.ones(len(topo_vec_sub)))
topo_target = list(np.ones(len(topo_vec_sub)).astype('int'))
action_def = {"set_bus": {"substations_id": [(sub_id, topo_target)]}}
action = self.action_space(action_def)
return action
Expand Down

0 comments on commit ec6e198

Please sign in to comment.