简体   繁体   中英

Returns resource units currently seized by this agent But for Transporters

resourceUnitsOfSeize (Agent Seize); Returns resource units currently seized by this agent from the given ResourcePool block. But if I have TransporterFleet instead of resourcePool what is the alternative code to get the transporter unit currently seized by this agent?

I have a trench agent which is a material type agnet. It siezed an excavator from excavatorFleet in a transpoter flow block called seizeExc. So I used the following function and I got the following error: I tried to use the same code but it did not work. 在此处输入图像描述

在此处输入图像描述

How to do this please? Thanks.

Second Error: 在此处输入图像描述

The same code is working for any Seize block. I changed the Return Value type to other; List of Excavator , and I typed return resourceUnitsOfSeize(seizeExc);

instead of return trenchRoom.resourceUnitsOfSeize(seizeExc);

Also for the same purpose, we can use another function with the following properties: Type: Collection ResourceRequest and Function body: return excavatorFleet.getRequests();

Hopefully In both cases I can get transporters that have been seized by a trenchRoom agent.

:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM