network.BasicReach
network.BasicReach(self, id, start, end, length=None, breakpoints=None)Concrete :class:NetworkReach for programmatic network construction.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| id | str | Unique reach identifier. | required |
| start | NetworkNode | Start node. | required |
| end | NetworkNode | End node. | required |
| length | float | Reach length, by default None (undefined). | None |
| breakpoints | list[ReachBreakPoint] | Intermediate break points, by default empty. | None |
Examples
>>> reach = BasicReach("reach_1", node_a, node_b, length=250.0)Where the domain has no reach length, leave it out:
>>> reach = BasicReach("pipe_1", node_a, node_b)Two of these between the same two nodes - twin pipes, parallel pumps - need a break point each, or the graph cannot tell them apart. See :attr:NetworkReach.breakpoints.
Attributes
| Name | Description |
|---|---|
| end_distance | Position of the end node, or None where the length is undefined. |
| n_breakpoints | Number of break points in the reach. |
| start_distance | Position of the start node, in the frame :attr:breakpoints are placed in. |