Skip to content

Commit

Permalink
refactoring changes for results name change
Browse files Browse the repository at this point in the history
  • Loading branch information
kbonney committed Nov 14, 2023
1 parent 97b97bf commit b5e1d0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions wntr/epanet/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ def __init__(self, result_types=None, network=False, energy=False, statistics=Fa
self.chem_units = None
self.inp_file = None
self.report_file = None
self.results = wntr.sim.SimulationResults()
self.results = wntr.sim.HydraulicResults()
if result_types is None:
self.items = [ member for name, member in ResultType.__members__.items() ]
else:
Expand Down Expand Up @@ -2599,7 +2599,7 @@ def read(self, filename, convergence_error=False, darcy_weisbach=False, convert=
object
returns a WaterNetworkResults object
"""
self.results = wntr.sim.SimulationResults()
self.results = wntr.sim.HydraulicResults()

logger.debug('Read binary EPANET data from %s',filename)
dt_str = 'u1' #.format(self.idlen)
Expand Down
2 changes: 1 addition & 1 deletion wntr/sim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
simulations using the water network model.
"""
from wntr.sim.core import WaterNetworkSimulator, WNTRSimulator
from wntr.sim.results import SimulationResults
from wntr.sim.results import HydraulicResults
from wntr.sim.solvers import NewtonSolver
from wntr.sim.epanet import EpanetSimulator
2 changes: 1 addition & 1 deletion wntr/sim/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ def run_sim(self, solver=NewtonSolver, backup_solver=None, solver_options=None,
self._register_controls_with_observers()

node_res, link_res = wntr.sim.hydraulics.initialize_results_dict(self._wn)
results = wntr.sim.results.SimulationResults()
results = wntr.sim.results.HydraulicResults()
results.error_code = None
results.time = []
results.network_name = self._wn.name
Expand Down

0 comments on commit b5e1d0f

Please sign in to comment.