what -- The variable in scenario stats to compute with.
"""
assert len(sl) > 0
- wl = [s["sc"][what] for s in sl if "sc" in s and what in s["sc"]]
+ wl = [
+ s["sc"][what] for s in sl
+ if "sc" in s
+ and what in s["sc"]
+ and (
+ "cost" in s["sc"]
+ and s["sc"]["cost"] != 9999
+ )
+ ]
el = [
1 for s in sl
if "sc" in s
and "cost" in s["sc"]
+ and s["sc"]["cost"] != 9999
and s["sc"]["cost"] != -1
]
if len(wl) == 0:
wl_std = inf
wl_max = inf
wl_min = -inf
+ wl_med = inf
else:
wl_mean = sum(wl) / len(wl)
wl_tmp = [(x - wl_mean)**2 for x in wl]
col = compute_stats(sl, "connecteds-in-path")
nl = compute_stats(sl, "nodes")
print(gos().format(
- tl["err"], sl[0]["dn"], sl[0]["fn"],
+ tl["err"], sl[0]["dn"][:15], sl[0]["fn"],
"-", "-",
tl["avg"], tl["std"], tl["med"], tl["max"], tl["min"],
il["avg"], il["std"], il["med"], il["max"], il["min"],