and over for getting precise confidence interval
Should agents be passed as a graph? Should agents be in charge of which tickets they receive?
Change the API so that agent names are statically determined?
What’s the best practice in Rust? Do people have debug! stmts in libs?
/// An ObjectiveFunction is used in simulated annealing and it is the function
/// that we try to maximize when running many simulations.
///
/// For more information on simulated annealing and objective functions, you can refer to the following resources:
/// - Simulated annealing: https://en.wikipedia.org/wiki/Simulated_annealing
/// - Objective function: https://en.wikipedia.org/wiki/Objective_function
///
/// Here is an example usage, in this case findinng the fastest simulation without wasting
/// cycles on too fast of a consuming agent:
/// ```
/// let objective_fn: ObjectiveFunction = |s: &Simulation| {
/// -(s.time as i64)
/// + s.agents
/// .iter()
/// .find(|a| a.name == "consumer")
/// .as_ref()
/// .unwrap()
/// .common_traits
/// .as_ref()
/// .unwrap()
/// .period
/// .unwrap() as i64
/// }
/// ```
pub type ObjectiveFunction = impl Fn(&Simulation) -> i64;
ProducedMessage to dodge the unwraps and solve w/ type system
Default doesn’t make sense for message in its current form. e.g. String source, String destination, u64 queued_time have no reasonable default value. Data structure needs to improve.