/// Creates a new `Record` summarising the simulation data.
///
/// # Parameters
///
/// * `time_stamp` - the time stamp of the simulation data point
/// * `meter_power_consumption` - the power consumption as simulated by
/// the corresponding `Meter`
/// * `pv_power_output` - the power output as simulated by the corresponding
/// photovoltaic component
Creates a new `Record` summarising the simulation data.
Creates a new ` Record ` summarising the simulation data .
fn new(time_stamp: DateTime<Utc>, meter_power_consumption: f64, pv_power_output: f64) -> Self {
        Record {
            time_stamp,
            meter_power_consumption,
            pv_power_output,
            // Power consumption and output per definition have different signs,
            // so addition of both values as specified in the exercise"s description
            // results in subtraction.
            total_power_output: pv_power_output - meter_power_consumption,
        }
    }
fn new ( time_stamp : DateTime < Utc > , meter_power_consumption : f64 , pv_power_output : f64 ) -> Self { Record { time_stamp , meter_power_consumption , pv_power_output , // Power consumption and output per definition have different signs, // so addition of both values as specified in the exercise"s description // results in subtraction. total_power_output : pv_power_output - meter_power_consumption , } }
Creates a new `Record` summarising the simulation data.
Creates a new ` Record ` summarising the simulation data .
time_stamp
DateTime<Utc>
meter_power_consumption
f64
pv_power_output
f64