2017-09-04 69 views

回答

2

是的,您可以使用「#」指令來實例化多個相同類型的代理。在你的代碼的確切對應關係是:

MAS testMAS { 

    infrastructure: Centralised 

    agents: 
     p participant #3; 

    aslSourcePath: 
     "src/asl"; 
} 

通過這種方式,代理P1,P2和P3將使用participant.asl代碼來創建。

相關問題