Title: Solving Generic Role Assignment Exactly
1Solving Generic Role Assignment Exactly
- Christian Frank and Kay Römer
- ETH Zurich, Switzerland
2Programming Abstractions for WSN
- Task at hand on a higher level
- Retrieve data from network (TinyDB)
- Assign different functions to network nodes (Role
Assignment)
- Wireless Sensor Networks
- Small sensing devices, communicating wirelessly
- Allow unobtrusive monitoring of physical
processes - Programmed as a distributed system
read_sensor() send_msg() get_pos()
3Role Assignment Problems
- Coverage
- Roles ON, OFF
- ON nodes cover every geographic spot
- Clustering
- Roles Clusterhead, Gateway, Slave
- Connected Subgraph
- Data Aggregation
- Roles Data Source, Aggregator, Forwarder
- Many variations and combinations of the above
4Role Assignment Abstraction
- Programmer defines a list of roles
- Functions that a node may perform in the network
- Annotated with conditions for assigning each
role, based on - Local node properties (available sensors,
processing power, battery, position) - Properties of nodes in network neighborhood
5Example Specification Coverage
- Network consists of more nodes than needed
- Only some nodes need to have sensors ON
- Others may save power and sleep with sensors OFF
- Conditions of ON role
- Temperature sensor
- Battery above threshold
- No other ON node in sensing range
ON temp-sensor true battery gt
threshold count(2 meters) role ON
0 OFF else
- x retrieve(scope) pred
- store nodes matching pred in property x
- count(scope) pred
- Counts nodes matching pred within scope
6Elements of a Role-Assignment System
Role Specifications
Node Properties
Network
Role Assignment Problem
RA Algorithm
battery 80 pos (12, 3) role ON
Role Assignment
7Distributed Algorithm
- Distributed algorithm repeats three basic steps
- Send properties to neighbors
- Wait random interval, receive properties
- Decide role
- Distributed fixpoint iteration
- Notifies applications on stable role
- Details in Algorithms for Generic Role
Assignment In Proc. of Sensys 2005
- Does solution exist?
- How good is the solution?
8Verification through Integer Program
Role Specifications
Node Properties
Network
Role Assignment Problem
RA Algorithm
- Detect infeasible specifications
- Optimize number of nodes with a certain role(s)
Role Assignment
9Example Integer Program
ON count(scope) role ON lt 0
OFF else
- Binary result variables
- For each node i and role r
- Constraints (for each node i )
- Only one role should be assigned to a node i
- Role ON is assigned iff count operator is true
- If role ON, count must be true
- similar
M high number, annuls constraint
10Additional Variables and Constraints
- Variables
- Output variables indicating computed role
- Auxiliary variables at each node
- For each atomic predicate
- For each and / or
- For each role condition (opposed to assignment)
- Constraints formulating
- And / or
- Assign first matching role, if more than one
condition matches - Retrieve operators (paper)
ON temp-sensor true battery gt
threshold count(2 meters) role ON
0 OFF else
11Results Feasibility
- Some specifications are infeasible, toy example
- Condition for Red At least 1 Green neighbor
- Condition for Green No Red neighbor
- Grey Else
- Infeasibility is not always apparent in the
specification - Distributed algorithm does not find solution
- IP can be used to detect infeasibility
- Compute feasible topology
12Results Optimality
- IP can be used to compute gap between
distributed and optimal configuration - Generated IPs computable in reasonable time for
many nodes
ON nodes with Coverage Example
Distributed
IP
13Summary
- IP-based role assignment algorithm
- Compute feasibility (or feasible topology)
- Optimize number of nodes with a certain role(s)
- Integrated development tool
- Simulator of distributed algorithms
- Integer-program based verifier
- Visualization
14Solving Generic Role Assignment Exactly
- Christian Frank and Kay Römer
- ETH Zurich, Switzerland