对要分配的任务进行排序

发布于 2024-10-01 13:59:44 字数 476 浏览 6 评论 0原文

我有一个问题,我不知道从哪里开始。我真的很感激一些帮助。

问题:

我有几项 T 任务必须由 1 名员工在 D 天内完成(让我们忘记现在使用多种资源)。每个任务可以在某些时间内完成(并非所有任务都可以在所有时间完成)。例如:如果我的员工 8 点开始工作,其中一项任务是“打电话给客户”。也许客户办公室九点钟开门。

此外,每个任务都有一个持续时间(实际估计的)。假设D天足够完成所有任务。

我必须将任务分类给员工。例如:周一 8:00 执行任务 7,然后在 9:30 开始任务 2。在示例中,任务 7 的持续时间为 1 个半小时。

感谢您的帮助!

迭戈·

PD:如果有人有办法做到这一点,而且它不是一个算法,没关系,请回答,我会设法思考算法。我只是不知道如何面对这个问题。

编辑 项目有用吗?

编辑2 不需要任务/作业依赖性

I've got a problem that I don't know where to start. I'd realy appreciate some help.

The problem:

I have several T task that must be done in D days by just 1 employee (let's forget using several resources right now). Each task can be done in some times (not all tasks can be done all time). e.g.: If my employee starts working at 8 o'clock and one task is "call a client". Maybe the client office opens at 9 o'clock.

Also each task has a duration (really estimated). It is supposed that the D days are enough to do all task.

I've to sort the tasks to the employee. e.g.: at monday 8:00 do task 7, then at 9:30 starts with task 2. In the example task 7 duration would be 1 and a half hour.

Thanks for the help!

Diego

PD: If someone has a way to make this and it is not an algorithm never minds, please answer and I'll manage to think the algorithm. I just don't know how to face the problem.

Edit
Would Project be usefull?

Edit 2
Tasks / Jobs dependency is NOT required

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

夜夜流光相皎洁 2024-10-08 13:59:44

如果这是“应用程序的一小部分”,您可能需要与客户重新协商:作业车间调度 是 NP 完全(俗语:随着复杂性的增加,很快就会变得非常困难).
思考的一些要点:

  • 您需要为日期分配某种“容量”,标记您需要执行某种任务的时间间隔(员工的工作开始和结束,其他办公室的开放时间等)
  • 需要 告诉不同的任务(或工作,因为它们被称为)它们需要什么样的能力,以及需要多长时间:需要的工具,要接触的人员等。
  • 您可能需要工作 17 之间的某种方向关系(“致电 XYZ 办公室并要求成本估算”)和工作 18(“将成本估算转发给老板”):工作 17 必须在工作 18 开始之前完成。

当你在谷歌上搜索“作业车间调度”时,你会遇到比你想阅读的“应用程序的一小部分”更多的科学论文......

(披露:我工作的公司提供不同 工具来完成这类事情。)

If this is a "little part of an app" you might want to renegotiate with the client: Job shop scheduling is NP-complete (vulgo: gets real difficult real quickly with increasing complexity).
Some points to ponder:

  • you need to assign some sort of "capacity" to the days, marking time intervals when some sort of task is possible (work start and work end of your employee, opening hours of other offices, etc.)
  • you need to tell the different tasks (or jobs, as they are called) what sort of capacities they require, and for how long: tools needed, people to be reached, etc.
  • you might need some sort of directional relationship between, say, job 17 ("call office XYZ and ask for cost estimate") and job 18 ("forward cost estimate to boss"): job 17 must be done before job 18 can be started.

When you google for "job shop scheduling" you'll come across more scientific papers than you'll ever want to read for a "little part of an app"...

(Disclosure: I work for a company that offers different tools to do just this sort of thing.)

风流物 2024-10-08 13:59:44

您的问题是运筹学问题的一部分。这个主题已经被大量研究,并且没有简单的算法。这类调度问题通常是非多项式的,所以基本上你必须尝试每种组合,但是当约束被打破时你可以中断。也就是说,如果您知道自己不能在 9:00 之前完成,则无需从 8:00 致电客户开始尝试所有组合。

因此,谷歌搜索有关运筹学和约束规划算法以及组合优化的内容。

Your problem is a part of operations research problems. This topic has been massively studied and there is no simple algorithm from that. Those kind of scheduling problem are usually non-polynomial, so basically you have to try every combinations, but you can cut-off when a constraint is broken. I.e there is not need to try all the combinations starting by call the client a 8:00 if you know that you can not do it before 9:00.

So google stuff about operations research and constraint programming algorithms and combinatorial optimization.

殊姿 2024-10-08 13:59:44

您需要找出算法的输入是什么。输入的一部分是任务列表以及每个任务的持续时间。每个任务也有要求:

  • 参与者数量(目前始终为 1,但如果可以改变,您需要尽早考虑)
  • 可以执行任务的时间段(当前是一天中的时间,但也可以是一周中的某一天,甚至一个月中的某一天)
  • 参与者可以有自己的要求(例如工作时间,但也可以是更多)
  • 任务可以依赖于一些其他任务或首先要完成的任务

可能有更多要求。要发现您还需要什么,您应该尝试手动解决一些具体问题。当您尝试时,可能会发现更多要求。无论要求是什么,您的算法都应该尝试以类似的方式满足它们,就像您手工完成的那样:当时的一个要求,如果某些要求发生冲突,则回溯并尝试不同的路线。算法应该首先从最严格的要求开始。

You need to find out what is the input for your algorithm. Part of the input is list of tasks with duration for every task. Each task also has requirements:

  • number of participants (currently always 1, but if that can change you need to think about it early)
  • time periods that the task can be performed (currently time of day, but it can also be day of week, or even day of month)
  • participants can have their own requirements (like working hours, but it could be something more)
  • task can depend on some other task or tasks to be completed first

There could be more requirements. To discover what more you need you should try to solve some concrete problems by hand. While you try some more requirements may be discovered. Whatever the requirements are your algorithm should try to satisfy them in similar fashion like you did it by hand: one requirement at the time, and if some collide then trace back and try different route. Algorithm should start from most restrictive requirements first.

你列表最软的妹 2024-10-08 13:59:44

您可以使用约束规划来解决此类问题,前提是元素数量不太大。

查看 ECLiPSe(请参阅 http://eclipseclp.org/)。

You can solve these kind of problems using constraint programming, provided the number of elements is not too big.

Take a look at ECLiPSe (see http://eclipseclp.org/).

Saygoodbye 2024-10-08 13:59:44

这是解决此类问题的另一个库:Drools Planner(开源,java )。

请注意,它一起解决了所有要求(=约束),因为特别是如果您有硬约束和软约束,您会发现通常可以解决所有硬约束,但不可能解决所有软约束(您仍然希望最小化尽可能多地使用它们)。

Here's yet another library for these kind of problems: Drools Planner (open source, java).

Note that it solves all the requirements (=constraints) together, because especially if you have hard and soft constraints, you'll find that it's usually possible to solve all hard constraints, but impossible to solve all soft constraints (you still want to minimize them as much as possible).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文