Modeling manufacturing systems