Package ora4mas.nopl.oe
Class Scheme
- java.lang.Object
-
- ora4mas.nopl.oe.CollectiveOE
-
- ora4mas.nopl.oe.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 Summary
Fields Modifier and Type Field Description static jason.asSyntax.PredicateIndicator
committedPI
private java.util.concurrent.ConcurrentSkipListSet<jason.asSyntax.Literal>
doneGoals
static jason.asSyntax.PredicateIndicator
donePI
static jason.asSyntax.Literal[]
dynamicFacts
static jason.asSyntax.PredicateIndicator
exCommittedPI
private java.util.HashMap<Pair<java.lang.String,java.lang.String>,java.lang.Object>
goalArgs
private java.util.concurrent.ConcurrentSkipListSet<Group>
groups
private java.util.Set<java.lang.String>
satisfiedGoals
static jason.asSyntax.PredicateIndicator
satisfiedPI
static jason.asSyntax.PredicateIndicator
schemePI
private Scheme
spec
-
Fields inherited from class ora4mas.nopl.oe.CollectiveOE
exPlayers, exPlayersAsLiteralList, id, players, playersAsLiteralList, termId
-
-
Method Summary
Modifier and Type Method Description void
addDoneGoal(java.lang.String ag, java.lang.String goal)
void
addGroupResponsibleFor(Group g)
Scheme
clone()
boolean
computeSatisfiedGoals()
discover goals that are now satisfied, returns true if some new goal was satisfiedjava.util.Iterator<jason.asSemantics.Unifier>
consult(jason.asSyntax.Literal l, jason.asSemantics.Unifier u)
jason.asSyntax.ListTerm
getCommittedAgents(Goal g)
returns a list of agents committed to a particular goaljava.util.Set<jason.asSyntax.Literal>
getDoneGoals()
jason.asSyntax.Literal[]
getDynamicFacts()
(package private) jason.asSyntax.PredicateIndicator
getExPlayerPI()
java.lang.Object
getGoalArgValue(java.lang.String goal, java.lang.String arg)
java.util.Map<Pair<java.lang.String,java.lang.String>,java.lang.Object>
getGoalsArgs()
java.util.Collection<Group>
getGroupsResponsibleFor()
java.util.Collection<java.lang.String>
getIdsGroupsResponsibleFor()
(package private) jason.asSyntax.PredicateIndicator
getPlayerPI()
jaca.ToProlog
getResponsibleGroupsAsProlog()
Scheme
getSpec()
boolean
isSatisfied(Goal g)
boolean
removeDoneGoal(Goal goal)
void
removeGroupResponsibleFor(Group g)
void
removeSatisfied(java.lang.String g)
boolean
resetGoal(Goal goal)
protected boolean
resetGoalAndPreConditions(Goal goal)
void
setAsSatisfied(java.lang.String g)
void
setGoalArgValue(java.lang.String goal, java.lang.String arg, java.lang.Object value)
java.lang.String
toString()
-
Methods inherited from class ora4mas.nopl.oe.CollectiveOE
addPlayer, clearExPlayers, clearPlayers, compareTo, equals, getCollectionAsProlog, getExPlayers, getId, getPlayers, hashCode, hasPlayer, isRelevant, removePlayer, transform
-
-
-
-
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
-
spec
private Scheme spec
-
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()
-
getPlayerPI
jason.asSyntax.PredicateIndicator getPlayerPI()
- Specified by:
getPlayerPI
in classCollectiveOE
-
getExPlayerPI
jason.asSyntax.PredicateIndicator getExPlayerPI()
- Specified by:
getExPlayerPI
in classCollectiveOE
-
getDynamicFacts
public jason.asSyntax.Literal[] getDynamicFacts()
- Specified by:
getDynamicFacts
in classCollectiveOE
-
consult
public java.util.Iterator<jason.asSemantics.Unifier> consult(jason.asSyntax.Literal l, jason.asSemantics.Unifier u)
- Specified by:
consult
in interfacenpl.DynamicFactsProvider
- Overrides:
consult
in classCollectiveOE
-
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)
-
clone
public Scheme clone()
- Specified by:
clone
in classCollectiveOE
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCollectiveOE
-
-