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):
  • commitMission
  • leaveMission
  • goalAchieved
  • setArgumentValue
  • resetGoal
  • destroy
Observable properties:
  • 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")
Signals (obligation o has the form: obligation(to whom, maintenance condition, what, deadline)):
  • 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 the bid is a performance goal and o = obligation(Ag,_,satisfied(Sch,bid), TTF) if the bid 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 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

      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.String deps) throws MoiseException, npl.parser.ParseException, npl.NormativeFailureException, jason.asSyntax.parser.ParseException
      Throws:
      MoiseException
      npl.parser.ParseException
      npl.NormativeFailureException
      jason.asSyntax.parser.ParseException
    • getOrCreateGoal

      Goal getOrCreateGoal​(java.lang.String goalId, boolean addMission) 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 class SchemeBoard