Computer simulation of inclusive pion nuclear reactions