Skip to content

Commit

Permalink
feat: use grid model info to instantiate Grid class
Browse files Browse the repository at this point in the history
  • Loading branch information
rouille committed Nov 19, 2020
1 parent 5f89420 commit 0400489
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions powersimdata/scenario/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def __init__(self, scenario):

def _set_ct_and_grid(self):
"""Sets change table and grid."""
base_grid = Grid(self._scenario_info["interconnect"].split("_"))
base_grid = Grid(
self._scenario_info["interconnect"].split("_"),
source=self._scenario_info["grid_model"],
)
if self._scenario_info["change_table"] == "Yes":
input_data = InputData(self._data_access)
self.ct = input_data.get_data(self._scenario_info, "ct")
Expand Down Expand Up @@ -168,8 +171,8 @@ def prepare_simulation_input(self, profiles_as=None):
def launch_simulation(self, threads=None, extract_data=True):
"""Launches simulation on server.
:param int/None threads: the number of threads to be used. This defaults to None,
where None means auto.
:param int/None threads: the number of threads to be used. This defaults to
None, where None means auto.
:param bool extract_data: whether the results of the simulation engine should
automatically extracted after the simulation has run. This defaults to True.
:raises TypeError: if threads is not an int or if extract_data is not a boolean
Expand Down

0 comments on commit 0400489

Please sign in to comment.