Resource scheduling problem

本秂侑毒 提交于 2020-03-20 08:04:16

问题


I'm developing a motorcycle hire website. The problem I have is how to solve the problem of assignment a guest to a motorcycle in an efficient way. I know how to do it in a "silly" way, but I want to know if there is a classical algorithm that solves this kind of problem. It's the same problem as the assignment of a guest to rooms in a hotel. In this last example, the goal is to achive maximum occupancy by never rejecting a reservation due to inefficient scheduling.

I'm pretty sure that this problem has to be a classic problem that has a known solution.

Thanks a lot.


回答1:


What you're interested in is called Interval Scheduling. Assuming all reservations have the same weight (none are favored over any other), you'd want a greedy algorithm.

Here (pdf) are some good slides about the topic.

Basically, you want to schedule the earliest-ending reservations first.




回答2:


This is Interval scheduling but it's an online algorithm. If you want to read further you can read here:

http://www-bcf.usc.edu/~dkempe/teaching/online.pdf



来源:https://stackoverflow.com/questions/3506825/resource-scheduling-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!