Is there a way to calculate fields during a downstream trace?
I start with an original value that is a flow value. I would like to substract device field values (heat demand) from that original flow value - and update edge fields with this new value-when the trace meets a device storing that value. The flow value will get smaller and smaller down the trace, as it passes the devices, and will be applied to edges down the trace (to simulate a diminishing flow). Can I somehow use propagator for that or is there another way?
thanks,
Propagation will not work for this workflow. You could use Functions in a trace. The field you would use would need to be a network attribute. Then you could use a trace to subtract the fields value.
Thanks, but I can't see how I should set it up!? How can it in just one trace:
1 ) populate original flow value for the first edges before the trace meets a device.
2) when meeting a device substract the value of the device from the flow value and update the next edges downstream with the new lesser flow until meeting the next device
3) keep doing that and update alle the edges downstream it with smaller and smaller flow values
I cant see how I can do it!? can it be done in 1 trace, and if so, how - should i use a script?
thanks,
I guess you have three options to accomplish this.
1) Use multiple traces, each trace stopping at locations where flow need a value set. This would not be a fast solution!
2) Use a single trace and export the subnetwork connectivity to a json and then read the json, traversing the connectivity and calculating the value. You could do this in python.
3) Write a tool in Enterprise SDK (SOI probably) that performance a trace. Try using the IUNTraceResults4.TraceResultPaths property to walk the connectivity. I have not tried this, but will soon.