`ragraph.analysis.sequence.metrics`#

Sequence metrics.

Module Contents#

Functions#

 `feedback_marks`(→ Tuple[float, numpy.ndarray]) Measure the sum of feedback marks in an adjacency matrix. `feedback_distance`(→ Tuple[float, numpy.ndarray]) Measure the feedback length, e.g. distance from the adjacency matrix diagonal. `lower_left`(→ Tuple[float, numpy.ndarray]) Measure the distance to the lower left of the adjacency matrix. `feedback_lower_left`(→ Tuple[float, numpy.ndarray]) Jointly measure lower left distance to the adjacency matrix diagonal and `feedback_crossover`(→ Tuple[float, Tuple[numpy.ndarray, ...) Jointly measure feedback marks and crossovers in an adjacency matrix. `net_markov_flow_adjacency`(→ numpy.ndarray) Calculate a flow balance as if the matrix would constitute a (weighted) `net_markov_flow_graph`(→ numpy.ndarray) Calculate a flow balance as if the graph would constitute a (weighted)
ragraph.analysis.sequence.metrics.feedback_marks(mat: numpy.ndarray) Tuple[float, numpy.ndarray]#

Measure the sum of feedback marks in an adjacency matrix.

Parameters:

mat – Adjacency matrix to analyze.

Returns:

Resulting metric. Cell contribution matrix.

References

Steward, D. V., 1981, Systems Analysis and Management: Structure, Strategy and

Design, Petrocelli Books, New York.

Kusiak, A., & Wang, J. (1993). Decomposition of the Design Process. Journal of

Mechanical Design, 115(4), 687. https://doi.org/10.1115/1.2919255

ragraph.analysis.sequence.metrics.feedback_distance(mat: numpy.ndarray) Tuple[float, numpy.ndarray]#

Measure the feedback length, e.g. distance from the adjacency matrix diagonal.

Parameters:

mat – Adjacency matrix to analyze.

Returns:

Resulting metric. Cell contribution matrix.

References

Gebala, D. A., & Eppinger, S. D. (1991). Methods for analyzing design

procedures. ASME Design Technical Conferences (Design Theory and Methodology), 227–233. Miami.

ragraph.analysis.sequence.metrics.lower_left(mat: numpy.ndarray) Tuple[float, numpy.ndarray]#

Measure the distance to the lower left of the adjacency matrix.

Parameters:

mat – Adjacency matrix to analyze.

Returns:

Resulting metric. Cell contribution matrix.

References

Todd, D. S. (1997). Multiple criteria genetic algorithms in engineering design

and operation. University of Newcastle.

ragraph.analysis.sequence.metrics.feedback_lower_left(mat: numpy.ndarray, fb: float = 100.0, ff: float = 1.0) Tuple[float, numpy.ndarray]#

Jointly measure lower left distance to the adjacency matrix diagonal and feedback marks. Feedback and feedforward are penalized differently, but both via a quadratic lower-left distance factor.

Parameters:
• mat – Adjacency matrix to analyze.

• fb – Feedback adjacency multiplier.

• ff – Feedforward adjacency multiplier.

Returns:

Resulting metric. Cell contribution matrix.

Note

Feedback marks above the diagonal are weighted 100 times more than those below the diagonal. The multiplier is offset by (n-1)^2.

References

Scott, J. A. (1999). A strategy for modelling the design-development phase of a

product. University of Newcastle. See Equation 6.1 and Figure 6.4.

ragraph.analysis.sequence.metrics.feedback_crossover(mat: numpy.ndarray, fb: float = 0.9, co: float = 0.1) Tuple[float, Tuple[numpy.ndarray, numpy.ndarray]]#

Jointly measure feedback marks and crossovers in an adjacency matrix.

Parameters:
• mat – Adjacency matrix to analyze.

• fb – Weight of feedback marks.

• co – Weight of feedback crossovers.

Returns:

Resulting metric. Cell contribution matrices (feedback, crossover).

Note

Crossovers are where the “axis” from feedback marks towards the diagonal cross, except when this crossing is a feedback mark in itself. Multiple lines from “above” in the matrix are summed, those from the right are NOT (treated as binary).

References

McCulley, C., and Bloebaum, C. L., 1996, “A Genetic Tool for Optimal Design

Sequencing in Complex Engineering Systems,” Struct. Optim., 12(2), pp. 186–201.

ragraph.analysis.sequence.metrics.net_markov_flow_adjacency(mat: numpy.ndarray, inf: float = 1.0, dep: float = 1.0, mu: float = 2.0, scale: bool = True) numpy.ndarray#

Calculate a flow balance as if the matrix would constitute a (weighted) Markov chain.

Parameters:
• mat – Adjacency matrix to analyze.

• inf – The weight to subtract outgoing flow by.

• dep – The weight to add incoming flow by.

• mu – Evaporation constant when calculating flow through nodes.

• scale – Whether to scale the inflow vector according to the adjacency matrix column sums.

Returns:

Nodal flow balance as an array.

ragraph.analysis.sequence.metrics.net_markov_flow_graph(graph: ragraph.graph.Graph, nodes: Optional[Union[List[ragraph.node.Node], List[str]]] = None, inherit: bool = True, loops: bool = False, inf: float = 1.0, dep: float = 1.0, mu: float = 2.0) numpy.ndarray#

Calculate a flow balance as if the graph would constitute a (weighted) Markov chain.

Parameters:
• graph – Graph to analyze nodes of.

• nodes – Set of node (names) to calculate the flow with.

• inherit – Whether to take into account edges between descendants of nodes.

• loops – Whether to take into account self-loop edges.

• inf – The weight to subtract outgoing flow by.

• dep – The weight to add incoming flow by.

• mu – Evaporation constant when calculating flow through nodes.

Returns:

Nodal flow balance as an array.

Note

Uses edge inheritance to calculate an adjacency matrix.