Trait snowcap::optimizers::Optimizer[][src]

pub trait Optimizer<P> where
    P: SoftPolicy
{ fn new(
        net: Network,
        modifiers: Vec<ConfigModifier>,
        hard_policy: HardPolicy,
        soft_policy: P,
        time_budget: Option<Duration>
    ) -> Result<Box<Self>, Error>;
fn work(
        &mut self,
        abort: Stopper
    ) -> Result<(Vec<ConfigModifier>, f64), Error>;
fn num_states(&self) -> usize; fn synthesize(
        net: Network,
        end_config: Config,
        hard_policy: HardPolicy,
        soft_policy: P,
        time_budget: Option<Duration>,
        abort: Stopper
    ) -> Result<(Vec<ConfigModifier>, f64), Error> { ... } }
Expand description

Infterface for all Optimizers

Required methods

Create the strategy

Main function to find a valid reconfiguration sequence (if it exists) and return it. The function also returns the cost of the sequence.

Returns the number of states explored by the strategy.

This method is only available if the "count-states" feature is enabled!

Provided methods

Wrapper, that creates the optimizer and synthesizes the network update order.

Implementors