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

Error Checking in EN_open is too strcit for network building by code #579

Closed
LRossman opened this issue Jan 25, 2020 · 3 comments
Closed
Milestone

Comments

@LRossman
Copy link
Collaborator

Consider the use case where the toolkit functions are being used in some app to build a network directly by function calls. Suppose a user has created a partial network with lots of nodes of which only some have been connected by links and with no tanks/reservoirs. They then call EN_saveinpfile to save their work so they can complete their analysis at some later time. When they try to use EN_open to re-open their project again the function fails because it detects unlinked nodes and no tanks/reservoirs thus making all of their previous editing work lost to the app.

Checks on these conditions should have been made after a network is completely built and is ready to be analyzed. Other error conditions that EN_open checks for that should be postponed until a network is analyzed are invalid tank levels, invalid pump curve parameters, and an inability to open a Hydraulics file.

@eladsal
Copy link
Member

eladsal commented Jan 25, 2020

@LRossman I think this was discussed somewhere before. Basically you need a Load function and then a Check function, right?

@LRossman
Copy link
Collaborator Author

@eladsal I think just a Check function is needed, to be called in EN_openH (or EN_openQ if no hydraulics are analyzed). EN_open can still serve as a Load function once its validity checks are removed.

@eladsal eladsal added this to the v2.3 milestone Feb 14, 2020
@LRossman
Copy link
Collaborator Author

This issue has been successfully addressed in PR #580.

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

No branches or pull requests

2 participants