pub struct BatchModelChain {Show 13 fields
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,
pub auto_decomposition: bool,
pub system_losses: f64,
pub bifaciality_factor: f64,
pub bifacial_ground_albedo: f64,
}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: DiffuseModel§auto_decomposition: boolWhen true, automatically decompose GHI into DNI/DHI using the Erbs model if DNI and DHI are both near zero but GHI is positive.
system_losses: f64System losses (wiring, connections, mismatch, soiling): 0.0 = no losses, 0.14 = 14% losses.
bifaciality_factor: f64Bifaciality factor: 0.0 = monofacial, 0.65-0.85 typical for bifacial modules.
bifacial_ground_albedo: f64Ground albedo used for rear-side irradiance calculation.
Implementations§
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 with_auto_decomposition(self, enabled: bool) -> Self
pub fn with_auto_decomposition(self, enabled: bool) -> Self
Builder: enable/disable automatic GHI to DNI/DHI decomposition via Erbs model.
Sourcepub fn with_system_losses(self, losses: f64) -> Self
pub fn with_system_losses(self, losses: f64) -> Self
Builder: set system losses (0.0 = no losses, 0.14 = 14% losses). Clamped to [0.0, 1.0].
Sourcepub fn with_bifacial(self, bifaciality_factor: f64, ground_albedo: f64) -> Self
pub fn with_bifacial(self, bifaciality_factor: f64, ground_albedo: f64) -> Self
Builder: set bifacial parameters.
bifaciality_factor is typically 0.65-0.85 for bifacial modules (0.0 = monofacial).
ground_albedo is the albedo used for rear-side irradiance calculation.
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
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>
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>
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