Class Scheme

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CollectiveOE>, npl.DynamicFactsProvider

    public class Scheme
    extends CollectiveOE
    Represents an instance of scheme
    Author:
    Jomi Fred Hubner
    See Also:
    Serialized Form
    • Field Detail

      • dynamicFacts

        public static final jason.asSyntax.Literal[] dynamicFacts
      • schemePI

        public static final jason.asSyntax.PredicateIndicator schemePI
      • committedPI

        public static final jason.asSyntax.PredicateIndicator committedPI
      • exCommittedPI

        public static final jason.asSyntax.PredicateIndicator exCommittedPI
      • donePI

        public static final jason.asSyntax.PredicateIndicator donePI
      • satisfiedPI

        public static final jason.asSyntax.PredicateIndicator satisfiedPI
      • groups

        private java.util.concurrent.ConcurrentSkipListSet<Group> groups
      • doneGoals

        private java.util.concurrent.ConcurrentSkipListSet<jason.asSyntax.Literal> doneGoals
      • goalArgs

        private java.util.HashMap<Pair<java.lang.String,​java.lang.String>,​java.lang.Object> goalArgs
      • satisfiedGoals

        private java.util.Set<java.lang.String> satisfiedGoals
    • Constructor Detail

      • Scheme

        public Scheme​(Scheme spec,
                      java.lang.String id)
    • Method Detail

      • getSpec

        public Scheme getSpec()
      • addDoneGoal

        public void addDoneGoal​(java.lang.String ag,
                                java.lang.String goal)
      • removeDoneGoal

        public boolean removeDoneGoal​(Goal goal)
      • getDoneGoals

        public java.util.Set<jason.asSyntax.Literal> getDoneGoals()
      • resetGoal

        public boolean resetGoal​(Goal goal)
      • resetGoalAndPreConditions

        protected boolean resetGoalAndPreConditions​(Goal goal)
      • setGoalArgValue

        public void setGoalArgValue​(java.lang.String goal,
                                    java.lang.String arg,
                                    java.lang.Object value)
      • getGoalArgValue

        public java.lang.Object getGoalArgValue​(java.lang.String goal,
                                                java.lang.String arg)
      • getGoalsArgs

        public java.util.Map<Pair<java.lang.String,​java.lang.String>,​java.lang.Object> getGoalsArgs()
      • addGroupResponsibleFor

        public void addGroupResponsibleFor​(Group g)
      • removeGroupResponsibleFor

        public void removeGroupResponsibleFor​(Group g)
      • getGroupsResponsibleFor

        public java.util.Collection<Group> getGroupsResponsibleFor()
      • getIdsGroupsResponsibleFor

        public java.util.Collection<java.lang.String> getIdsGroupsResponsibleFor()
      • consult

        public java.util.Iterator<jason.asSemantics.Unifier> consult​(jason.asSyntax.Literal l,
                                                                     jason.asSemantics.Unifier u)
        Specified by:
        consult in interface npl.DynamicFactsProvider
        Overrides:
        consult in class CollectiveOE
      • getResponsibleGroupsAsProlog

        public jaca.ToProlog getResponsibleGroupsAsProlog()
      • getCommittedAgents

        public jason.asSyntax.ListTerm getCommittedAgents​(Goal g)
        returns a list of agents committed to a particular goal
      • computeSatisfiedGoals

        public boolean computeSatisfiedGoals()
        discover goals that are now satisfied, returns true if some new goal was satisfied
      • setAsSatisfied

        public void setAsSatisfied​(java.lang.String g)
      • removeSatisfied

        public void removeSatisfied​(java.lang.String g)
      • isSatisfied

        public boolean isSatisfied​(Goal g)