A three-stage mathematical model for handling and transporting stochastically generated materials