stateflow and ticket model