Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results and Control updates for testing and stepwise. #375

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2ff8c42
Adding results files to fresh branch
dbhart Aug 31, 2023
f24f670
Updating append method to use pd.concat
kbonney Aug 31, 2023
17554e7
Adding shift method to controls
dbhart Aug 31, 2023
4730568
Adding set_initial_conditions method to water network model
dbhart Aug 31, 2023
a55e2e9
rename append function
kbonney Nov 6, 2023
ff180f3
rename append function
kbonney Nov 6, 2023
97b97bf
overhauling results object by adding baseclass to allow for other res…
kbonney Nov 14, 2023
b5e1d0f
refactoring changes for results name change
kbonney Nov 14, 2023
0648d09
Updates to results object. Removed base class but kept data_attribute…
kbonney Nov 15, 2023
fa76d59
updating results object
kbonney Nov 17, 2023
6930db9
moved stopstart tests to own file
kbonney Nov 17, 2023
c136e00
fixed bugs and simplified append method
kbonney Nov 17, 2023
f3c5e80
beginning a test file for results object
kbonney Nov 17, 2023
2346d00
separating tests into more descriptive file names. simplifying node/l…
kbonney Nov 20, 2023
6069f2d
update test results
kbonney Nov 20, 2023
95a2747
bug fix results object
kbonney Nov 20, 2023
a7272a6
updating test pickle
kbonney Nov 20, 2023
3bccc34
adding ability to run as script to test
kbonney Nov 20, 2023
29fa5c9
added back in resultsstatus class
kbonney Nov 20, 2023
07b3ff8
Pulling in updates to status conversion from realtime branch
kbonney Jan 8, 2024
f575147
Merge branch 'main' into results
kbonney Apr 15, 2024
6f7f95a
Merge remote-tracking branch 'usepa/main' into results
kbonney Jun 7, 2024
a94cb7c
adding a test for stepwise simulation (24 1hr steps)
kbonney Jun 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactoring changes for results name change
  • Loading branch information
kbonney committed Nov 14, 2023
commit b5e1d0fed60e2fba06bf7331aaebcb3c39b94a7e
4 changes: 2 additions & 2 deletions wntr/epanet/io.py
Original file line number Diff line number Diff line change
@@ -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:
@@ -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)
2 changes: 1 addition & 1 deletion wntr/sim/__init__.py
Original file line number Diff line number Diff line change
@@ -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
@@ -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
Loading