Skip to content

Commit

Permalink
refactor: remove unnecessary mpc_iess
Browse files Browse the repository at this point in the history
  • Loading branch information
danielolsen committed Dec 21, 2020
1 parent d104e74 commit 6665b69
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions powersimdata/input/scenario_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ def _read_network(self):
mpc = data["mdi"].mpc
try:
# The next line will fail if no iess attribute (index energy storage system)
mpc_iess = mpc.iess
# Since we use the 'squeeze_me' param, 1 storage -> an int, not an array
if isinstance(mpc_iess, int):
if isinstance(mpc.iess, int):
n_storage = 1
else:
n_storage = mpc_iess.shape[0]
n_storage = mpc.iess.shape[0]
except AttributeError:
n_storage = 0

Expand Down

0 comments on commit 6665b69

Please sign in to comment.