Ambiguities:
- When a user creates a new value in a cell, is this value propagated to each member of the sheet, or to a single global area?
- Same question, except with functions
- Should really be both (configurable). In one case, I may just want a bunch of nodes to run a particular function (each node should classify whether they are 'sunny', 'rainy', 'cloudy', etc.
- Other times, certain states can only be ascertained using values from multiple nodes ('hurricane', 'tornado', 'terrorist attack'). It wouldn't make sense to run functions that determine these states on single nodes.
- How to handle functions from pivot tables (like 'sum', 'average', etc)?
- Really we want only the basestation to run this function (although perhaps we can distribute the computation to reduce communication)
- How to handle cross-sheet references?
- Node to node sheet references is straightforward (one node essentially sends data to the other node)
- Sheets with multiple groups however are harder. It seems we need two separate cases. One case for local variables and another for global variables (same thing with functions)
How to refer to cell values? For instance, how should a function access the last 'n' temperature values?
- We can a bit clever: If the user states something like “A:5 - A10” and 10 is the last filled cell in column A, we can assume that the user wants the last five values. We can then look up what dimension column A currently holds (like temp).
- Now if in the future, Temp is no longer in column A (say it's in B now), then the user function should automatically reflect this by replacing A with B.
- What happens if the user selects a column (A:5 - A10), but each cell along the row represents a different sensor value (A:1 - Temp, A:2 - Photo, etc). This can happen if the sensors are organized along the row
- Then the user is really stating: Please give me the first temp value, and the first photo value, etc.
- This technique really is all about mapping the spatial organization to the logical organization
How does a function store new cell data? How storing new cell data related to creating a new dimension?
- Have a special cell reference value called “NEXT” so that A:NEXT means “the next empty cell in column/row A”.
- Alternately just write something like “A := foo”. Assigning a value to an entire column or row, may means “append to column A”.
- Again, we have to be smart. When appending to column A, we need to find out what dimension A represents logically
- If the column/row that the user is appending to doesn't have a name, then we should assign it a default name. Also we need to a way to allow users to assign new names to columns
- These new data columns/rows should then automatically be shown in the Dimension list in the Pivot Table dialogue
- Each value written to a column/row should have an implicit time-stamp
Summer Timeline:
- Week 1: Basic simulation working with a default query (basic node sampling program should work)
- Week 2: Ability to create hierarchical sheet groups (obviously the simulation should work, as should the interface)
- Week 3: Ability to define new cell values and functions and have it propagated to the simulated network
- Week 4: Continue from Week 3. Get IF-statements to work
- Week 5: Start work on the Pivot Table interface (previously we'll probably use a manual query interface)
- Week 6: Cross-sheet references
- Week 7: Prepare first presentation, giving an example of how things work along with updated paper
- Week 8: Begin porting to Kensho/Hardware
Simulation:
We are not concerned with radio or network accuracy. So we can do something silly like this:
class SensorNetwork
def initialize(numNodes)
@nodes = Array.new(numNodes)
end
end
class SensorNode
def initialize(numSensors)
@sensors = Array.new(numSensors)
end
end
class SensorHardware
...
end