Material item functions

Material items operating in a Material Handling Library flowchart provide the following functions:

Convey

void conveyTo(ConveyorPath conveyor, double offset, LengthUnits unit, ConveyorPath[] conveyorsToAvoid) - Sets a certain point on the conveyor as the new destination for the conveyed material item. The function can be called only while the material item is located in Convey block.
Parametersconveyor - name of the destination conveyor;
                   offset - distance from the source point of the conveyor to the destination point;
          unit - a constant defining the length units;
                   conveyorsToAvoid - conveyors which should not be included in the item's route.

void conveyTo(PositionOnConveyor positionOnConveyor, ConveyorPath[] conveyorsToAvoid) - Sets the specific position on conveyor as the new destination for the conveyed material item. The function can be called only while the material item is located in Convey block.
Parameters: positionOnConveyor - name of the Position on conveyor element;
          conveyorsToAvoid - conveyors which should not be included in the item's route.

void conveyTo(ConveyorSimpleStation simpleStation, ConveyorPath[] conveyorsToAvoid) - Sets the specific station as the new destination for the conveyed material item. The function can be called only while the material item is located in Convey block.
ParameterssimpleStation - name of the Station element;
                   conveyorsToAvoid - conveyors which should not be included in the item's route.

void conveyTo(ConveyorCustomStation customStation, ConveyorPath[] conveyorsToAvoid) - Sets the specific custom station as the new destination for the conveyed material item. The function can be called only while the material item is located in Convey block.
Parameters: customStation - name of the Custom station element;
                   conveyorsToAvoid - conveyors which should not be included in the item's route.

void conveyTo() - This function is called to update the material item's route while the material item is located in Convey block. The update is required if the item has entered the block and received its instructions on movement, but an obstacle appeared that would prevent the material item from reaching its destination. Upon calling this function, the material item receives "recalculated" routing information and moves accordingly.

Position on conveyor

List<ConveyorPath> getConveyors() - Returns the conveyor where the material item is currently located. If the material item is currently moving from one conveyor to another, the function returns both conveyors.

Position getLeadingEdgePosition() - Returns the Position object with coordinates and orientation of the point where the material item's leading edge is currently located.

Position getTrailingEdgePosition() - Returns the Position object with coordinates and orientation of the point where the material item's trailing edge is currently located.

ConveyorPath getLeadingEdgeConveyor() - Returns the conveyor where the leading edge of the material item is currently located.

ConveyorPath getTrailingEdgeConveyor() - Returns the conveyor where the trailing edge of the material item is currently located.

double getLeadingEdgeOffset(LengthUnits units) - Returns the distance from the source point of the conveyor to the current location of the material item's leading edge.
Parameterunits - a constant defining the length units.

double getTrailingEdgeOffset(LengthUnits units) - Returns the distance from the source point of the conveyor to the current location of the material item's trailing edge.
Parameterunits - a constant defining the length units.

Orientation

boolean canChangeOrientationOnConveyor(AgentOrientation orientation) - This function is called to check whether it is possible to change the orientation of the material item on the conveyor. If the function returns true, the orientation can be changed. If the function returns false, the orientation cannot be changed.

AgentOrientation getOrientationOnConveyor() - Returns current orientation of the material item on the conveyor (i.e. which side of the item faces the direction of the conveyor movement). Valid values are AGENT_ORIENTATION_FRONT, AGENT_ORIENTATION_REAR, AGENT_ORIENTATION_LEFT, AGENT_ORIENTATION_RIGHT.

void setOrientationOnConveyor(AgentOrientation orientation) - Sets orientation of the material item on the conveyor.
Parametersorientation - side of the material item. Valid values are AGENT_ORIENTATION_FRONT, AGENT_ORIENTATION_REAR, AGENT_ORIENTATION_LEFT, AGENT_ORIENTATION_RIGHT.