cspy.check

cspy.check(G, max_res=None, min_res=None, direction=None, REF_callback=None, algorithm=None)

Checks whether inputs and the graph are of the appropriate types and have the required properties. For non-specified REFs, 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

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

min_reslist of floats, optional

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

directionstring, optional

preferred search direction. Either ‘both’,’forward’, or, ‘backward’. Default : ‘both’.

REF_forward, REF_backward, REF_joinfunctions, optional

Custom resource extension function. See REFs for more details.

raises

Raises exceptions if incorrect input is given. If multiple exceptions are raised, an exception with a list of errors is raised.