New scheduling algorithm based on Master Thesis. State Machine.