Skip to main content

verdict_worst

Function verdict_worst 

Source
pub fn verdict_worst(
    entry: &MachineEntry,
    cfg: &Config,
    bounds: &[(String, f64, f64)],
) -> Result<(Vec<Worst>, usize), ConfigError>
Expand description

A search for the worst combination of the uncertain parameters, per verdict. With n parameters the bounds have 2^n corners, too many to run; the search looks at few of them:

  1. The cycle with each parameter alone at its low and its high bound (as verdict_bands, 2 n runs).
  2. Per verdict the corner where each parameter is at the bound that made that verdict worse alone (a parameter that moved it not at all goes to its high bound). Where the verdict is a sum of effects that do not depend on each other (a monotone function of each parameter), this is the worst corner.
  3. Up to WORST_PASSES passes per verdict: from its corner every parameter that moved the verdict alone is flipped to its other bound, one at a time; the flips that made it worse are taken together, and the worse of that corner and the best single flip becomes the corner, if it is worse than before. The search ends when a pass finds nothing worse. This catches parameters whose sign changes with the others (interactions).

The same corner is run once for all verdicts that land on it, and the runs share the processors. What is reported per verdict is the worst value it took in any run, the runs of step 1 included, with where the parameters were: never better than verdict_bands. Returns the verdicts in the order they came up (as verdict_bands) and the number of cycles simulated.

It is a search, not a proof: a verdict that is worst at a corner which no single flip from the sign corner leads to, or inside the bounds and not at a corner at all (a resonance hit by a stiffness between its bounds), can be missed. verdict_bands_sampled looks inside.