π² Weekly Random Lottery Allocation
Another available feature is the weekly random lottery algorithm, designed to ensure a fair distribution of parking spaces when demand exceeds availability.
π― What does this algorithm do?
It allows you to define a day of the week on which a random lottery is automatically executed among the pre-bookings accumulated during the week. This process can include cars, motorcycles, and bicycles.
βοΈ Configuration
This feature is enabled per site. To configure it:
Select the corresponding site
Go to the site settings
Access the Parking module
Navigate to the "Allocation Algorithm" section
Enable the option "Weekly random lottery algorithm"
Choose the day on which the lottery will take place (e.g., Thursday)
Select the types of vehicles to include in the random allocation:
π Car
ποΈ Motorcycle
π² Bicycle
π Reservation statuses
Reservations can be in three states:
Requested / Pre-booking: The reservation has been requested but no space has been assigned yet
Reserved: The space has been successfully assigned
Rejected: No space was assigned in the lottery and there is no availability for the requested date
π‘ Note: A pre-booking that remains in βRequestedβ status is not considered rejected as long as there is still a possibility of assigning a space.
If a user cancels their reservation, the space is released and the algorithm runs again to reassign it among the pending pre-bookings.
β±οΈ When does it run?
On the configured day of the week (isLotteryDay)
Reactively, when a user releases a space
βοΈ How it works
Retrieves reservation requests for the entire following week
Assigns spaces through simple random allocation, without considering employee or zone priority
Groups reservations by shifts (morning, afternoon, full day)
Rejects reservations that exceed the number of available spaces
Removes transferred reservations from the previous day if applicable
π Notifications
To users with an assigned reservation
To users rejected due to lack of spaces (only if the variable "NotifyRejectedUsers" is configured via support)
To users who released their space, if it is reassigned
π Reports
The system can generate and send a report after allocation, depending on the configuration.

