gpt4 book ai didi

How to vary the interarrival rates based on agent type in anylogic?(在任何逻辑中,如何根据代理类型改变到达间隔率?)

转载 作者:bug小助手 更新时间:2023-10-24 21:35:47 29 4
gpt4 key购买 nike



I am working on a model, where I want to vary the interarrival rates of agents based on parameter Type.

我正在研究一个模型,在该模型中,我希望根据参数类型改变代理的到达间隔率。


I have a parameter Type of Option List containing type2 and type7.

我有一个包含Type2和Type7的选项列表参数Type。


I tried to change the arrival rates with agent.Type == type2 ? (triangular(1,2,3)) : 50 but this is not working.

我试图通过代理商更改到达率。type==type2?(三角形(1,2,3)):50,但这不起作用。


enter image description here


更多回答

if you are talking about the source, you need to have 2 sources if you want different rates... each source will generate its own agent type

如果你谈论的是来源,如果你想要不同的费率,你需要有2个来源…每个源都将生成其自己的代理类型

Suppose, I have 1 product with three variants type1, type2, and type3. Now I want different arrival rates for the variant products. e.g type 1 --- exponential(2) days, type3 --- exponential(3) days, and type2---exponential(1) days I dont want to use different source blocks, as it will generate all three variants but I will only be able to set only one arrival rates.

假设我有一个产品,它有三个变体type1、type2和type3。现在我希望不同的产品有不同的到货率。例如,类型1-指数(2)天、类型3-指数(3)天和类型2-指数(1)天我不想使用不同的源块,因为它将生成所有三个变量,但我将只能设置一个到达率。

still need 3 sources, if you don't want to use 3 sources, you will need to generate the agents by code and take them to an enter block, but then you will need 3 events

仍然需要3个源,如果您不想使用3个源,您将需要通过代码生成代理并将它们带到Enter块,但随后您将需要3个事件

how come you say you want to set ONE arrival rate and 3 arrival rates at the same time?

为什么你说你想同时设置一个到达率和三个到达率?

优秀答案推荐

First, a source can only contain one unique arrival rate, you can change the arrival rate during the simulation run with the function set_rate(), but you cannot have multiple arrival rates in a single source.

首先,一个来源只能包含一个唯一的到货率,您可以在模拟运行期间使用函数set_rate()更改到货率,但不能在单个来源中有多个到货率。


In order to have multiple rates, you will be forced to have multiple sources... you can use population of sources, but it's conceptually not different.

为了拥有多个费率,您将被迫拥有多个来源...你可以使用来源的总体,但它在概念上没有什么不同。


Another option is to have multiple events with multiple rates and use 1 enter block to generate your agents, in each event you will need to do

另一种选择是让多个事件具有多个费率,并使用1个Enter块来生成您的代理,在每个事件中您都需要这样做


MyAgent m=add_myAgents(type);
enter.take(m);

更多回答

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com