anylogic中如何在特定条件下将坐席从等待块中释放出来?

问题描述 投票:0回答:1
List<Bulk_Container> L1 = findAll(wait3, p -> p.Board_Type == agent.Board_Type);
// Create a list of products that belong to the same client as the agent that arrived.
int orderSize = 0;
if(agent.quantity>0){
orderSize = agent.quantity+1;
}
if (L1.size() == orderSize) {
    // Check if the batch size is reached.
    batch1.set_batchSize(agent.quantity);

    for (Bulk_Container p : L1) {
        wait3.free(p);
    }
} else {
    // Handle the case when the mother agent arrives early.
    // Use the mother agent's quantity as a local variable.
    int motherAgentQuantity = agent.quantity;
    // Additional logic here...
    // Place your code here to handle the early arrival scenario.
}

我有一些容器在区块中等待,agent.quantity = 0。还有另一个代理(实际上是订单,但代理类型与前一个代理类型相同),其代理数量>0。

现在的挑战是,

如果订单代理在等待块中首先到达,则当其他代理到达时我无法获取 agent.quantity 值。请注意,其他代理只是在等待区等待,没有标签。

但是如果订单代理迟到的话也没关系。所以我的想象是,有没有一种方法可以在每次其他代理到达时使用订单代理的值???

所以我只需要获取值为 Board_Type 的产品的确切类型。

anylogic
1个回答
0
投票

请使用拾取块!!!!简单。

© www.soinside.com 2019 - 2024. All rights reserved.