2017-03-09 100 views
0

我目前正在AnyLogic建立一家工廠的模型,我還沒有弄清楚如何通過工廠流程來區分不同的產品。我使用延遲來建模循環時間,但是我希望循環時間根據機器工作的產品而不同。 對於如何做到這一點的任何提示,我非常感激!AnyLogic產品(代理)差異化

/Christoffer

回答

0

anylogic的基本概念是代理人。瞭解它們對於使用anylogic至關重要。 (在這裏找到更多信息Anylogic doc
的基本想法是,你代表你的產品作爲代理人,與參數,功能,狀態圖等
例如,你可以有一個代理類型「汽車」與參數,如:。

int number_of_wheels = 4; 
String carType = "sportscar"; 

enter image description here enter image description here

當與如處理它們的「流程建模庫」你提取您的代理信息這與關鍵字進行:。。。「代理人」如agent.carType可以使用該信息來確定延遲功能:

int delay_function(Car agent){ 
    if(agent.carType.equals("truck") 
     return 5; 
    else if(agent.carType.equals("sportscar") 
     return 10; 
} 

當您輸入延遲時,您要指定延遲時間。您可以使用如下功能:delay_function(agent)

enter image description here