cspy.preprocess_graph

cspy.preprocess_graph(G, max_res, min_res, preprocess, REF=None)

Applies preprocessing that removes nodes that cannot be reached due to resource limits.

Parameters

Gobject instance nx.Digraph()

must have n_res graph attribute and all edges must have res_cost attribute.

max_reslist of floats, optional

[L, M_1, M_2, ..., M_{n\_res}] upper bound for resource usage. We must have len(max_res) \geq 2

min_reslist of floats, optional

[U, L_1, L_2, ..., L_{nres}] lower bounds for resource usage. We must have len(min_res) = len(max_res) \geq 2

preprocessbool

enables preprocessing routine.

return

If preprocess is True, returns the preprocessed graph if no exceptions are raised.