本文介绍了通过 anylogic 中的特定资源路由代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在解决一个求助于任何逻辑的作业车间调度问题.我有 20 个工作(代理)和 5 个机器(资源),每个工作作为访问机器的特定顺序.我的问题是:我如何确保每项工作都遵循其顺序.

I am solving a job shop scheduling problem resorting to anylogic. I have 20 jobs (agents) and 5 machines(resources) and each job as a specific order to visit the machines. My question is: how can I make sure that each job follows its order.

This is what I have done. One agent called 'jobs' and 5 agents, each one corresponding to a machine. One resource pool associated to each one of the service blocks. In the collection enterblocks I selected the 5 enter blocks.

In the agent 'jobs' I have this. The parameters associated to each job, read from the database file, and the collection 'enternames' where I selected the machine(1,2,3,4,5) parameters and the collection 'ptimes' where I put the processing times of the job (This two colletions is where I am not sure I have done it correctly)

My database file

I am not sure how to use the counter used here How to store routings in job shop production in Anylogic. In the previous link the getNextService function is used in the exit blocks but I am also not sure how to use it in my case due to the counter.

解决方案

Firstly, to confirm that based on the Job agent and database view, the first line in the database will result in a Job agent with values such as:

  1. machine1 = 1 and process1=23
  2. machine2 = 0 and process2=82 and so on

If that is the intent, then a better way is to restructure the database, so there are two tables:

  1. Table of jobs to machine sequence looking something like this:
1machine2machine1machine4machine5machine3
2machine4machine3machine5machine1machine2
3...............
  1. Table of jobs to processing time

Then, add a collection of type ArrayList of String to Job (let's call this collection col_machineSequence) and when the Job agents get created their on startup code should be:

   for (String param : List.of("op1","op2","op3","op4","op5")) {
       col_machineSequence.add(getParameter(param));
   }

As a result, col_machineSequence will contain sequence of machines each job should visit in the order defined in the database.

NOTE: Please see help on getParameter() here.

Also:

  1. Putting a Queue in front of the Service isn't necessary
  2. Repeating Enter-Queue-Service-Exit isn't necessary, this can be simplified using this method


Follow-up clarifications:

  1. Collections - these will be enclosed in each Job agent
  2. Queue sorting - Service block has Priorities / preemption which governs the ordering on the queue
  3. Create another agent for the second table (call the agent ProcessingTime and table processing_time) and add it to the Job agent and then load it from database filtering on p_jobid as shown in the picture

这篇关于通过 anylogic 中的特定资源路由代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 05:41