Function snowcap::synthesize[][src]

pub fn synthesize(
    net: Network,
    config_a: Config,
    config_b: Config,
    hard_policy: HardPolicy,
    time_limit: Option<Duration>
) -> Result<Vec<ConfigModifier>, Error>
Expand description

Synthesize Configuration Updates

This is the main function to interact with the system. It uses the StrategyTRTA.

Usage

use snowcap::hard_policies::*;
use snowcap::synthesize;
use snowcap::Error;
use snowcap::netsim::Network;
use snowcap::netsim::config::Config;

fn main() -> Result<(), Error> {
    // prepare the network
    // let net = ...
    // let initial_config = ...
    // let final_config = ...

    // prepare the policies
    // let hard_policy = ...

    // synthesize the reconfiguration
    let sequence = synthesize(net, initial_config, final_config, hard_policy, None)?;

    Ok(())
}