[WIP] SIMBICON example

I'm looking for advice on:

1. creating discrete/cache state variables. I need to update (1) the state of the controller (0, 1, 2, 3) and the time at which the state last changed. I was going to do this with discrete variables, but looking at discussion with Tom, Sherm and Ajay about metabolics, it seems I should use an auto update variable.
2. storing the index of the variables I create, so I can access the variable again in my event handler. I am allocating my variables in my Force::Custom::Implementation's realizeTopology, which is a const method. However, I want to hold onto the indices I get back from allocating, so I can write to this state variable in the future. Does this code NOT belong in realizeTopology? If not, I don't know when else I get a writeable state.
3. In order to apply actuation, I'm using enums to keep track of Q and U indices. Is there a cleaner way to do this (to remember the indices that correspond to my coordinates)?

TODO:
- [ ] use discrete/cache variables correctly.
- [ ] write the handleEvent code to update the SIMBICON state of the controller.
- [ ] write control logic for balance.