pub struct OptimizationStrategy {
pub name: String,
pub objective: OptimizationObjective,
pub constraints: Vec<OptimizationConstraint>,
pub parameters: HashMap<String, Decimal>,
pub risk_tolerance: RiskLevel,
pub time_horizon_days: u32,
}Expand description
Optimization strategy configuration
Fields§
§name: String§objective: OptimizationObjective§constraints: Vec<OptimizationConstraint>§parameters: HashMap<String, Decimal>§risk_tolerance: RiskLevel§time_horizon_days: u32Implementations§
Source§impl OptimizationStrategy
impl OptimizationStrategy
pub fn new(name: String, objective: OptimizationObjective) -> Self
pub fn with_risk_tolerance(self, risk_tolerance: RiskLevel) -> Self
pub fn with_time_horizon(self, days: u32) -> Self
pub fn add_constraint(&mut self, constraint: OptimizationConstraint)
pub fn set_parameter(&mut self, key: String, value: Decimal)
pub fn get_parameter(&self, key: &str) -> Option<Decimal>
Trait Implementations§
Source§impl Clone for OptimizationStrategy
impl Clone for OptimizationStrategy
Source§fn clone(&self) -> OptimizationStrategy
fn clone(&self) -> OptimizationStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptimizationStrategy
impl Debug for OptimizationStrategy
Source§impl<'de> Deserialize<'de> for OptimizationStrategy
impl<'de> Deserialize<'de> for OptimizationStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OptimizationStrategy
impl RefUnwindSafe for OptimizationStrategy
impl Send for OptimizationStrategy
impl Sync for OptimizationStrategy
impl Unpin for OptimizationStrategy
impl UnwindSafe for OptimizationStrategy
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