通过 anylogic 中的特定资源路由代理
Routing agents through specific resources in anylogic
我正在使用 anylogic 解决作业车间调度问题。我有 20 个工作(代理)和 5 个机器(资源),每个工作作为访问机器的特定顺序。我的问题是:如何确保每项工作都按顺序进行。
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
我不确定如何使用此处使用的计数器 How to store routings in job shop production in Anylogic。在之前的 link 中,getNextService 函数用于退出块,但由于计数器的缘故,我也不确定如何在我的案例中使用它。
首先,确认基于 Job 代理和数据库视图,数据库中的第一行将导致 Job具有以下值的代理:
machine1 = 1
和 process1=23
machine2 = 0
和 process2=82
等等
如果那是意图,那么更好的方法是重构数据库,所以有两个 tables:
- Table 个作业到机器序列看起来像这样:
job
op1
op2
op3
op4
op5
1
machine2
machine1
machine4
machine5
machine3
2
machine4
machine3
machine5
machine1
machine2
3
...
...
...
...
...
- Table 作业处理时间
然后,将 String
类型 ArrayList
的集合添加到 Job(我们称此集合为 col_machineSequence
),当 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));
}
因此,col_machineSequence
将包含每个作业应按照数据库中定义的顺序访问的机器序列。
注意:请参阅 help on getParameter() here。
还有:
- 没有必要在 服务 前面放置一个 队列
- 重复进入-队列-服务-退出 不是必需的,这可以使用 this method
简化
后续说明:
- 集合 - 这些将包含在每个 Job agent
中
- 队列排序 - 服务块具有优先级/抢占,它控制队列
的排序
- 为第二个table创建另一个代理(调用代理ProcessingTime和table
processing_time
)并将其添加到Job 代理,然后从 p_jobid
上的数据库过滤加载它,如图 所示
我正在使用 anylogic 解决作业车间调度问题。我有 20 个工作(代理)和 5 个机器(资源),每个工作作为访问机器的特定顺序。我的问题是:如何确保每项工作都按顺序进行。
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
我不确定如何使用此处使用的计数器 How to store routings in job shop production in Anylogic。在之前的 link 中,getNextService 函数用于退出块,但由于计数器的缘故,我也不确定如何在我的案例中使用它。
首先,确认基于 Job 代理和数据库视图,数据库中的第一行将导致 Job具有以下值的代理:
machine1 = 1
和process1=23
machine2 = 0
和process2=82
等等
如果那是意图,那么更好的方法是重构数据库,所以有两个 tables:
- Table 个作业到机器序列看起来像这样:
job | op1 | op2 | op3 | op4 | op5 |
---|---|---|---|---|---|
1 | machine2 | machine1 | machine4 | machine5 | machine3 |
2 | machine4 | machine3 | machine5 | machine1 | machine2 |
3 | ... | ... | ... | ... | ... |
- Table 作业处理时间
然后,将 String
类型 ArrayList
的集合添加到 Job(我们称此集合为 col_machineSequence
),当 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));
}
因此,col_machineSequence
将包含每个作业应按照数据库中定义的顺序访问的机器序列。
注意:请参阅 help on getParameter() here。
还有:
- 没有必要在 服务 前面放置一个 队列
- 重复进入-队列-服务-退出 不是必需的,这可以使用 this method 简化
后续说明:
- 集合 - 这些将包含在每个 Job agent 中
- 队列排序 - 服务块具有优先级/抢占,它控制队列 的排序
- 为第二个table创建另一个代理(调用代理ProcessingTime和table
processing_time
)并将其添加到Job 代理,然后从p_jobid
上的数据库过滤加载它,如图 所示