Class TransitionSystem

java.lang.Object
jason.asSemantics.TransitionSystem
All Implemented Interfaces:
java.io.Serializable

public class TransitionSystem
extends java.lang.Object
implements java.io.Serializable
See Also:
Serialized Form
  • Field Details

  • Constructor Details

  • Method Details

    • setLogger

      public void setLogger​(AgArch arch)
    • setLogger

      public void setLogger​(java.util.logging.Logger l)
    • addGoalListener

      public void addGoalListener​(GoalListener gl)
      adds an object that will be notified about events on goals (creation, suspension, ...)
    • hasGoalListener

      public boolean hasGoalListener()
    • getGoalListeners

      public java.util.List<GoalListener> getGoalListeners()
    • removeGoalListener

      public boolean removeGoalListener​(GoalListener gl)
    • applySemanticRuleSense

      private void applySemanticRuleSense() throws JasonException
      Throws:
      JasonException
    • applySemanticRuleDeliberate

      private void applySemanticRuleDeliberate() throws JasonException
      Throws:
      JasonException
    • applySemanticRuleAct

      private void applySemanticRuleAct() throws JasonException
      Throws:
      JasonException
    • applyProcMsg

      private void applyProcMsg() throws JasonException
      Throws:
      JasonException
    • resumeSyncAskIntention

      private void resumeSyncAskIntention​(java.lang.String msgId, Term answerVar, Term answerValue) throws JasonException
      Throws:
      JasonException
    • applySelEv

      private void applySelEv() throws JasonException
      Throws:
      JasonException
    • applyClrSatInt

      private void applyClrSatInt()
    • applyRelPl

      private void applyRelPl() throws JasonException
      Throws:
      JasonException
    • applyApplPl

      private void applyApplPl() throws JasonException
      Throws:
      JasonException
    • applyRelApplPlRule2

      private void applyRelApplPlRule2​(java.lang.String m) throws JasonException
      generates goal deletion event
      Throws:
      JasonException
    • applySelAppl

      private void applySelAppl() throws JasonException
      Throws:
      JasonException
    • applyFindOp

      private void applyFindOp() throws JasonException
      This step is new in Jason 1.1 and replaces the steps RelPl->ApplPl->SelAppl when the user does not customise selectOption. This version does not create the RP and AP lists and thus optimise the reasoning cycle. It searches for the first option and automatically selects it.
      Throws:
      JasonException
      Since:
      1.1
    • getOption

      private Option getOption​(Event evt, Plan pl, Unifier relUn)
    • applyAddIM

      private void applyAddIM() throws JasonException
      Throws:
      JasonException
    • applyProcAct

      private void applyProcAct() throws JasonException
      Throws:
      JasonException
    • applySelInt

      private void applySelInt() throws JasonException
      Throws:
      JasonException
    • applyExecInt

      private void applyExecInt() throws JasonException
      Throws:
      JasonException
    • prepareBodyForEvent

      private Literal prepareBodyForEvent​(Literal body, Unifier u, IntendedMeans imRenamedVars)
    • applyClrInt

      public void applyClrInt​(Intention i) throws JasonException
      Throws:
      JasonException
    • joinRenamedVarsIntoIntentionUnifier

      private void joinRenamedVarsIntoIntentionUnifier​(IntendedMeans im, Unifier values)
    • relevantPlans

      public java.util.List<Option> relevantPlans​(Trigger teP, Event evt) throws JasonException
      Throws:
      JasonException
    • applicablePlans

      public java.util.List<Option> applicablePlans​(java.util.List<Option> rp) throws JasonException
      Throws:
      JasonException
    • updateEvents

      public boolean updateEvents​(java.util.List<Literal>[] result, Intention focus)
    • updateEvents

      public void updateEvents​(Event e)
    • removeActionReQueue

      private void removeActionReQueue​(Intention i)
      remove the top action and requeue the current intention
    • generateGoalDeletion

      public boolean generateGoalDeletion​(Intention i, java.util.List<Term> failAnnots, Term reason) throws JasonException
      generate a failure event for an intention
      Throws:
      JasonException
    • generateGoalDeletionFromEvent

      private boolean generateGoalDeletionFromEvent​(java.util.List<Term> failAnnots, Term reason) throws JasonException
      Throws:
      JasonException
    • findEventForFailure

      public Event findEventForFailure​(Intention i, Trigger tevent)
    • setDefaultFailureAnnots

      private static void setDefaultFailureAnnots​(Event failEvent, Term body, java.util.List<Term> failAnnots)
      add default error annotations (error, error_msg, code, code_src, code_line) in the failure event
    • checkHardDeadline

      protected void checkHardDeadline​(Event evt)
    • canSleep

      public boolean canSleep()
    • canSleepSense

      public boolean canSleepSense()
    • canSleepDeliberate

      public boolean canSleepDeliberate()
    • canSleepAct

      public boolean canSleepAct()
    • runAtBeginOfNextCycle

      public void runAtBeginOfNextCycle​(RunnableSerializable r)
      Schedule a task to be executed in the begin of the next reasoning cycle. It is used mostly to change the C only by the TS thread (e.g. by .wait)
    • reasoningCycle

      public void reasoningCycle()
    • sense

      public void sense()
    • deliberate

      public void deliberate()
    • act

      public void act()
    • getAg

      public Agent getAg()
    • getC

      public Circumstance getC()
    • getSettings

      public Settings getSettings()
    • setAgArch

      public void setAgArch​(AgArch arch)
    • getAgArch

      public AgArch getAgArch()
    • getUserAgArch

      @Deprecated public AgArch getUserAgArch()
      Deprecated.
      use getAgArch
    • getLogger

      public java.util.logging.Logger getLogger()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object