Package moise.oe

Class GoalInstance

    • Method Detail

      • getSpec

        public Goal getSpec()
      • setArgumentValue

        public void setArgumentValue​(java.lang.String arg,
                                     java.lang.Object value)
                              throws MoiseException
        set an argument's value for this instance goal

        Example: InstanceGoal gA = sch.getGoal("a"); gA.setArgumentValue("Z", "120");

        Parameters:
        arg - the argument identification
        value - the value for this argument
        Throws:
        MoiseException - there is not such an arg id
      • getArgumentValue

        public java.lang.Object getArgumentValue​(java.lang.String arg)
      • getArgumentValues

        public java.util.Map<java.lang.String,​java.lang.Object> getArgumentValues()
        returns all this goal arguments (key=argId, value=Object)
      • setSuperAchieved

        private void setSuperAchieved()
      • setSuperImpossible

        private void setSuperImpossible()
      • committed

        public void committed​(OEAgent a)
        adds the agent a in the set of agents committed to this goal
      • uncommitted

        public void uncommitted​(OEAgent a)
        removes the agent a in the set of agents committed to this goal
      • isEnabled

        public boolean isEnabled()
        returns true if this goal is not satisfied yet, the scheme is well formed super goal is not satisfied, super goal is not impossible,
      • checkEnabled

        private boolean checkEnabled()
        the goal is enabled in the scheme state, i.e., its pre-condition goals are satisfied.
      • isSatisfied

        public boolean isSatisfied()
        a goal is achieved if enough committed agents have set it as satisfied
      • isImpossible

        public boolean isImpossible()
      • isCommitted

        public boolean isCommitted()
      • hasComittedAgents

        public boolean hasComittedAgents()
      • getCommittedAgents

        public java.util.Collection<OEAgent> getCommittedAgents()
      • getAchievedAgents

        public java.util.Collection<OEAgent> getAchievedAgents()
      • getXMLTag

        public static java.lang.String getXMLTag()
      • getAsDOM

        public org.w3c.dom.Element getAsDOM​(org.w3c.dom.Document document)
        Specified by:
        getAsDOM in interface ToXML
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class MoiseElement
      • getAsProlog

        public java.lang.String getAsProlog()
        Specified by:
        getAsProlog in interface ToProlog