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

[Bug] Setting a ConstControl giving an index that does not exist #506

Open
SimonRubenDrauz opened this issue Feb 1, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@SimonRubenDrauz
Copy link
Collaborator

Describe the bug
When starting a time series with a ConstControl and the ConstControl references to a element_index that does not exist, a weird error appears. A UserWarning would be nice that checks if there are no nan-values in the relevant columns

To Reproduce
Here a script, that reproduces the error:
net = ps.create_empty_network(fluid='hgas')
ps.create_junction(net, 0.1, 283,15)
ps.create_sink(net, 0, 0.01)
ps.create_ext_grid(net, 0, 0.1)
profile = pd.DataFrame(np.random.random(10))
ConstControl(net, 'sink', 'mdot_kg_per_s', 30, 0, DFData(profile))
log_variables = [('res_sink', 'mdot_kg_per_s'),
('res_pipe', 'v_mean_m_per_s'),
('res_junction', 'p_bar')]
OutputWriter(net, profile.index, r'workshop/net_data_pipe/results', output_file_type='.csv', log_variables=log_variables)
run_timeseries_pps(net, range(10))

Error message
Process finished with exit code -1073741819 (0xC0000005)

Expected behavior
The Error Message should be clearer.

Python environment (please complete the following information):
pandapipes version: develop
pandas version: 1.5.3
networkx version: 3.0
scipy version: 1.10.0
numpy version: 1.23.5
packaging version: 23.0
tqdm version: 4.64.1
deepdiff version: 6.2.3
Operating System name/version: Windows 11

@SimonRubenDrauz SimonRubenDrauz added the bug Something isn't working label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant