pandaPIengine
pandaPIengine copied to clipboard
Set exit status based on success/failure?
For integrating pandaPIengine
into pipelines, scripts, etc. it would be helpful if it was easy to tell whether it had succeeded in finding a plan or not.
For this, it would help if the exit status was set to 2 (or some other designated value) on search failure. Looking at the code, it seems like an exit status of 1 is reserved for an error condition.
I have had a start at trying to make a MR for this. It seems to be straightforward for translation mode, and mostly straightforward for the heuristic search mode, but for the SAT planner option, I can't figure out all of the ways that solve_with_sat_planner
and its subsidiary function solve_with_sat_planner_linear_bound_increase
can exit (the while(true)
loop in the latter I can't figure out -- how does it exit on failure here?)
Any suggestions?