The push/pull-chaining nature of WSIMOD makes function calls highly recursive. In large networks, this can cause recursion errors (even if it is actually the intended behaviour).
Our ballpark estimates of network sizes need about 7 recursions per river junction node (River or Node), so paths of, e.g., 150 nodes, may trigger the lowest recursion limit of 1000 on some systems.
The easiest way to control this is by enabling config to set recursion limit (sys.setrecursionlimit) and do some calculations as to what that should be based on the model size.
It does raise an issue of the chaining model philosophy in WSIMOD (e.g., do we really need to do a full chain every pull/push) - but this is complicated, likely to be case specific, and probably needs some complicated orchestration. So can be addressed separately.
The push/pull-chaining nature of WSIMOD makes function calls highly recursive. In large networks, this can cause recursion errors (even if it is actually the intended behaviour).
Our ballpark estimates of network sizes need about 7 recursions per river junction node (
RiverorNode), so paths of, e.g., 150 nodes, may trigger the lowest recursion limit of 1000 on some systems.The easiest way to control this is by enabling
configto set recursion limit (sys.setrecursionlimit) and do some calculations as to what that should be based on the model size.It does raise an issue of the chaining model philosophy in WSIMOD (e.g., do we really need to do a full chain every pull/push) - but this is complicated, likely to be case specific, and probably needs some complicated orchestration. So can be addressed separately.