Skip to content

Bug: user defined minimum pipe diameter #500

Description

@KobusVanRooyen

When the min pipe diameter in templates/measures is not DN20, but DN40 for instance, then DN 40 is the lower limit considered by the optimizer and not DN150 (default min value). This is activated via variable self._ESDLMixin__use_user_defined_minimum_pipe_size.

However during the dev of pipe location based costs it was noticed that self._ESDLMixin__use_user_defined_minimum_pipe_size is always True when measures or templates are used (even if DN20 exists in the templates/measures). The reason for this is due to the following check in esdl_mixin.py:

if (
not self._ESDLMixin__use_user_defined_minimum_pipe_size
and float(pipe_classes[i].name.replace("DN", "")) != 20.0
):
self._ESDLMixin__use_user_defined_minimum_pipe_size = True

This code will always return self._ESDLMixin__use_user_defined_minimum_pipe_size = True. This code has to be updated to check id DN20 exists after looping over all pipes in pipe_classes, and after pipe_classes has been updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions