问题描述
我正在解决一个求助于任何逻辑的作业车间调度问题.我有 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.
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:
machine1 = 1
andprocess1=23
machine2 = 0
andprocess2=82
and so on
If that is the intent, then a better way is to restructure the database, so there are two tables:
- Table of jobs to machine sequence looking something like this:
1 | machine2 | machine1 | machine4 | machine5 | machine3 |
2 | machine4 | machine3 | machine5 | machine1 | machine2 |
3 | ... | ... | ... | ... | ... |
- 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:
- Putting a Queue in front of the Service isn't necessary
- Repeating Enter-Queue-Service-Exit isn't necessary, this can be simplified using this method
Follow-up clarifications:
- Collections - these will be enclosed in each Job agent
- Queue sorting - Service block has Priorities / preemption which governs the ordering on the queue
- 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 onp_jobid
as shown in the picture
这篇关于通过 anylogic 中的特定资源路由代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!