| Algorithm 1 Fuzzy spatial relation modeling by I5×5M in sensor networks | |
| 1: | Variables: SN= {s1,s2,...,sn}; SensorNetwork |
| 2: | S-On, D-Ons; a sensor ontology, a domain ontologies |
| 3: | I 5×5 M; Intersection matrix modeling the fuzzy spatial relation between A and B |
| 4: | fA(si) → {(0,1)|(0,1,2)} ; Function used to detect A |
| 5: | gB(si) → {(0,1)|(0,1,2)} ; Function used to detect B |
| 6: | h(s)→ {0,1,2} ; Function used to detect the boundaries of A or B |
| 7: | SpTr(SN); Built spanning tree over the sensor network |
| 8: | Begin |
| 9: | Setting the sensor network; establishing communication links among nodes |
| 10: | Build the spanning tree (SpTr(SN)) over the SN topology |
| 11: | Detection of the phenomenon A is computed over the SN: fA(SN) |
| 12: | Detection of phenomenon B is computed over theSN: gB(SN) |
| 13: | Decentralized spatial computingof A and B boundaries over the SN:h(si(AB)) |
| 14: | Compute spatial statefrom detected phenomena and boundaries: (si([x,y,z][x y z]) |
| 15: | Aggregatesensor spatial state |
| 16: | From the last child node to sink node along SpTr(SN) |
| 17: | Compile spatial states ofunequal value |
| 18: | Compute I5×5M by alignment between spatial states values and I5×5M elements |
| 19: | If...thenInference ofqualitative specifications about fuzzy spatial relationfrom I5×5M |
| 20: | End. |