Class ActionConstraints

java.lang.Object
edu.tufts.hrilab.action.ActionConstraints

public class ActionConstraints extends Object
  • Field Details

    • log

      protected static final org.slf4j.Logger log
  • Constructor Details

    • ActionConstraints

      public ActionConstraints()
  • Method Details

    • addForbiddenAction

      public void addForbiddenAction(String type)
    • addAllowedAction

      public void addAllowedAction(String type)
    • addForbiddenState

      public void addForbiddenState(Predicate p)
    • filterByConstraints

      public Set<ActionDBEntry> filterByConstraints(Set<ActionDBEntry> entries)
    • verifyConstraints

      public Justification verifyConstraints(Predicate goal, StateMachine sm)
      Verifies whether a goal does not violate the constraints.
      Parameters:
      goal - goal predicate
      sm - state machine
      Returns:
      True if constraints are met
    • verifyConstraints

      public Justification verifyConstraints(ParameterizedAction action, StateMachine sm)
      Verifies whether an action selection meets all the the constraints.
      Parameters:
      action - action selection to be checked
      sm - state machine
      Returns:
      True if constraints are met
    • verifyConstraints

      public Justification verifyConstraints(ActionDBEntry action, List<Effect> effects, StateMachine sm)
      Verifies whether an action meets all the the constraints.
      Parameters:
      action - action
      effects - effects of action
      sm - state machine
      Returns:
      True if constraints are met
    • getAllowedActors

      public List<String> getAllowedActors()
    • addAllowedActor

      public void addAllowedActor(String actor)
    • removeAllowedActor

      public void removeAllowedActor(String actor)
    • getForbiddenActors

      public List<String> getForbiddenActors()