lbf/util/
assertions.rs

1use jagua_rs::probs::spp::entities::SPProblem;
2
3pub fn strip_width_is_in_check(prob: &SPProblem) -> bool {
4    let diameters_of_all_items = prob
5        .instance
6        .items
7        .iter()
8        .map(|(i, q)| i.shape_cd.diameter * *q as f32)
9        .sum::<f32>();
10
11    prob.strip_width() < 2.0 * (diameters_of_all_items)
12}