Struct flintec_lpp::TimeLoad [−][src]
pub struct TimeLoad {
pub time: Vec<DateTime<FixedOffset>>,
pub load: Vec<f64>,
}
Expand description
The main struct for the load time series.
Fields
time: Vec<DateTime<FixedOffset>>
load: Vec<f64>
Implementations
Initiate a new TimeLoad instance using the given capacity for the time and load vectors
Initiate a TimeLoad from csv setting load to NAN in case of load parsing errors, but panic for datatime errors. Do not check the continuity of the time series and presence of error flags, these are checked separately afterwards
Fill the datetime gaps with NAN to have continuous datetime. Take a reference to the read TimeLoad and return a new continuous TimeLoad. In fact, build a continuous datetime Vec and then match it with the load Vec? Use the minimum time interval in the data to determine the desired time step for the output.
Replace all values measured at the bad datetimes nan. Need to be given as DateTime for correct and easier comparison.
pub fn replace_bad_time_interval_with_nan(
&mut self,
time_init: NaiveTime,
time_stop: NaiveTime
)
pub fn replace_bad_time_interval_with_nan(
&mut self,
time_init: NaiveTime,
time_stop: NaiveTime
)
Replace all values measured within the time interval with nan. Given in standard time, fixed offset for the chosen timezone.
Set to NAN all the load values that are out of the expected range.
Consider all the values > max_value as invalid and replace them with NAN. These high values are used for the errors.
Write the datetime and load columns to a csv file at the given path. Use RFC 3339 - ISO 8601 for datetime.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TimeLoad
impl UnwindSafe for TimeLoad
Blanket Implementations
Mutably borrows from an owned value. Read more
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.