A variation of Priority Queues where the priority of elements can change dynamically based on their relationships with other elements in the queue
Israeli Queues are a playful take on this real-world behavior, where the priority of elements in the queue is influenced not only by their inherent priority but also by their relationships to other elements already in the queue. This results in a more complex and realistic simulation of how queues might work in certain social contexts.
- Dynamic Priority: Unlike traditional priority queues where each element has a fixed priority, in Israeli Queues, the priority can change based on the position and relationship with other elements in the queue.
- Group Influence: Elements can be grouped, and elements within the same group may join each other, altering the order of the queue.
- Real-World Simulation: This algorithm provides a closer approximation to real-world scenarios where social relationships and behaviors affect queuing order.
- Event Management: Israeli Queues can be used in event management systems where attendees might have VIP passes or group entries that allow them to join the queue at different points.
- Customer Service: In customer service scenarios, regular customers or members of loyalty programs might receive different queuing treatment.
- Simulation and Modeling: This concept can be used in simulations that require a more nuanced approach to queuing, reflecting human social behaviors.
To get the module working simply follow these steps:
pip install IsraeliQueue
Returns: [Item(item='Noy', group=0), Item(item='Nitzan', group=0), Item(item='Omry', group=1), Item(item='Omer', group=1), Item(item='Oz', group=1), Item(item='Alma', group=2)]
Returns: [[2, 4], ['Alex', 'Robert'], [[0.4, 0.9]]]
Distributed under the MIT License. See LICENSE.txt
for more information.
- Project Link: https://github.com/YonLiud/Israeli-Queue
- PyPI Link: https://pypi.org/project/IsraeliQueue/