pub struct Feeder {
name: &'static str,
net_kw: f32,
max_import_kw: f32,
max_export_kw: f32,
}Expand description
A simple feeder model that aggregates device power into net load.
Net load convention:
- Positive values increase feeder load (consumption)
- Negative values reduce feeder load (generation)
Fields§
§name: &'static str§net_kw: f32§max_import_kw: f32§max_export_kw: f32Implementations§
Source§impl Feeder
impl Feeder
pub fn with_limits( name: &'static str, max_import_kw: f32, max_export_kw: f32, ) -> Self
pub fn reset(&mut self)
Sourcepub fn add_net_kw(&mut self, kw: f32)
pub fn add_net_kw(&mut self, kw: f32)
Adds a signed contribution to feeder net load.
pub fn net_kw(&self) -> f32
pub fn max_import_kw(&self) -> f32
pub fn max_export_kw(&self) -> f32
pub fn min_net_kw(&self) -> f32
pub fn max_net_kw(&self) -> f32
pub fn within_limits(&self) -> bool
pub fn name(&self) -> &'static str
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Feeder
impl RefUnwindSafe for Feeder
impl Send for Feeder
impl Sync for Feeder
impl Unpin for Feeder
impl UnwindSafe for Feeder
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