Skip to content

Commit

Permalink
fixing a bug preventing to load environment for previous competition
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed Jan 20, 2020
1 parent a2c19cc commit 5809331
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grid2op/Settings_L2RPN2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ def initialize(self, order_backend_loads, order_backend_prods, order_backend_lin
self.maintenance_forecast = copy.deepcopy(maintenance.values[:, np.argsort(order_backend_maintenance)])

# there are maintenance and hazards only if the value in the file is not 0.
self.maintenance_time = np.zeros(shape=(self.load_p.shape[0], self.n_lines), dtype=np.int) - 1
self.maintenance_duration = np.zeros(shape=(self.load_p.shape[0], self.n_lines), dtype=np.int)
self.hazard_duration = np.zeros(shape=(self.load_p.shape[0], self.n_lines), dtype=np.int)
for line_id in range(self.n_lines):
self.maintenance_time = np.zeros(shape=(self.load_p.shape[0], self.n_line), dtype=np.int) - 1
self.maintenance_duration = np.zeros(shape=(self.load_p.shape[0], self.n_line), dtype=np.int)
self.hazard_duration = np.zeros(shape=(self.load_p.shape[0], self.n_line), dtype=np.int)
for line_id in range(self.n_line):
self.maintenance_time[:, line_id] = self.get_maintenance_time_1d(self.maintenance[:, line_id])
self.maintenance_duration[:, line_id] = self.get_maintenance_duration_1d(self.maintenance[:, line_id])
self.hazard_duration[:, line_id] = self.get_maintenance_duration_1d(self.hazards[:, line_id])
Expand Down

0 comments on commit 5809331

Please sign in to comment.