It's often necessary to be find a conveyor connected to a fixed resource via an Exit/Entry transfer:
At the moment the only way to find the conveyor object is to read the variables tree of the transfer:
Object current = Model.find("Queue1"); Object exitTransfer = current.inObjects[1]; // workaround in FlexSim 23.2: return exitTransfer.find(">variables/transferPoint/1+/~");
This approach works but it feels more complicated than it should be (it's difficult to explain to new FlexSim users, it's not supported by autocomplete, it's difficult to remember).
There are already some specialized Flexscript classes like Conveyor.DecisionPoint and Conveyor.Item. It would be nice if transfers got the same treatment, and had a specialized Object subtype Conveyor.Transfer or Conveyor.ExitTransfer/Conveyor.EntryTransfer:
// proposal Object current = Model.find("Queue1"); Conveyor.Transfer exitTransfer = current.inObjects[1]; return exitTransfer.conveyor;
This is a possible list of properties
- .conveyor (to find the first associated conveyor)
this property can also be a pseudo array .conveyors to support inline, entry and exit transfers within the same Flexscript class - .distAlong (it's not a standard Property yet, is it)
- .isAtSide
- .distOffCenter
- .subtype (entry, exit, inline)
if the same class is used for all transfers
The Conveyor class should be updated and provide means to discover the list of all transfers:
Conveyor conv = current; return conv.conveyorPoints; // or return conv.transfers; or return conv.exitTransfers;
This Conveyor.conveyorPoints property would also resolve the issue of discoverying DecisionPoints given a conveyor (https://answers.flexsim.com/content/idea/145650/method-to-find-the-reference-of-conveyor-points-on.html)