pub fn bounds(cfg: &Config) -> Result<Vec<(String, f64, f64)>, ConfigError>Expand description
The low and high bound of every uncertain parameter of a config, as (path, low, high).
The table [bounds] mirrors the config: where the config has [friction_x] coulomb_n = 15.0, it has
friction_x.coulomb_n = [10.0, 20.0], in the unit of the value. A pair and not a relative width,
because the parameter panel and the translation check skip arrays (Config::leaves), so bounds need
no labels, and because a value of zero can have bounds this way. A bound on a value the config does
not have, or one that is not a low and a high number, is refused. A bound on a value that only an effect that
is off uses (PATH_EFFECTS, e.g. thermal.* without effects.part_heating), or that no cycle uses (the DC link’s
discharge while disabled), is checked and left out.
A part by name ([parts], --motor, --drive, …) re-centres the bounds of the values it puts in: they are/// scaled by the part’s value over the config’s own (catalog::set), so that a band written for the config’s motor and/// drive keeps its relative width around the named part’s value. A list taken from a config before its parts were/// applied is read anew from the resolved config by the functions that run the bounds (followed).