Skip to content

Commit

Permalink
Merge pull request #290 from jaredthomas68/greenheart
Browse files Browse the repository at this point in the history
have __init__ call reinitialize()
  • Loading branch information
jaredthomas68 authored Mar 19, 2024
2 parents 0fab58d + d6a71ff commit 0d8e12c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hopp/simulation/hopp_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ class HoppInterface:
"""
def __init__(self, configuration: Union[dict, str, Path]):
self.reinitialize(configuration=configuration)

def reinitialize(self, configuration: Union[dict, str, Path]):
self.configuration = configuration

if isinstance(self.configuration, (str, Path)):
Expand All @@ -42,9 +45,6 @@ def __init__(self, configuration: Union[dict, str, Path]):
elif isinstance(self.configuration, dict):
self.hopp = Hopp.from_dict(self.configuration)

def reinitialize(self, configuration: Union[dict, str, Path]):
self.__init__(configuration)

def simulate(self, project_life: int = 25, lifetime_sim: bool = False):
self.hopp.simulate(project_life, lifetime_sim)

Expand Down

0 comments on commit 0d8e12c

Please sign in to comment.