pub struct ResourceOptimizer { /* private fields */ }Expand description
Resource optimizer for intelligent resource allocation and rebalancing
Implementations§
Source§impl ResourceOptimizer
impl ResourceOptimizer
Sourcepub fn add_strategy(&mut self, strategy: Box<dyn OptimizationStrategy>)
pub fn add_strategy(&mut self, strategy: Box<dyn OptimizationStrategy>)
Add an optimization strategy
Sourcepub fn start_optimization(&mut self) -> SklResult<()>
pub fn start_optimization(&mut self) -> SklResult<()>
Start optimization loop
Sourcepub fn stop_optimization(&mut self) -> SklResult<()>
pub fn stop_optimization(&mut self) -> SklResult<()>
Stop optimization loop
Sourcepub fn optimize(
&mut self,
current_allocations: &[ResourceAllocation],
available_resources: &ResourceUsage,
pending_requests: &[TaskRequirements],
) -> SklResult<OptimizationResult>
pub fn optimize( &mut self, current_allocations: &[ResourceAllocation], available_resources: &ResourceUsage, pending_requests: &[TaskRequirements], ) -> SklResult<OptimizationResult>
Perform optimization cycle
Sourcepub fn calculate_optimization_score(
&self,
allocations: &[ResourceAllocation],
usage: &ResourceUsage,
) -> f64
pub fn calculate_optimization_score( &self, allocations: &[ResourceAllocation], usage: &ResourceUsage, ) -> f64
Calculate optimization score using SIMD acceleration
Trait Implementations§
Source§impl Debug for ResourceOptimizer
impl Debug for ResourceOptimizer
Auto Trait Implementations§
impl Freeze for ResourceOptimizer
impl !RefUnwindSafe for ResourceOptimizer
impl Send for ResourceOptimizer
impl Sync for ResourceOptimizer
impl Unpin for ResourceOptimizer
impl !UnwindSafe for ResourceOptimizer
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 more