fix bug in iterators

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>
improve scheduling and production scoring algorithm

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>