question

Guldberg avatar image
0 Likes"
Guldberg asked Arun Kr edited

Find conveyor based on transfer point

I found a post mentioned how to get the transfers from a specific conveyor, but I need to do the reverse. On my AGV network I drop off to a entrytransfer, but before I do, I want to check if the conveyor is already occupied.

/**Custom Code*/
TaskExecuter current = param(1);
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);


Object DropoffEntryTransfer = token.destination; / <- This is the EntryTransfer

Object DropoffConveyor = DropoffEntryTransfer.??? / <- How do I find the conveyor the entrytransfer is connected to?

int DropoffConveyorContent = DropoffConveyor.subnodes.length;

print(dropoffconveyorContent);


FlexSim 24.0.0 beta
conveyorsystem
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Arun Kr avatar image
0 Likes"
Arun Kr answered Arun Kr edited
Object DropoffEntryTransfer = token.destination;
treenode TransferPoint = getvarnode(DropoffEntryTransfer,"transferPoint"
treenode CovPointNode = TransferPoint.first.value
Object conv = ownerobject(CovPointNode); // Ref of conveyor
print(conv.name);
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.