Update schedule.c

Added experimental lottery define (and some code)
Added lots of comment to increase clarity (for me)