Work on compute_new_schedule.js (need to implement a function)