Skip to content

Commit

Permalink
perf(planning): Avoid unecessary bound-checking conditions on unbound…
Browse files Browse the repository at this point in the history
…ed state variables.
  • Loading branch information
arbimo committed Dec 17, 2024
1 parent dcc73e8 commit a273208
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions planning/planners/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,10 @@ pub fn encode(pb: &FiniteProblem, metric: Option<Metric>) -> std::result::Result
let Type::Int { lb, ub } = inc.state_var.fluent.return_type() else {
unreachable!()
};

if lb == INT_CST_MIN && ub == INT_CST_MAX {
continue;
}
let var = solver
.model
.new_ivar(lb, ub, Container::Instance(inc_id.instance_id) / VarType::Reification);
Expand Down

0 comments on commit a273208

Please sign in to comment.