了解项目作业调度中的域类 [英] Understanding Domain Class in Project Job Scheduling

查看:40
本文介绍了了解项目作业调度中的域类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 optaplanner 的新手,现在我专注于尝试了解项目作业调度.我尝试使用 optaplanner 手册中的示例数据运行此示例,如下图所示:

I am new to optaplanner, and right now I focus on trying to understand the project job scheduling. I trying to run this examples using the sample data from optaplanner manual like in this picture below:

我对本示例中的域类有一些疑问:

I have some question about the domain classes in this example :

  1. GlobalResource 和 LocalResource 有什么区别?在示例中,所有资源都是 GlobalResource 对吗?那么LocalResource有什么用呢?
  2. JobType 有 3 种:SOURCE、STANDARD、SINK,每一种是什么意思?它是 SOURCE 意味着这项工作应该在其他人之前首先开始吗?STANDARD 意味着它应该在前任作业完成后运行而不是在 SINK 作业之后运行?SINK 是指完成所有工作后要做的最后一项工作吗?
  3. Project 类中的属性 releaseDate 和 criticalPathDuration 是什么意思?如果与上图联系起来,Book1 和 Book2 项目的价值是多少?
  4. ResourceRequirement 中的需求是什么意思?

如果有人可以帮助我像 optaplanner 发行版中那样创建 xml 示例数据,我将非常感激,因为它将帮助我更快地理解这个示例.谢谢&问候.

I will be really thankful if someone can help me create the xml sample data like in optaplanner distribution, cause it will help me more faster to understand this example. Thanks & Regards.

推荐答案

  1. LocalResource 属于特定的 Project,GlobalResource 在项目之间共享.因此,LocalResource 只需要担心被同一个 Project 中的其他作业也使用,而 GlobalResource 则需要担心所有其他任务.

  1. A LocalResource belongs to a specific Project, a GlobalResource is shared between the projects. So a LocalResource only has to be worry about being used by other jobs in the same Project too, while a GlobalResource has to worry about all other tasks.

这是一个实现技巧.源和接收器工作基本上是虚拟的.因为一个项目可能从多个并行的作业开始,一个 SOURCE 作业放在它的前面,有一个单一的根.结尾相同:它可以以多个结尾,因此在它之后放置一个 SINK 作业,以具有单个尾部.这使得确定完工时间等变得更容易和更快.

That's an implementation trick. The source and sink jobs are dummy's basically. Because a project might start with multiple jobs in parallel, a SOURCE job is put in front of it, to have a single root. Same for the end: it can end with multiple, so a SINK job is put after it, to have a single tail. This makes it easier and faster to determine makespan etc.

IIRC,releaseDate 是我们被允许开始第一份工作的第一个日期.例如:您必须创建一本书,但您只能在下周一获得实际的最终内容,因此发布日期是下周一(您不能在该日期之前开始任何工作).

IIRC, releaseDate is the first date we are allowed to start the first job. For example: you have to create a book, but you 'll only get the actual final content next Monday, so the releaseDate is next Monday (you can't start any work before that date).

criticalPathDuration 是理论上的最小持续时间(如果我们可以愉快地忽略资源 IIRC).例如:如果作业 A 需要 5 天,作业 B 需要 2 天,而 B 必须在 A 之后完成,则关键路径工期为 7 天.添加需要 1 天并且可以与其他任务并行完成的作业 C,不影响它.

The criticalPathDuration is a theoretical minimum duration (if we can happily ignore resources IIRC). For example: if job A takes 5 days and job B takes 2 days and B has to be done AFTER A, then the critical path duration is 7 days. Adding job C which takes 1 day and can be done in parallel with the others, don't affect that.

  1. ResourceRequirement 是 ExecutionMode 和 Resource 之间的多对多关系.请记住, ExecutionMode 属于特定作业.例如:在executionMode A1下做作业A需要1个工人5天.在执行模式 A2 下做工作 A 需要 2 个工人和 3 天.

这篇关于了解项目作业调度中的域类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆