Skip to content

Commit

Permalink
Add test for dualbound
Browse files Browse the repository at this point in the history
  • Loading branch information
mmghannam committed Oct 5, 2024
1 parent 3037400 commit 190394b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1809,4 +1809,13 @@ mod tests {
assert_eq!(second_solved.status(), Status::Optimal);
assert!((second_solved.obj_val() - expected_obj).abs() <= 1e-6);
}

#[test]
fn best_bound() {
let model= create_model();
let solved_model = model.solve();
let best_bound = solved_model.best_bound();
let obj_val = solved_model.obj_val();
assert!((best_bound- obj_val) < 1e-6);
}
}

0 comments on commit 190394b

Please sign in to comment.