Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Background
In order to model a real-world IoT application or a solution it is imperative to combine things with data.
For the purpose of this tutorial let's model the Greenhouse monitoring system with following configuration.
- Greenhouse: size: 40 feet by 110 feet
- crop types, tomatoes and peppers
- 3 lanes, each lane has 10 zones
- Total 30 zones (each zone is 10 feet by 10 feet. Lay out is 3 by 10): 20 zones (2 by 10) are tomatoes, 10 zones are peppers
Each zone subdivided into 9 grids. Each grid is 3.33 feet by 3.33 feet. Total 270 grids
Zone Content:
- 1 temperature sensor (total 30)
- 1 humidity sensor (total 30)
- 1 camera (total 30)
- 1 irrigation motor (total 30)
Zone Grid Content:
- 1 ambient light sensor (total 270)
- 1 light (total 270)
- 1 irrigation nozzle (total 270)
External Conditions:
- 1 ambient light sensor
- 1 temperature sensor
- 1 humidity sensor
Simulation Design Goals
...
Modeling and Simulation are central to the IoT Applications. Modeling and Switching is a broad discipline with a wide range of technologies and methodologies. Most of the technologies focus on a specific aspect with a different purpose (e.g., discrete event simulation in industrial systems vs. continuous simulation in electrical and computer engineering). There is a need for an all-encompassing approach, especially in the IoT arena. Atomiton TQL provides right set of hooks to create an all-encompassing approach to simulation.
Greenhouse Problem Statement
For the purpose of this tutorial to explain implementation approaches to simulation we look at the Greenhouse monitoring system with following scenario.
For the purpose of this tutorial let's model the Greenhouse monitoring system with following configuration.
- Greenhouse: size: 40 feet by 110 feet
- crop types, tomatoes and peppers
- 3 lanes, each lane has 10 zones
- Total 30 zones (each zone is 10 feet by 10 feet. Lay out is 3 by 10): 20 zones (2 by 10) are tomatoes, 10 zones are peppers
Each zone subdivided into 9 grids. Each grid is 3.33 feet by 3.33 feet. Total 270 grids
Zone Content:
- 1 temperature sensor (total 30)
- 1 humidity sensor (total 30)
- 1 camera (total 30)
- 1 irrigation motor (total 30)
- 1 heater (total 30)
Zone Grid Content:
- 1 ambient light sensor (total 270)
- 1 light (total 270)
- 1 irrigation nozzle (total 270)
- 1 soil moisture sensor (total 270)
External Conditions:
- 1 ambient light sensor
- 1 temperature sensor
- 1 humidity sensor
Simulation Design Patterns
At the time of writing this tutorial Atomiton TQLEngine does not provide specific language constructs to implement simulation. But the existing Atomic domain languages capabilities can be exploited to achieve simple to complex simulation. The simulation design patterns can be classified as follows:
Name | Description | Use Cases | Implementation Flow |
---|---|---|---|
@ThingFacet Level | Seamless integration within the attribute's associate action |
|
|
@ThingFacet Level | Separate Action to start the simulation |
|
|
@Protocol Handler Level | Push the simulation logic down into protocol handler level |
| Within Protocol Handler. |
@Behavior Tree | Simulation logic is driven primarily by Behavior Trees. |
| Within BDL Facet Instance |
Create DataModel to store non-thing related data
...