Pātuhitia tēnei: Modeling and simulation of discrete-event systems