时间块分配算法,私人教师->学生关系,最大化班级数量
情况如下。
我是一名私人教师,有几十名学生。我的时间有一些限制(例如我不能在周五下午教书),学生的时间也有很多限制。基于此,我正在尝试以一种可以做尽可能多的私人课程并同时优化我的时间的方式制定我的议程。理想情况下,它甚至会考虑我到学生的距离(其中一些人在另一个城市)。课程的持续时间也不同。理想情况下,我希望能够设置我可以教学的时间(一周中的每一天),并设置每个学生可以上课的时间(一周中的每一天),他希望课程持续多长时间和频率(即每周 2 次)。
我相信已经有一个算法,但我找不到这个问题的名称。我相信稳定婚姻不是这种情况,也不是这种情况:教师时间表算法
如果有人能给我指出一种算法或我可以研究的材料,以便在不存在的情况下尝试详细说明,我将不胜感激。
非常感谢您,祝您度过愉快的一天!
The situation is the following.
I'm a private teacher with dozens of students. I have some restrictions on my time (for example I can't teach at friday afternoons) and students also have many restrictions on their time. Based on that, I'm trying to create my agenda in a way that I can do as many private lessons as possible and optimize my time at the same time. Ideally it would even take into consideration the distance from me to the students (some of them are in another city). Classes also have variable durations. Ideally I want to be able to set the time (each day of the week) I can teach and set the time (each day of the week) each student can have lessons, for how long does he want a lesson to last and frequency (i.e. 2x per week).
I believe there is already an algorithm, but I can't find the name of this problem. I believe it's not the case of the stable marriage and it's not the case of this one either: Teacher time schedule algorithm
I would appreciate a lot if someone could point me to an algorithm or to material I can study in order to try to elaborate one if it does not exist.
Thank you very much and have a nice day!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题似乎太复杂了,无法应用一些很好的多项式时间解决方案。例如,如果您不关心学生所在的位置、不关心时间碎片等,您可以使用某种最大流算法来解决它。但是,这可能不会产生您最满意的时间表。如果您想模拟现实世界的情况,假设您的学生数量较少(例如 < 10)并且您的可用小时数较少(例如 < 40),您应该这样做 回溯(即强力),以便尝试不同的任务并优化您所拥有的任何约束。由于运行时间是指数级的,您最终可能需要进行一些分支和绑定优化。
无论您采取哪种方法,您都必须以更具体的方式简化或指定问题。例如,如果您决定上课总是在 2 点、4 点、6 点或 8 点开始,那么解决问题就会容易得多。您还需要定义一个公式来给出解决方案的质量(例如总教学时间减去总旅行时间)。对这样的问题建模并编写解决方案通常很有趣,特别是如果您是编程或算法爱好者。
The problem seems to be too complicated in order to apply some nice polynomial time solution. For example, you could solve it using some maximum-flow algorithm if you did not care about where the students are located, did not care about time fragmentations, etc. However, this will probably not result in the schedule you are most happy with. If you want to model the real world situation, assuming that you have small number of students (e.g. < 10) and you are available small number of hours (e.g. < 40), you should just do backtracking, (that is, brute force) in order to try different assignments and optimize whatever constraints you have. Since the run-time is exponential, you may eventually have to do some Branch and Bound optimizations.
No matter what approach you take, you will have to simplify or specify the problem in more concrete way. For example, if you decide that classes always starts at 2, 4, 6, or 8 o'clock, solving the problem will be much easier. You will also need to define a formula that gives the quality of the solution (e.g. total time teaching minus total time travelling). Modelling problems like this and writing solutions is usually fun, especially if you are programming or algorithmic enthusiast.