Skip to content

Commit

Permalink
added loopless parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
speckdavid committed May 21, 2024
1 parent 73170b4 commit a389a02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def run(self):

setup(
name="up_symk",
version="1.3.0",
version="1.3.1",
description="Unified Planning Integration of the SymK planner",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
6 changes: 4 additions & 2 deletions up_symk/symk.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def __init__(
symk_preprocess_options: Optional[List[str]] = None,
symk_search_time_limit: Optional[str] = None,
number_of_plans: Optional[int] = 1,
loopless: Optional[bool] = False,
plan_cost_bound: Optional[int] = None,
log_level: str = "info",
):
Expand All @@ -55,7 +56,7 @@ def __init__(
symk_search_config = f"sym-bd(bound={input_plan_cost_bound})"

if symk_anytime_search_config is None:
symk_anytime_search_config = f"symq-bd(plan_selection=top_k(num_plans={input_number_of_plans},dump_plans=true),bound={input_plan_cost_bound},quality=1.0)"
symk_anytime_search_config = f"symq-bd(simple={loopless},plan_selection=top_k(num_plans={input_number_of_plans},dump_plans=true),bound={input_plan_cost_bound},quality=1.0)"

SymKMixin.__init__(
self,
Expand Down Expand Up @@ -267,14 +268,15 @@ def __init__(
symk_preprocess_options: Optional[List[str]] = None,
symk_search_time_limit: Optional[str] = None,
number_of_plans: Optional[int] = 1,
loopless: Optional[bool] = False,
plan_cost_bound: Optional[int] = None,
log_level: str = "info",
):
input_number_of_plans = format_input_value(number_of_plans, min_value=1)
input_plan_cost_bound = format_input_value(plan_cost_bound, min_value=0)

if symk_anytime_search_config is None:
symk_anytime_search_config = f"symk-bd(plan_selection=top_k(num_plans={input_number_of_plans},dump_plans=true),bound={input_plan_cost_bound})"
symk_anytime_search_config = f"symk-bd(simple={loopless},plan_selection=top_k(num_plans={input_number_of_plans},dump_plans=true),bound={input_plan_cost_bound})"

super().__init__(
symk_search_config=symk_search_config,
Expand Down

0 comments on commit a389a02

Please sign in to comment.