macro_rules! explore_sequential {
    ($nstep: expr, $rep_conf:expr, $state:ty,
        input {$($input:ident: $input_ty: ty )*},
        output [$($output:ident: $output_ty: ty )*],
        $mode: expr,
         ) => { ... };
    ($nstep: expr, $rep_conf:expr, $state:expr, input {$($input:ident: $input_ty: ty )*}, $mode:expr) => { ... };
}
Expand description

Macro to to perform sequential model exploration using basic parameters sweeping

Arguments

  • step - simulation step number,
  • repconf - number of repetitions
  • state - state of the simulation
  • input {name: type} - input parameters of simulation
  • output [name: type] - output parameters of simulation
  • mode - enum to choose which mode of execution is desired (Supported option: Exhaustive, Matched)

Example

let param1 = gen_param!(u32, 0, 10, 5);
let param2 = gen_param!(f64, 0, 10, 5);

// implement trait State
struct State {  
  param: u32,
  param2: f64,
  result: f64,
}

// input and input_vec are input of State constructor
// outputs are fields of State to get results
explore_sequrntial!(
    STEP,
    rep_conf, // How many times run a configuration
    State,
    input {
       param: u32,
       param2: f64,
    },
    output [
      result: f64,
    ],
    ExploreMode::Matched,
);