AKSolverInterface.checks module

Checks of the preference data used for automatic scheduling (see automatic scheduling workflow in AKSolverInterface.views)

AKSolverInterface.checks.participants_required_for_too_many_slots(event: Event) → list[dict][source]

Get all participants that are required for more AK slots than there are default slots

Since a participant cannot attend multiple slots at the same time, these requirements can probably not all be fulfilled (unless multiple slots fit into a single default slot one after another).

Parameters:

event – event to check (should have default slots)

Returns:

list of violations, each a dict containing the participant, the list of their required preferences, the number of slots of the required AKs and the number of default slots

Return type:

list[dict]

AKSolverInterface.checks.required_preferences_without_overlap(event: Event) → tuple[list[dict], list[dict] | None][source]

Check for every required preference whether the availabilities of the AK and the participant overlap long enough to place the longest slot of the AK

Participants without availabilities are treated as available during the whole event, AKs without (valid) availabilities cannot be placed at all (same semantics as for the solver export).

Two variants are checked:

  • loose: The overlap of AK and participant availabilities contains a window at least as long as the longest slot of the AK (see AKPreference.checks.availability_overlap(), the same check is used when participants enter their preferences)

  • strict: Only the parts of the overlap inside default slots intended for the category of the AK are considered, one of these parts has to be at least as long as the longest slot of the AK (only checked if the event has default slots)

Parameters:

event – event to check

Returns:

two lists of violations (loose and strict, the latter is None if there are no default slots), each violation is a dict containing the preference, the duration of the longest slot and the length of the longest window available for the respective check

Return type:

tuple[list[dict], list[dict] | None]