A mathematical model for simulating