qgisred / QGISRed

GNU General Public License v2.0
23 stars 8 forks source link

Assign demands #71

Open Bastien250 opened 2 years ago

Bastien250 commented 2 years ago

Hello,

Maybe it is already existing but, it will be great to have a tool like the extension : Demands in distribution (work in QGIS < 3.0) or the function "Assign Demand" from the tool "Water Network Tool". It will be great to have this in the app QGISRed

Thank you for your help and time.

neslerel commented 2 years ago

We have some features releated with the assignation of demands in our list to develop. Could you explain what do you expect with this tool?

Bastien250 commented 2 years ago

Hello,

Thanks for the answer.

Well I have a .csv file. I have lines with the water consumption of each consumer (L/s) and the x,y coordinates of each consumer.

The extension allow to assign demand to the nearest node (junction) of the model. The result is a layer containing connecting lines between sources and target layers, and an updated node layer (here it is "BaseDem" in the layer Junction of QGISRed). The assignment criterion is the minimum distance. If there are several consumers, the consumption are summed up.

Like the extension "Demands in distribution water network" : "Operation: Given a layer of origin (households) and another layer representing destination points (nodes), the algorithm calculates the distance between each point of origin (households) and the nearest point of detention (Nodes) and totaling the demand value that will be assigned to the nearest node (hub). In addition, the algorithm displays a "line" layer, created by the "Distance to nearest hub" component, which identifies households (origin) and Nodes (destination), allowing easy verification of geoprocessing connectivity."

Source code of Demands in distribution water network : https://github.com/edernilson/DemandInDistributionNetwork

Or maybe the code with water network tool : https://github.com/andresgciamtez/wnt

Thank you for the help. Bastien

neslerel commented 2 years ago

Thanks @Bastien250 for your detailed answer.

We have something like that in our list of features. However, we have extra elements that there are not considered in Epanet. We include all of them in a group called Digital Twin. In these sense, we think what you propose is more related with Service Connections. For us, right now, they are lines, but we want to allow import service connections from a point layer, creating this line between the point and the nearest pipe. The inclusion of the demand of this points (from service connections) is included authomatically in the nodes of the model.

I think @fmartine could explain with more detail we want to include in QGISRed.

Bastien250 commented 2 years ago

Hello, Thank you for the answer and the help. It will be great. When will you release the new update of QGISRed? Thanks Bastien

erstayudha commented 2 years ago

Hi, maybe I can provide input for the Assign demand tool that we usually use to help calculate the demand from each customer point. This tool is python based, its use can populate the BaseDem table from the nearest customer point. After that, you can join the table between the results with the BaseDem target field in Junction based on the ID fields of both layers. Cuplikan layar 2021-12-21 222945 Cuplikan layar 2021-12-21 224709 Hopefully @neslerel, in the future version, this tool can be included as a extension tool in the QGISRed. Demand Calc.zip

neslerel commented 2 years ago

Thanks @erstayudha for the information, we will review it!