ConveyorBelt

Bases: Edge

A conveyor belt system with optional accumulation.

Attributes:

capacity (int): Maximum capacity of the belt.
state (str): state of the conveyor belt.
delay (float): Time interval between two successive movements on the belt.
accumulation (bool): Whether the belt supports accumulation (1 for yes, 0 for no).

is_empty()

Check if the belt is completely empty.

is_full()

Check if the belt is full.

can_get()

Check if an item can be retrieved from the belt.

is_stalled()

Check if the belt is stalled due to time constraints.

can_put()

Check if an item can be added to the belt.

put(event, item)

Put an item into the belt.

Parameters

event : simpy.Event The event that was reserved for putting an item. item : Item The item to be put on the belt.

Returns

simpy.Event An event that will be triggered when the item is successfully put on the belt.

get(event)

Get an item from the belt.

Parameters

event : simpy.Event The event that was reserved for getting an item.

Returns

Item The item retrieved from the belt.

set_conveyor_state(new_state)

Set the conveyor state and manage belt store interrupts/resumes.

Parameters:
  • new_state (str) –

    The new conveyor state