bdi4jade.plan

## Class OrPlanGoalDependency

- java.lang.Object
- - bdi4jade.plan.PlanGoalDependency
  - - bdi4jade.plan.OrPlanGoalDependency

-     public class OrPlanGoalDependency
      extends PlanGoalDependency

  This class represents an OR dependency between a plan and a set of goals. It means that this plan needs that one of these goals that it depends on must be achieved so that the plan can be completed. As solely one of the goals must be achieved, this class stores the probability of each particular goal to be achieved during the plan execution.
  Author:
    ingrid

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OrPlanGoalDependency(Plan root)`
    `OrPlanGoalDependency(Plan root, java.util.Map<Goal,java.lang.Double> goals)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addGoal(Goal goal, java.lang.Double probability)` Adds a goal to this dependency, indicating that the root plan depends on it, with a certain probability.
    `java.util.Map<Goal,java.lang.Double>` | `getGoals()` Returns the map of goals with their probabilities that the root plan depends on.
    `void` | `removeGoal(Goal goal)` Remove a goal from this dependency.

    - ### Methods inherited from class bdi4jade.plan.PlanGoalDependency

      `getRoot`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OrPlanGoalDependency

          public OrPlanGoalDependency(Plan root)

    - #### OrPlanGoalDependency

          public OrPlanGoalDependency(Plan root,
                              java.util.Map<Goal,java.lang.Double> goals)

  - ### Method Detail

    - #### addGoal

          public void addGoal(Goal goal,
                     java.lang.Double probability)

      Adds a goal to this dependency, indicating that the root plan depends on it, with a certain probability.
      Parameters:
        `goal` - a goal that the root plan depends on.
        `probability` - the probability of the goal

    - #### getGoals

          public java.util.Map<Goal,java.lang.Double> getGoals()

      Returns the map of goals with their probabilities that the root plan depends on.
      Returns:
        the goals the goal that the root plan depends on.

    - #### removeGoal

          public void removeGoal(Goal goal)

      Remove a goal from this dependency.
      Parameters:
        `goal` - the goal to be removed.