pub struct Candidate {Show 14 fields
pub article: &'static str,
pub gearbox: String,
pub drive: &'static str,
pub supply: &'static str,
pub axis: String,
pub motor: String,
pub mass: f64,
pub cost: f64,
pub parts: Vec<(String, f64)>,
pub price: Option<f64>,
pub result: Option<(CycleLoad, Vec<Verdict>)>,
pub refused: &'static str,
pub duties: Vec<(f64, CycleLoad)>,
pub figures: Option<Figures>,
}Expand description
One combination of parts tried on a machine’s cycle: a motor with its drive, with or without a gearbox, on the config’s axis or one of the catalogue’s.
Fields§
§article: &'static str“” for an axis ruled out before any motor was tried on it.
gearbox: StringThe gearbox as apply_gearbox names it; “” where the config’s own gearbox stayed.
drive: &'static strThe drive the catalogue pairs with the motor (paired_drive); “” where there is none, and the config’s stayed.
supply: &'static strThe supply the motor was tried at (SUPPLIES, which says the maker: vendor_of); “” for a refused axis.
axis: StringThe axis of the catalogue the motor was tried on; “” for the config’s own.
motor: StringThe one motor the candidate is for (search_motor, its id); “” for every motor that takes the shared one.
mass: f64Motor and gearbox of one drive axis, kg.
cost: f64The stand-in for the price, which no catalogue file has: the installed weight of everything the combination
names, kg. Motor and gearbox times the number of motors that take it (not those with a motor of their own,
[motor.<id>] or [parts.<id>]; one for search_motor), and the axis at the config’s strokes.
parts: Vec<(String, f64)>The parts the combination buys, as the search’s table spells them, with how many of each: every motor’s motor,
gearbox and drive (the candidate’s where it takes the shared ones, its own [parts.<id>] where it has them;
none where the config has hand-entered values), the axis and the belt; the parts a config keeps are named too.
For one motor (search_motor) that motor’s alone. Empty for an axis ruled out before any motor was tried.
price: Option<f64>The user’s price for parts (apply_prices); None without a price list or where a part has no price in it.
result: Option<(CycleLoad, Vec<Verdict>)>The cycle and its verdicts; None where the cycle was not run, with the reason in refused. With a duty mix
(Options::duties) the first duty’s cycle and the verdicts of the mix (search::mix_verdicts).
refused: &'static str§duties: Vec<(f64, CycleLoad)>With a duty mix: each duty’s weight and cycle, in the order of Options::duties; empty for one cycle.
figures: Option<Figures>The figures of the search’s table (search::Figures), where the cycle ran.
Implementations§
Source§impl Candidate
impl Candidate
pub fn passes(&self) -> bool
Sourcepub fn tightest(&self) -> Option<(&'static str, f64)>
pub fn tightest(&self) -> Option<(&'static str, f64)>
The check closest to (or furthest beyond) its limit, with value over limit (analysis::utilisation: for a
life limit over value). The belt’s slack does not count while it passes. Two checks of the DC link do not count while they
pass, because their ratio is no measure of how close the cycle is to failing: with a braking resistor
behind them the capacitors fill to their limit by design, in every cycle that brakes hard enough, and
the resistor’s checks say what that costs; and the voltage is never below the bus, so its ratio to
the trip level starts at 0.6 or so. Nor does the warm start’s convergence while it passes: it says how
well the run was measured, not how close a part is to its limit.
A run whose drives tripped is infinitely far beyond: its figures end at the trip, where the DC link
was just past its limit, and by that ratio it would rank as the nearest to passing. For one motor (search_motor,
motor) only its own checks count, and those of the whole machine where they fail: the other motors’ are the
config’s, and a check of the whole machine mostly theirs.