Skip to content

Commit

Permalink
Enhanced error message handling for single plan symbolic search confi…
Browse files Browse the repository at this point in the history
…guration when multiple plans are requested. Additionally, corrected a typo in the README.
  • Loading branch information
speckdavid committed Jun 18, 2024
1 parent dd1706c commit 12c0cb3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Note, that you can also search for the best **k** plans using your selector.
By default, the planner performs a relevance analysis and removes components such as variables and actions that are irrelevant to achieving the goal. Although such variables and actions can in principle lead to further (simple) plans, they are classified as irrelevant and removed when translating PDDL to SAS+. Note that this can have a negative impact on the performance of the planner. If you wish to **obtain all plans** (even the non-relevant ones), please use the following options:

```console
./fast-downward.py --translate --search domain.pddl problem.pddl --translate-options --keep-unimportant-variables --search-options --search "symk_bd(plan_selection=top_k(num_plans=**k**))
./fast-downward.py --translate --search domain.pddl problem.pddl --translate-options --keep-unimportant-variables --search-options --search "symk_bd(plan_selection=top_k(num_plans=**k**))"
```

# References
Expand Down
16 changes: 16 additions & 0 deletions src/search/symbolic/search_engines/symbolic_uniform_cost_search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ using namespace std;

namespace symbolic {
void SymbolicUniformCostSearch::initialize() {
if (plan_data_base->get_num_desired_plans() > 1) {
cerr << "*****************************************************************************"
<< "******************************************************************************"
<< endl;
cerr << "*** Error: The symbolic search configuration for finding a single plan (e.g., sym_[fw|bw|bd]) is selected,"
<< " but multiple plans (" << plan_data_base->get_num_desired_plans() << ") have been requested. ***"
<< endl;
cerr << "*** Please use symk_[fw|bw|bd] or symq_[fw|bw|bd] (note the additional 'k' or 'q') for multiple plans."
<< " ***"
<< endl;
cerr << "*****************************************************************************"
<< "******************************************************************************"
<< endl << endl;
utils::exit_with(utils::ExitCode::SEARCH_INPUT_ERROR);
}

SymbolicSearch::initialize();
mgr = make_shared<SymStateSpaceManager>(vars.get(), sym_params, search_task);

Expand Down

0 comments on commit 12c0cb3

Please sign in to comment.