concepts.pdsketch.operator.Operator#

class Operator[source]#

Bases: OperatorBase

The operator definition in a planning domain.

Methods

pddl_str()

Return the PDDL representation of the operator.

rename(new_name[, is_primitive])

Rename the operator.

Attributes

is_axiom

Whether this operator is an axiom.

is_macro

Whether the operator is a macro operator.

is_primitive

Whether this operator is a primitive operator (instead of a macro operator or a sub operator in a macro).

nr_arguments

The number of arguments of the operator.

name

The name of the operator.

arguments

The list of arguments of the operator.

preconditions

The list of preconditions of the operator.

effects

The list of effects of the operator.

controller

The controller function of the operator.

is_template

Whether this operator is a template.

extends

The name of the operator that this operator extends.

__call__(*args)[source]#

Ground the operator with a list of arguments.

Return type:

OperatorApplier

__init__(name, arguments, preconditions, effects, controller=None, is_primitive=True, is_axiom=False, is_template=False, extends=None)[source]#
Parameters:
__new__(**kwargs)#
pddl_str()[source]#

Return the PDDL representation of the operator.

Return type:

str

rename(new_name, is_primitive=None)[source]#

Rename the operator.

Parameters:
  • new_name (str) –

  • is_primitive (bool | None) –

Return type:

Operator

arguments: Tuple[Variable]#

The list of arguments of the operator.

controller: OperatorController | None#

The controller function of the operator.

effects: Tuple[Effect]#

The list of effects of the operator.

extends: str | None#

The name of the operator that this operator extends.

property is_axiom: bool#

Whether this operator is an axiom.

property is_macro#

Whether the operator is a macro operator.

property is_primitive: bool#

Whether this operator is a primitive operator (instead of a macro operator or a sub operator in a macro).

is_template: bool#

Whether this operator is a template.

name: str#

The name of the operator.

property nr_arguments: int#

The number of arguments of the operator.

preconditions: Tuple[Precondition]#

The list of preconditions of the operator.