pub struct BatchModelChain {
pub location: Location,
pub surface_tilt: f64,
pub surface_azimuth: f64,
pub system_capacity_dc: f64,
pub gamma_pdc: f64,
pub inverter_capacity: f64,
pub inverter_efficiency: f64,
pub albedo: f64,
pub transposition_model: DiffuseModel,
}Expand description
Batch ModelChain – runs the full PV simulation pipeline on a time series using rayon for parallel processing.
This is the main entry point for production batch simulations. A typical TMY year (8760 hourly timesteps) completes in milliseconds.
Fields§
§location: Location§surface_tilt: f64§surface_azimuth: f64§system_capacity_dc: f64§gamma_pdc: f64Temperature coefficient, e.g. -0.004
inverter_capacity: f64§inverter_efficiency: f64§albedo: f64§transposition_model: DiffuseModelImplementations§
Source§impl BatchModelChain
impl BatchModelChain
Sourcepub fn pvwatts(
location: Location,
surface_tilt: f64,
surface_azimuth: f64,
system_capacity_dc: f64,
) -> Self
pub fn pvwatts( location: Location, surface_tilt: f64, surface_azimuth: f64, system_capacity_dc: f64, ) -> Self
Create a new BatchModelChain with PVWatts-style defaults.
Sourcepub fn with_gamma_pdc(self, gamma_pdc: f64) -> Self
pub fn with_gamma_pdc(self, gamma_pdc: f64) -> Self
Builder: set temperature coefficient.
Sourcepub fn with_inverter(self, capacity: f64, efficiency: f64) -> Self
pub fn with_inverter(self, capacity: f64, efficiency: f64) -> Self
Builder: set inverter parameters.
Sourcepub fn with_albedo(self, albedo: f64) -> Self
pub fn with_albedo(self, albedo: f64) -> Self
Builder: set ground albedo.
Sourcepub fn with_transposition(self, model: DiffuseModel) -> Self
pub fn with_transposition(self, model: DiffuseModel) -> Self
Builder: set transposition model.
Sourcepub fn run(&self, weather: &WeatherSeries) -> Result<SimulationSeries, SpaError>
pub fn run(&self, weather: &WeatherSeries) -> Result<SimulationSeries, SpaError>
Run the full simulation on a weather time series.
Uses rayon for automatic parallelization across CPU cores.
Auto Trait Implementations§
impl Freeze for BatchModelChain
impl RefUnwindSafe for BatchModelChain
impl Send for BatchModelChain
impl Sync for BatchModelChain
impl Unpin for BatchModelChain
impl UnsafeUnpin for BatchModelChain
impl UnwindSafe for BatchModelChain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more