teksi / wastewater

[DEV] Future TEKSI wastewater module, adapted data model to fit VSA-DSS 2020 new standard
https://teksi.github.io/wastewater
GNU General Public License v3.0
2 stars 5 forks source link

_usage_current calculation is wrong #424

Closed ponceta closed 1 day ago

ponceta commented 1 week ago

Describe the bug _usage_current calculation shoud be displaying the dirtiest water type

To Reproduce Exact steps to reproduce the behavior:

  1. connect clean wastewater and wastewater reaches to a node
  2. See error

Expected behavior dirtiest water type is displayed

Screenshots / data image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

cymed commented 2 days ago

What are your function_hierarchic? Function_hierarchic outweighs usage_current

https://github.com/teksi/wastewater/blob/c7c7e36b71a8bbde9aa1da13dd17347300e74007/datamodel/app/functions/symbology_functions.sql#L112-L116

ponceta commented 1 day ago

Ohooo! I didn't knew that! That's a new recommandation?

cymed commented 1 day ago

It is actually quite old. Otherwise we'd have problems with swwf connections (where you fill out the effective usage) into pwwf (where you fill out the allowed usage) in cases of wrong connections