4.1.8.4. causality/Flow¶
- class mod.CausalityFlowQuery¶
Representation of a query for a DAG that can be folded back into a given flow. The query is based on a derivation graph and can thus be used for any flow solution from a model based on that derivation graph.
- __init__(dg)¶
Construct a query with multiplicity 1 and no borrowing.
- Raises
LogicError
ifdg
isNone
.
- multiplicity¶
Access the multiplicity of the query. It must be at least 1.
- Type
- Raises
(set)
LogicError
if assigned a number less than 1.
- __setitem__(v, count)¶
- __setitem__(g, count)
Set the amount of flow allowed to be borrowed at a given vertex. The version taking a graph as argument is equivalent to
self[dg.findVertex(g)]
.
- __getitem__(v)¶
- __getitem__(g)
- Parameters
- Return type
- Returns
the amount of flow allowed to be borrowed at a given vertex. The version taking a graph as argument is equivalent to
self[dg.findVertex(g)]
.
- constrainRouting¶
Access whether transit edges must conform to the routing expressed by the flow. Setting this to
false
may give results violating flow constraints.