Class PrimitiveGoalStructure<TBeliefSet>
- Namespace
- Aplib.Core.Desire.GoalStructures
- Assembly
- Aplib.Core.dll
Represents a goal structure that will complete if any of its children complete.
public class PrimitiveGoalStructure<TBeliefSet> : GoalStructure<TBeliefSet>, IGoalStructure<TBeliefSet>, ICompletable, ILoggable, IDocumented where TBeliefSet : IBeliefSet
Type Parameters
TBeliefSet
The beliefset of the agent.
- Inheritance
-
GoalStructure<TBeliefSet>PrimitiveGoalStructure<TBeliefSet>
- Implements
-
IGoalStructure<TBeliefSet>
- Inherited Members
- Extension Methods
Remarks
This is the most primitive goal structure. It is used to represent a single goal that is not part of a larger structure. This goal structure will only return the goal it was created with if the goal is not yet finished.
Constructors
PrimitiveGoalStructure(IGoal<TBeliefSet>)
Initializes a new instance of the PrimitiveGoalStructure<TBeliefSet> class.
public PrimitiveGoalStructure(IGoal<TBeliefSet> goal)
Parameters
goal
IGoal<TBeliefSet>The goal to fulfill.
PrimitiveGoalStructure(IMetadata, IGoal<TBeliefSet>)
Initializes a new instance of the PrimitiveGoalStructure<TBeliefSet> class.
public PrimitiveGoalStructure(IMetadata metadata, IGoal<TBeliefSet> goal)
Parameters
metadata
IMetadataMetadata about this GoalStructure, used to quickly display the goal in several contexts.
goal
IGoal<TBeliefSet>The goal to fulfill.
Methods
GetCurrentGoal(TBeliefSet)
Gets the current goal using the given IBeliefSet.
public override IGoal<TBeliefSet> GetCurrentGoal(TBeliefSet beliefSet)
Parameters
beliefSet
TBeliefSetThe belief set of the agent.
Returns
- IGoal<TBeliefSet>
The current goal to be fulfilled.
GetLogChildren()
Gets the children of the loggable object.
public override IEnumerable<ILoggable> GetLogChildren()
Returns
- IEnumerable<ILoggable>
The children of the loggable object.
UpdateStatus(TBeliefSet)
Updates the status of the FirstOfGoalStructure<TBeliefSet>. The goal structure status is set to the status of the underlying IGoal<TBeliefSet>.
public override void UpdateStatus(TBeliefSet beliefSet)
Parameters
beliefSet
TBeliefSetThe belief set of the agent.