> Does this concern any configuration besides LAMA or iterated search?
LAMA is a special case of iterated search. I assume it only concerns iterated
search. (Note that there's nothing special about LAMA -- it's a bog-standard
command-line alias for an iterated search configuration, no special handling in
the driver.)
> We could either pass "--internal-plan-counter 1" to the configurations in
> question,
That is not a solution. "--internal-plan-counter" is an internal (i.e., not
intended to be user-visible) option for use of the driver only, like all options
starting with "--internal". It's intended to be used only for communication of
the driver with the search component (mainly for portfolios).
Setting g_plan_counter to different values that must be interpreted differently
depending on the kind of search looks fragile to me. I think the semantics of
the variable wouldn't be very clear. (What would the intuitive meaning of a plan
counter of 0 vs. 1 be?) I'm also not sure if the suggested solution would
interact correctly if we combine portfolios and anytime configurations.
I think a better solution is to have it always reflect the number of previously
generated plans and rename it (along with the option) to make this clear:
"g_num_previously_generated_plans" and "--internal-previously-generated-plans"
or something shorter along those lines. The planner knows if it wants to
potentially generate multiple plans (whenever iterated search is used), so it
knows how to distinguish "sas_plan" from "sas_plan.1" in that case
automatically. For portfolio configurations, we must make sure that the planner
prefers "sas_plan.1" over "sas_plan" even for non-iterated configurations. One
way to do this is to have "--internal-previously-generated-plans" additionally
set a flag that shows we are in a portfolio. To make this clearer, the option
could be renamed to "--internal-previous-portfolio-plans".
Summary of suggestion:
- g_previously_generated_plans defaults to 0
- g_is_part_of_portfolio defaults to false
- Option "--internal-previous-portfolio-plans X" sets
g_previously_generated_plans to X and g_is_part_of_portfolio to true
- When a plan is generated, we increment "g_previously_generated_plans" and
append the counter to the plan name if we are in a portfolio or if we are
conducting an iterated search. We add an assertion that in other cases, the
counter must necessarily be 0 (or 1 if we test it after incrementing)
What do you think?
|