Package ora4mas.simple
Class SimpleSchemeBoard
java.lang.Object
cartago.Artifact
ora4mas.nopl.OrgArt
ora4mas.nopl.SchemeBoard
ora4mas.simple.SimpleSchemeBoard
- All Implemented Interfaces:
ToXML,npl.DynamicFactsProvider
public class SimpleSchemeBoard extends SchemeBoard
Artifact to manage a scheme instance.
Operations (see details in the methods list below):
Operations (see details in the methods list below):
- commitMission
- leaveMission
- goalAchieved
- setArgumentValue
- resetGoal
- destroy
- commitment(ag,mission,sch): agent ag is committed to the mission in the scheme (we have as many obs prop as commitments).
e.g.
commitment(bob,mission1,s1) - groups: a list of groups responsible for the scheme.
e.g.
groups([g1]) - goalState(schId, goal, list of committed agents, list of agents that performed the goal, state); where states are: waiting, enabled, satisfied).
e.g.
goalState(s1,g5,[alice,bob],[alice],satisfied) - specification: the specification of the scheme in the OS (a prolog like representation).
- obligation(ag,reason,goal,deadline): current active obligations.
e.g.
obligation(bob,ngoal(s1,mission1,g5),done(s1,bid,bob),1475417322254) - permission(ag,reason,goal,deadline): current active permission.
- goalArgument(schemeId, goalId, argId, value): value of goals' arguments, defined by the operation setArgumentValue
e.g.
goalArgument(sch1, winner, "W", "Bob")
- oblCreated(o): the obligation o is created.
- oblFulfilled(o): the obligation o is fulfilled
- oblUnfulfilled(o): the obligation o is unfulfilled (e.g. by timeout).
- oblInactive(o): the obligation o is inactive (e.g. its maintenance condition does not hold anymore).
e.g.
o = obligation(Ag,_,done(Sch,bid,Ag), TTF)if thebidis a performance goal ando = obligation(Ag,_,satisfied(Sch,bid), TTF)if thebidis an achievement goal. - normFailure(f): the failure f has happened (e.g. due some regimentation).
e.g.
f = fail(mission_permission(Ag,M,Sch)). The f comes from the normative program.
- Author:
- Jomi
- See Also:
Scheme
-
Nested Class Summary
Nested classes/interfaces inherited from class cartago.Artifact
cartago.Artifact.AbstractAsyncProcess -
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringALL_GOALSprotected java.util.logging.Loggerloggerprotected java.lang.StringSCHEME_NAMEFields inherited from class ora4mas.nopl.SchemeBoard
aEnabled, aSatisfied, aWaiting, obsPropCommitment, obsPropGroups, obsPropSpec, piGoalState, schBoards, specFields inherited from class ora4mas.nopl.OrgArt
dfpListeners, gui, myNPLListener, nengine, normativeEvtListeners, oeId, orgBoardName, orgState, ownerAgent, running, runningDestroy, sglDestroyed, sglNormFailure, sglOblCreated, sglOblFulfilled, sglOblInactive, sglOblUnfulfilled, sglSanction, updateGUIThreadFields inherited from class cartago.Artifact
observabilityRadius, position, thisOpId -
Constructor Summary
Constructors Constructor Description SimpleSchemeBoard() -
Method Summary
Modifier and Type Method Description voidaddGoal(java.lang.String goalId, java.lang.String deps)protected booleanaddMissionsInDot()voidcommitGoal(java.lang.String goalMission)(package private) GoalgetOrCreateGoal(java.lang.String goalId, boolean addMission)voidinit()Initialises the scheme artifactMethods inherited from class ora4mas.nopl.SchemeBoard
addMission, admCommand, agKilled, commitMission, commitMission, debug, destroy, enableSatisfied, getAsDOM, getAsDot, getLogger, getNPLSrc, getSchemeBoards, getSchState, getSpec, getState, getStyleSheetName, goalAchieved, goalDone, init, interactionCommand, isObsPropEqualsGoal, isWellFormed, leaveMission, mergeState, reorganise, resetGoal, setArgumentValue, setCardinality, updateGoalArgsObsProp, updateGoalStateObsProp, updateRolePlayersMethods inherited from class ora4mas.nopl.OrgArt
consult, debug, fixAgName, fixOSFile, getArtId, getDebugText, getNormativeEngine, getNSTransformer, getOEId, getOpUserName, getParser, getStyleSheet, initNormativeEngine, initWspRuleEngine, installNormativeSignaler, isRelevant, isUserAllowed, ora4masOperationTemplate, postReorgUpdates, setOrgBoardName, setOwner, specToStr, updateGuiOEMethods inherited from class cartago.Artifact
await, await, await_time, beginExtSession, commit, defineNewOp, defineObsProperty, defineOp, delay, dispose, dispose, endExtSession, endExtSessionWithFailure, execInternalOp, execLinkedOp, execLinkedOp, failed, failed, getCreatorId, getCurrentOpAgentBody, getCurrentOpAgentId, getId, getLinkedArtifacts, getManualSrcFile, getObservabilityRadius, getObsProperty, getObsPropertyByTemplate, getOpKey, getPosition, hasObsProperty, hasObsPropertyByTemplate, isLinked, log, lookupArtifact, makeArtifact, removeObsProperty, removeObsPropertyByTemplate, removeOp, setupOperations, setupPosition, signal, signal, updateObservabilityRadius, updateObsProperty, updatePositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface npl.DynamicFactsProvider
consultFromCollection, consultFromProviders
-
Field Details
-
logger
protected java.util.logging.Logger logger -
ALL_GOALS
protected java.lang.String ALL_GOALS -
SCHEME_NAME
protected java.lang.String SCHEME_NAME
-
-
Constructor Details
-
SimpleSchemeBoard
public SimpleSchemeBoard()
-
-
Method Details
-
init
Initialises the scheme artifact- Throws:
npl.parser.ParseExceptionMoiseException
-
addGoal
public void addGoal(java.lang.String goalId, java.lang.String deps) throws MoiseException, npl.parser.ParseException, npl.NormativeFailureException, jason.asSyntax.parser.ParseException- Throws:
MoiseExceptionnpl.parser.ParseExceptionnpl.NormativeFailureExceptionjason.asSyntax.parser.ParseException
-
getOrCreateGoal
- Throws:
MoiseConsistencyException
-
commitGoal
public void commitGoal(java.lang.String goalMission) throws cartago.CartagoException- Throws:
cartago.CartagoException
-
addMissionsInDot
protected boolean addMissionsInDot()- Overrides:
addMissionsInDotin classSchemeBoard
-