someone else's queuing solver ported to Matlab