Svg out | ||||
---|---|---|---|---|
|
ID
Acronym: Simulation Environment Monitoring
Use-cases: Loire Flooding, HelloDiag
Description
R-IOSEMIT enables you to simulate a predefined set of data called events. An event has to follow a predefined structure and a topic. In R-IOSuite three types of sensors can be simulated: the events emitted from webservices, from tweets or from the Maple location tags.
Summary
Table of Contents | |||
---|---|---|---|
|
The main functionalities
Synchronize | |
Create a sensor | |
Start/Stop/Play/Pause a sensor |
How does the interpretation work?
R-IOSEMIT enables R-IOSUITE to interpret events in real-time. It uses a Complex Event Processing (CEP) engine to apply the interpretation rules available in your Use-Case (at src/main/resources/webjars/gind/usecases/loireflooding/interpretation-rules.
R-IORED will be design to update these rules through a dedicated tool.
- The first event is notified to the CEP engine by the notify() method of the CEP rules manager
- The second event is notified to the CEP engine etc.
... - When an event fulfills the conditions of an interpretation rule, the High level interpretation engine notifies that a node or a edge has to be deleted/updated or added to the ACTIVE WORLD (stored in Neo4J). This action is stated in the interpretation rule.
- Then, the interpretation manager uses the notification to update the ACTIVE WORLD with the interpret() method.
Gliffy | ||||
---|---|---|---|---|
|
How to add a sensor?
Simulated Data Source
Files (.xml) to be linked to a simulated WSN data source:
Illustration: Loire Flooding
- Topic Set Producer - Topics corresponding to the events to be simulated
- Sensors Event Topic Namespace - List of topics available
- Event - file with the events to be simulated
- Configuration - file with the configuration of the simulation: the frequency of the simulation and the configuration of the graph to be fed (on the interface during the simulation)
Files (.xml) to be linked to a simulated Mapple data source:
Illustration: HelloDiag
- Event - file with the events to be simulated
- Configuration - file with the configuration of the simulation, especially to configure the graph to be fed (on the interface during the simulation)
Structure of the configuration file
<datasetConfiguration>:
- <emissions>: <frequency> (n <time>) OR <period>
- <chartConfig>:
- <title>
- <lineChart> OR <map>
<lineChart>:
- <eventType>
- <axisX (1 fois)> : <title>
AND <mappingEventElement> - <axisY (n fois)> : <title>
AND <mappingEventElement>
AND <color (hexa)>
AND <referenceLine> (<name> AND <value>) - <preview (boolean)>
<map>: <mapEvent> :
- <eventType>
- <latitudeMappingEventElement>
- <longitudeMappingEventElement>
- <preview (boolean)>
- <polyline>: <color (hexa)>
How to configure the graph to be displayed on R-IOSEMIT during the simulation?
Example of event
Example of graph
Example of Mapping file
How to configure interpretation engines ?
R-IO Suite allows to define rules in order to consider and interpret incoming events. There are 2 ways to configure this interpretation.
We can either use a CEP or a ML mechanism. Both interpretations are configured with the same configuration schema (see following).
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.gind.emac.fr/InterpretationConfigs"
xmlns:tns="http://www.gind.emac.fr/InterpretationConfigs"
elementFormDefault="qualified">
<xsd:element name="interpretationConfigs">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:interpretationConfig"
minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="cepRule">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="streamDefinition" type="xsd:string"></xsd:element>
<xsd:element name="rule" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="mlConfig">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="moduleName" type="xsd:string"></xsd:element>
<xsd:choice>
<xsd:element name="dataSetToTrain" type="anyURI"></xsd:element>
<xsd:sequence>
<xsd:element name="features" type="anyURI"></xsd:element>
<xsd:element name="labels" type="anyURI"></xsd:element>
</xsd:sequence>
</xsd:choice>
<xsd:element name="trainedModel" type="anyURI"
minOccurs="0"></xsd:element>
<xsd:element name="useTrainedModel" type="xsd:boolean"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="interpretationConfig">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="name" type="QName"></xsd:element>
<xsd:choice>
<xsd:element ref="tns:cepRule"></xsd:element>
<xsd:element ref="tns:mlConfig"></xsd:element>
</xsd:choice>
<xsd:element ref="tns:eventAction" maxOccurs="unbounded"
minOccurs="0" />
<xsd:element ref="tns:context" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="context">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:subscriptionsRequired"
minOccurs="0" maxOccurs="1" />
<xsd:element name="collaborationName" type="xsd:string"
minOccurs="0"></xsd:element>
<xsd:element name="knowledgeSpaceName" type="xsd:string"
minOccurs="0"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="eventAction">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="eventElementName" type="xsd:QName" />
<xsd:element name="schemaDefinition">
<xsd:complexType>
<xsd:choice>
<xsd:element name="content" type="xsd:string" />
<xsd:element name="url" type="xsd:string" />
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="topic" type="xsd:QName" />
<xsd:element name="publishDestination" type="xsd:string"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="subscriptionsRequired">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0"
name="entry">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="topic" type="xsd:QName" />
<xsd:element name="correspondingEvent"
type="xsd:QName" />
<xsd:element minOccurs="0"
name="endpointAddressToSubscribe" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema> |