You may be familiar with Paul Graham\'s essay, \"Maker\'s Schedule, Manager\'s Schedule\". The crux of the essay is that for creative and technical professional
I remember implementing something very similar to your problem with A* search algorithm. You will easily find several implementation of the algorithm available but in order to apply it to the scheduling problem you will have to construct distance and heuristic functions based on your model and split continuous time into chunks.