【问题标题】:Anylogic - queue based on processing times DBAnylogic - 基于处理时间数据库的队列
【发布时间】:2021-09-12 17:07:00
【问题描述】:

我正在使用任何逻辑进行作业车间调度。我有 20 个作业(具有每个作业的机器序列数据库的代理)和 5 台机器(资源)。

This is what I have right now. Source creates the 20 jobs and in the exit block i have the 'nextmachine' function, that sends each job to the correct machine of its sequence.

现在我想使用其他数据库表,其中包含每个作业序列的机器中每个作业的处理时间。我想订购所有队列以缩短处理时间。我使用新的数据库表创建了一个新代理“processingTimes”,并尝试将作业 ID 与 processingTimes 相关联,以便正确关联处理时间。

Processing times table.

I created this collection, inside my new agent, containing the processing times of each job.

Did this, trying to associate both agents id but I think it is not correct.

Finally, this is the condition I put so that I can order my jobs in relation to their processing times. I also think the code is not correct.

关于我做错了什么的任何提示?

新:

This is my iterator but gives me the errors showed

New collection properties.

【问题讨论】:

    标签: anylogic job-scheduling


    【解决方案1】:

    需要进行以下更改:

    1. 从数据库加载 processingTimes 时删除 选择条件
    2. 创建一个int->ProcessingTime的LinkedHashMap类型的集合,我们称之为col_jobProcTimes
    3. Main->在启动时 - 遍历 processingTimes[] 人口并将它们放入 col_jobProcTimes 映射以供以后查找
    4. 队列“agent1 优先于 agent2”字段中的两个代理是 Job,因此对于您需要执行的每个作业:col_jobProcTimes.get((job)agent.jobpt).col_processSequence.get((job)agent.counter) 获取延迟的双精度值并比较两个

    更新。

    关于pt。上面3,代码应该是:

    for (ProcessingTimes pt : processingTimes) {
        col_jobProcTimes.put(pt.jobpt, pt);
    }
    

    AnyLogic 帮助网站有一个很好的使用 java here 的参考。

    【讨论】:

    • 好的,我删除了选择条件,并假设集合'col_jobProcTimes'是在mais中创建的,对吗?如果是的话,这就是我所做的。我通过代理人口代码迭代更新了这个问题,因为我认为我做的不正确。谢谢
    • 我已经修改了答案
    • 非常感谢,它成功了。我想我完成了我想做的事,谢谢你!
    • 酷,你能结束这个问题吗?
    猜你喜欢
    • 2015-10-07
    • 2021-07-28
    • 1970-01-01
    • 1970-01-01
    • 2023-01-19
    • 1970-01-01
    • 1970-01-01
    • 2017-11-12
    • 2021-01-24
    相关资源
    最近更新 更多