Package ora4mas.light
Class LightSchemeBoard
- java.lang.Object
-
- cartago.Artifact
-
- ora4mas.nopl.OrgArt
-
- ora4mas.nopl.SchemeBoard
-
- ora4mas.light.LightSchemeBoard
-
- All Implemented Interfaces:
ToXML
,npl.DynamicFactsProvider
public class LightSchemeBoard extends SchemeBoard
Artifact to manage a scheme instance.
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 thebid
is a performance goal ando = obligation(Ag,_,satisfied(Sch,bid), TTF)
if thebid
is 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
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
ALL_GOALS
protected java.util.logging.Logger
logger
-
Fields inherited from class ora4mas.nopl.SchemeBoard
aEnabled, aSatisfied, aWaiting, obsPropCommitment, obsPropGroups, obsPropSpec, piGoalState, schBoards, spec
-
Fields inherited from class ora4mas.nopl.OrgArt
dfpListeners, gui, myNPLListener, nengine, oeId, orgBoardName, orgState, ownerAgent, running, runningDestroy, sglDestroyed, sglNormFailure, sglOblCreated, sglOblFulfilled, sglOblInactive, sglOblUnfulfilled, updateGUIThread
-
-
Constructor Summary
Constructors Constructor Description LightSchemeBoard()
-
Method Summary
Modifier and Type Method Description void
addGoal(java.lang.String goalId, java.lang.Object[] deps)
protected boolean
addMissionsInDot()
void
commitGoal(java.lang.String goalMission)
(package private) Goal
getOrCreateGoal(java.lang.String goalId)
void
init()
Initialises the scheme artifact-
Methods 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, updateRolePlayers
-
Methods 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, updateGuiOE
-
Methods 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, updatePosition
-
-
-
-
Method Detail
-
init
public void init() throws npl.parser.ParseException, MoiseException
Initialises the scheme artifact- Throws:
npl.parser.ParseException
MoiseException
-
addGoal
public void addGoal(java.lang.String goalId, java.lang.Object[] deps) throws MoiseException, npl.parser.ParseException, npl.NormativeFailureException
- Throws:
MoiseException
npl.parser.ParseException
npl.NormativeFailureException
-
getOrCreateGoal
Goal getOrCreateGoal(java.lang.String goalId) throws MoiseConsistencyException
- Throws:
MoiseConsistencyException
-
commitGoal
public void commitGoal(java.lang.String goalMission) throws cartago.CartagoException
- Throws:
cartago.CartagoException
-
addMissionsInDot
protected boolean addMissionsInDot()
- Overrides:
addMissionsInDot
in classSchemeBoard
-
-