CASP Solutions for Planning in Hybrid Domains

Marcello Balduccini, Daniele Magazzeni, Marco Maratea, Emily Leblanc

TL;DR

This paper introduces a novel framework for solving hybrid planning problems—those involving both discrete actions and continuous physical changes—by translating them into Constraint Answer Set Programming (CASP). By leveraging the declarative power of logic programming alongside specialized numerical constraint solvers, the authors demonstrate significant performance gains over state-of-the-art hybrid planners, particularly in complex non-linear domains.

The Challenge of Hybrid Domains

In automated planning, "hybrid domains" represent the frontier where logic meets physics. A typical example is a robot managing a power plant: it must make discrete decisions (flipping a switch) while accounting for continuous variables (steam pressure rising over time).

A hybrid automaton representing a thermostat system, illustrating the interplay between discrete states and continuous dynamics.

The standard language for these problems is PDDL+, which models discrete actions, continuous "processes" (like a tank filling), and "events" (exogenous changes that trigger automatically when a condition is met). However, PDDL+ is notoriously difficult to solve. Existing planners often struggle with non-linear dynamics, such as air drag or fluid flow, and the strict "must" semantics of events. The authors aim to bridge this gap by using CASP, which combines the high-level reasoning of Answer Set Programming (ASP) with the low-level mathematical rigor of Constraint Satisfaction Problem (CSP) solvers.

The EZCSP Architecture

The authors propose a discretize-and-validate architecture centered around the ezcsp solver. This approach moves away from trying to solve logic and mathematics simultaneously, instead opting for a modular, iterative process.

The systematic architecture of the EZCSP solver, showing the translation and validation loop.

The methodology consists of three main pillars:

  1. Systematic Encoding: A formal method translates PDDL+ constructs into CASP rules. Durative actions are mapped into start/end events, and continuous change is represented as numerical constraints over time intervals.
  2. The Solving Loop: A CASP solver finds a candidate plan based on a discretized timeline. This plan is passed to VAL, a standard plan validator, which checks if the continuous trajectories are valid. If VAL finds a violation (e.g., an invariant broken between steps), it provides feedback to the solver to refine the search.
  3. Modular Backends: Because CASP is modular, numerical solvers can be swapped. The authors tested various backends via the GAMS modeling system, including knitro for non-linear problems and lindo for linear ones.

Evaluation and Benchmarks

The approach was evaluated on two well-known hybrid planning benchmarks featuring both linear and non-linear variants:

  • The Generator Domain: A classic problem where a generator must run for a fixed duration, requiring refueling from tanks without overflowing or running dry. The non-linear version uses Torricelli’s law for fuel flow.
  • The Car Domain: A vehicle must reach a target distance and stop. The non-linear version incorporates a quadratic drag factor ($0.1 \cdot v^2$).

The authors compared their CASP-based solution against state-of-the-art planners like dReal (an SMT-based solver) and UPMurphi.

Key Results and Insights

  • Scalability and Efficiency: In the non-linear Car domain, ezcsp solved all instances in less than 1 second. In contrast, dReal took over 58 seconds for the simplest instance and failed to solve larger ones. On the non-linear Generator domain, the CASP solution outperformed UPMurphi by nearly two orders of magnitude.
  • The Power of "Lazy" Integration: The "lazy" approach of ezcsp (finding a logical model first, then checking math) proved highly effective. This was bolstered by an "Estimator" encoding that allows the ASP solver to prune the search space by making rough numerical estimates before calling the constraint solver.
  • Handling Non-Linearity: One of the most significant findings was how well CASP handled non-linear dynamics. While specialized planners struggled, the CASP approach remained robust, solving complex physics problems in sub-second times.
  • Solver Versatility: Experiments showed that while solvers like clingcon are fast for linear problems, they lack the non-linear support required for complex physics, making ezcsp the more robust choice for general hybrid planning.

Future Directions

While the results are promising, the authors identify several areas for improvement. Currently, the PDDL+ to CASP translation is performed manually; automating this process is a critical next step for broader adoption. Additionally, the process of selecting the "right" time points for discretization could be further optimized to reduce iterations. Finally, the development of more sophisticated, domain-independent heuristics within the CASP framework could further boost performance on large-scale industrial problems.

Summary updated

BibTeX
@article{balduccini2017casp,
  author = {Marcello Balduccini and Daniele Magazzeni and Marco Maratea and Emily Leblanc},
  title = {{CASP Solutions for Planning in Hybrid Domains}},
  journal = {Theory Pract. Log. Program.},
  year = {2017},
  doi = {10.1017/s1471068417000187},
}
Figure