concepts.dm.pdsketch.crow.crow_state.PartiallyOrderedPlan#

class PartiallyOrderedPlan[source]#

Bases: object

A partially ordered plan is a set of totally ordered plan sequences.

Methods

add_chain(chain[, return_all_skeletons_flags])

Add a new chain to the plan; return a new plan.

exclude(chain_index, item_index)

Exclude the given item from the given chain; return a new plan.

from_single_goal(goal[, ...])

Create a plan from a single goal.

gen_string()

iter_feasible_chains()

iter_goals()

set_infeasible_index(chain_index)

Attributes

nr_chains

total_length

chains

The totally ordered plan sequences.

infeasible_index

One can optionally mark one of the chain as infeasible to be the last chain.

__init__(chains)[source]#

Initialize the partially ordered plan.

Parameters:

chains (Sequence[TotallyOrderedPlan]) – a collection of the totally ordered plan sequences.

__len__()[source]#
__new__(**kwargs)#
add_chain(chain, return_all_skeletons_flags=False)[source]#

Add a new chain to the plan; return a new plan.

Parameters:
Return type:

PartiallyOrderedPlan

exclude(chain_index, item_index)[source]#

Exclude the given item from the given chain; return a new plan.

Parameters:
  • chain_index (int)

  • item_index (int)

Return type:

PartiallyOrderedPlan

classmethod from_single_goal(goal, return_all_skeletons_flag=False)[source]#

Create a plan from a single goal.

Parameters:
Return type:

PartiallyOrderedPlan

gen_string()[source]#
iter_feasible_chains()[source]#
Return type:

Iterator[Tuple[int, TotallyOrderedPlan]]

iter_goals()[source]#
Return type:

Iterator[ValueOutputExpression]

set_infeasible_index(chain_index)[source]#
Parameters:

chain_index (int)

chains: Tuple[TotallyOrderedPlan, ...]#

The totally ordered plan sequences.

infeasible_index: int | None#

One can optionally mark one of the chain as infeasible to be the last chain. Currently this flag is not used.

property nr_chains#
property total_length#