Skip to main content

setpoint_age_of

Function setpoint_age_of 

Source
pub fn setpoint_age_of(time: &[f64], held: &[&[f64]]) -> Vec<f64>
Expand description

The signal setpoint_age of a run recorded without it, from the run’s own timing: its times time (the simulation’s, from 0) and its held setpoints held. The profile cycle T is the shortest time between two samples whose setpoints differ (the sample period where they differ at every sample or only once), and the controller sets them at every multiple of T in the step from there (Controller::update), after the sample of that moment (the CLI’s run samples before each step): at t > 0 the age is t less the last multiple of T before it, (0, T], and 0 at t = 0. A run sampled at a multiple of its profile cycle above one (the CLI’s --every past it) reads T as its sample period: the file does not hold the cycle then.