K  n  o  w  L  a  n  g
Framework for Knowledge Representation and Reasoning for Self-Adaptive Systems


U s e r    G u i d e

Home
Running KnowLang
Knowledge Model
Concepts
Objects
States
Metrics
Self-Adaptive Behavior
Goals
Situations
Policies
Reasoner
Contact Info
Description

In KnowLang, a SITUATION represents a moment in the system's lifetime where a particular state is realized. Situations are specified to denote important moments where usually the system will require self-adaptation. The main specification properties of a situation are states (called situation states) and actions that the system can undertake when that situation is present. The situation states are a set of states that sufficiently determine if a situation is present. Note that only one state out of all situation states is sufficient to expose a situation. At runtime, the KnowLang Reasoner constantly evaluates all the defined states in the KB and concludes what situations are present.

Situations are usually related to policies as part of the self-adaptive behaviorís specification.

Example
//
//==== eCars Situations ===============================================================================
//
CONCEPT_SITUATION RouteTrafficIncreased {
  CHILDREN {}
  PARENTS {eMobility.eCars.CONCEPT_TREES.Situation}
  SPEC {
    SITUATION_STATES {eMobility.eCars.CONCEPT_TREES.Route.STATES.InHighTraffic}
    SITUATION_ACTIONS {eMobility.eCars.CONCEPT_TREES.TakeAlternativeRoad}
  }
}
CONCEPT_SITUATION BatteryIsInsufficient { // battery is insufficient to complete the journey
  CHILDREN {}
  PARENTS {eMobility.eCars.CONCEPT_TREES.Situation}
  SPEC {
    SITUATION_STATES {eMobility.eCars.CONCEPT_TREES.Journey.STATES.InNotSufficientBattery}
    SITUATION_ACTIONS {eMobility.eCars.CONCEPT_TREES.FindNearestChargeStation,
      eMobility.eCars.CONCEPT_TREES.GoToChargeStation,
      eMobility.eCars.CONCEPT_TREES.ChargeBattery,
      eMobility.eCars.CONCEPT_TREES.ReplaceVehicle}
  }
}

top
User Guide Curator - Emil Vassev
Last modified on January 28, 2014