ConveyorLogic module

class ConveyorLogic.ConveyorLogic(width, height, in_out_pos)[source]

Bases: DirectionalElement, GridElement

This class contains all the constraints that implement the logic of the conveyors. Note that all the constraints of the model are explained in detail in the project report.

Parameters:
  • width (Int) – Width of the blueprint

  • height (Int) – Height of the blueprint

  • in_out_pos (Dictionary) – Contains the input and output positions and type of item carrying

constraints()[source]

Creates a list of all the constarints representing the logic of the class

Returns:

all the constraint of the class logic in a single array

Return type:

Array

conveyor_input()[source]

Creates the constraint that ensures the input of a conveyor is a valid element, in all the three valid input positions of a conveyor there can only be inserters or other convetors pointing towards it

Returns:

List with all the logic regarding the constarint

Return type:

Array

conveyor_output()[source]

Creates the constraint that ensures the output of a conveyor is a valid element, the output cell of a conveyor can only be another conveyor that is not pointing to it, or an inserter pointing in the same direction of the conveyor.

Returns:

List with all the logic regarding the constarint

Return type:

Array

end_of_route()[source]

Creates the constraint that ensures the conveyor at the output of the blueprint doesn’t have any other conveyor in the direction its pointing.

Returns:

List with all the logic regarding the constarint

Return type:

Array

set_inserter(inserter)[source]

Setter of the variable inserter

Parameters:

inserter (Arrat[Array] EnumSort) – reference to the variable inserter