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)
¶
get(event)
¶
set_conveyor_state(new_state)
¶
Set the conveyor state and manage belt store interrupts/resumes.
Parameters: |
|
---|