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

in Ability to recognise PBV (Valves using WNTRSimulator) #354

Closed
henryco123 opened this issue Jun 8, 2023 · 5 comments
Closed

in Ability to recognise PBV (Valves using WNTRSimulator) #354

henryco123 opened this issue Jun 8, 2023 · 5 comments
Labels

Comments

@henryco123
Copy link


NotImplementedError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_11704/2318240449.py in
40 # Run a preliminary simulation to determine if junctions drop below the pressure threshold during normal conditions
41 sim = wntr.sim.WNTRSimulator(wn)
---> 42 results = sim.run_sim()
43 min_pressure = results.node['pressure'].loc[:, wn.junction_name_list].min()
44 below_threshold_normal_conditions = set(min_pressure[min_pressure < pressure_threshold].index)

~\anaconda3\lib\site-packages\wntr\sim\core.py in run_sim(self, solver, backup_solver, solver_options, backup_solver_options, convergence_error, HW_approx, diagnostics)
829 logger.debug('creating hydraulic model')
830 self.mode = self._wn.options.hydraulic.demand_model
--> 831 self._model, self._model_updater = wntr.sim.hydraulics.create_hydraulic_model(wn=self._wn, HW_approx=HW_approx)
832
833 if diagnostics:

~\anaconda3\lib\site-packages\wntr\sim\hydraulics.py in create_hydraulic_model(wn, HW_approx)
93 constraint.fcv_headloss_constraint.build(m, wn, model_updater)
94 if len(wn.pbv_name_list) > 0:
---> 95 raise NotImplementedError('PBV valves are not currently supported in the WNTRSimulator')
96 if len(wn.gpv_name_list) > 0:
97 raise NotImplementedError('GPV valves are not currently supported in the WNTRSimulator')

NotImplementedError: PBV valves are not currently supported in the WNTRSimulator

@kaklise
Copy link
Collaborator

kaklise commented Jun 9, 2023

Thanks for posting this issue. PBVs are included in the list of limitations for the WNTRSimulator (https://wntr.readthedocs.io/en/latest/framework.html#limitations). This should be straight forward to implement, but it might take us some time to get to it. Let us know if you are interested in adding this feature, otherwise I'll mark this as an enhancement and keep the issue open.

@henryco123
Copy link
Author

henryco123 commented Jun 9, 2023 via email

@kaklise
Copy link
Collaborator

kaklise commented Jun 9, 2023

I'm not able to see the image, it may have been attached to an email instead of posted in GitHub.

@henryco123
Copy link
Author

Capture

@kaklise
Copy link
Collaborator

kaklise commented Jun 9, 2023

Looks like numpy is trying to multiple a float at NoneType. Can you provide a simple example using WNTR that replicates this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants