modify simulation algorithm for BSON
fix simulation bug - phase with multiple high level states can be
simulated.
fix behaviour cycle bug - Bhv cycle must involve both high level and low
level ONs