Matrix computational framework for discrete event control of wireless sensor networks with some mobile agents