AbstractAction

abstract class AbstractAction(val name: String, val description: String = name, val pre: List<String> = emptyList(), val post: List<String> = emptyList(), val cost: <Error class: unknown class> = 0.0, val value: <Error class: unknown class> = 0.0, val inputs: Set<IoBinding> = emptySet(), val outputs: Set<IoBinding> = emptySet(), val toolGroups: Set<ToolGroupRequirement>, val canRerun: Boolean, val qos: ActionQos = ActionQos()) : Action

Abstract action implementation that computes outputs.

Parameters

name

the name of the action

description

a description of the action

pre

a list of preconditions. These are additional to the input

post

a list of expected effects. These are additional to the output

cost

the cost of the action

inputs

the input bindings

outputs

the output bindings

canRerun

can we rerun this action?

qos

quality of service requirements

Inheritors

Constructors

Link copied to clipboard
constructor(name: String, description: String = name, pre: List<String> = emptyList(), post: List<String> = emptyList(), cost: <Error class: unknown class> = 0.0, value: <Error class: unknown class> = 0.0, inputs: Set<IoBinding> = emptySet(), outputs: Set<IoBinding> = emptySet(), toolGroups: Set<ToolGroupRequirement>, canRerun: Boolean, qos: ActionQos = ActionQos())

Properties

Link copied to clipboard
open override val canRerun: Boolean
Link copied to clipboard
open override val cost: <Error class: unknown class> = 0.0
Link copied to clipboard
Link copied to clipboard
open override val domainTypes: Collection<DomainType>

All known types referenced by this component. These may or may not be backed by JVM objects.

Link copied to clipboard
Link copied to clipboard
open override val effects: EffectSpec

Expected effects of this action. World state should be checked afterward as these effects may not have been achieved

Link copied to clipboard
open override val inputs: Set<IoBinding>
Link copied to clipboard
Link copied to clipboard
abstract val knownConditions: Set<String>

The names of all conditions that are referenced by this step

Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val outputs: Set<IoBinding>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val preconditions: EffectSpec

Conditions that must be true for this step to execute

Link copied to clipboard
open override val qos: ActionQos
Link copied to clipboard
open override val toolGroups: Set<ToolGroupRequirement>

Tool groups exposed. This will include directly registered tool groups and tool groups resolved from ToolGroups.

Link copied to clipboard
open override val value: <Error class: unknown class> = 0.0

Value of completing this step. From 0 (least valuable) to 1 (most valuable) Steps with 0 value will still be planned if necessary to achieve a result

Functions

Link copied to clipboard
abstract fun execute(processContext: ProcessContext): ActionStatus

Execute an action

Link copied to clipboard
open override fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard
open fun isAchievable(currentState: GoapWorldState): Boolean

Whether the step is available in the current world state

Link copied to clipboard
abstract fun referencedInputProperties(variable: String): Set<String>

Properties referenced from input variable Say "person" is passed. Return "name" and other references

Link copied to clipboard
open fun shortName(): String