pub struct ScenarioBuilder;Expand description
Builder for common simulation scenarios.
Implementations§
Source§impl ScenarioBuilder
impl ScenarioBuilder
Sourcepub fn daily_load_curve(
bus: usize,
p_max_mw: f64,
p_min_mw: f64,
) -> Vec<ScheduledEvent>
pub fn daily_load_curve( bus: usize, p_max_mw: f64, p_min_mw: f64, ) -> Vec<ScheduledEvent>
Generate a 24-hour sinusoidal load curve as scheduled events (hourly steps).
P(h) = P_min + (P_max - P_min) * 0.5 * (1 - cos(2π*h/24))
Sourcepub fn n1_line_trip(branch_id: usize, t_fault_s: f64) -> Vec<ScheduledEvent>
pub fn n1_line_trip(branch_id: usize, t_fault_s: f64) -> Vec<ScheduledEvent>
N-1 single line trip event at t_fault_s.
Sourcepub fn generator_loss(
generator_bus: usize,
capacity_mw: f64,
t_fault_s: f64,
) -> Vec<ScheduledEvent>
pub fn generator_loss( generator_bus: usize, capacity_mw: f64, t_fault_s: f64, ) -> Vec<ScheduledEvent>
Major generator loss event at t_fault_s.
Auto Trait Implementations§
impl Freeze for ScenarioBuilder
impl RefUnwindSafe for ScenarioBuilder
impl Send for ScenarioBuilder
impl Sync for ScenarioBuilder
impl Unpin for ScenarioBuilder
impl UnsafeUnpin for ScenarioBuilder
impl UnwindSafe for ScenarioBuilder
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.