Skip to content

Commit

Permalink
chore: Make sure forward searcher instantiates all variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
arbimo committed Dec 5, 2023
1 parent 900194a commit 37f080f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions planning/planners/src/search/forward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,21 @@ impl SearchControl<VarLabel> for ForwardSearcher {
})
.next()
});
let res = res.or_else(|| {
model
.state
.variables()
.filter(|&v| model.state.present(v) == Some(true))
.filter_map(|v| {
let (lb, ub) = model.state.bounds(v);
if lb < ub {
Some(v.leq(lb))
} else {
None
}
})
.next()
});

res.map(|l| {
// println!(" --> {:?} \t {:?}", model.get_label(l.variable()), l);
Expand Down

0 comments on commit 37f080f

Please sign in to comment.