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

HydraulicProps, DefOptions, TOptions array misalignment causing complex code #18

Open
lbutler opened this issue Mar 4, 2024 · 0 comments

Comments

@lbutler
Copy link
Collaborator

lbutler commented Mar 4, 2024

We face a challenge with the misalignment among HydraulicProps, DefOptions, and TOptions arrays in EPANET, complicating backward compatibility and data management. The misorder requires workaround solutions like magic numbers or complex logic, especially when adding new records for features and ensuring compatibility with older .net file versions.

Proposed changes include:

Align all three arrays: This simplification could streamline data handling but requires managing the backward compatibility management in Ufileio.pas.
Introduce a lookup for HydraulicProps: Allow for easier adding or sorting of the properties in the array using a lookup with the existing index constants

Details of what was needed to be done can be see in PR Emitter backflow option #16

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

1 participant