diff --git a/Cargo.toml b/Cargo.toml index 6c326d7..876e9b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rpid" -version = "0.3.0" +version = "0.3.1" edition = "2024" rust-version = "1.85" description = "Rust Programmable Interface for Domain-Independent Dynamic Programming (RPID)" diff --git a/src/solvers/search_algorithms/cabs.rs b/src/solvers/search_algorithms/cabs.rs index b999cc8..d046a41 100644 --- a/src/solvers/search_algorithms/cabs.rs +++ b/src/solvers/search_algorithms/cabs.rs @@ -159,7 +159,9 @@ where let root_node = (self.root_node_constructor)(&mut self.dp, self.primal_bound); if root_node.is_none() { - self.solution.is_infeasible = true; + self.solution.is_optimal = self.solution.cost.is_some(); + self.solution.is_infeasible = self.solution.cost.is_none(); + self.solution.best_bound = self.solution.cost; self.is_terminated = true; return (self.stop_timer_and_return_solution(), true); @@ -210,6 +212,8 @@ where self.solution.cost = Some(cost); self.solution.transitions = solution.transitions; + self.dp.notify_primal_bound(cost); + if solution.is_optimal { self.solution.is_optimal = true; self.is_terminated = true;