AKSolverInterface.lookup module
Preparation of the data for the ID lookup step of the automatic scheduling workflow
Allows to look up the objects behind the IDs used in the solver export and the solver output without any API calls: All necessary information is serialized here and embedded into the page.
Each object is represented as a dict with the keys
title: string representationfields: list of[label, value]pairs, values are either strings or lists of references to other objects that can be looked up as well (dicts withtype,idandlabel)links: list of dicts withtextandurl(frontend detail views and admin edit views)
- AKSolverInterface.lookup.lookup_aks(event: Event) dict[source]
Serialize all AKs of the event (export:
info.django_ak_idof the AK slots)
- AKSolverInterface.lookup.lookup_slots(event: Event) dict[source]
Serialize all AK slots of the event (export:
idof the AK slots, also used in conflicts, dependencies and preferences)
- AKSolverInterface.lookup.lookup_rooms(event: Event) dict[source]
Serialize all rooms of the event (export:
idof the rooms)
- AKSolverInterface.lookup.lookup_timeslots(event: Event) dict[source]
Serialize all timeslots of the discretization used in the export (export:
idof the timeslots in the blocks, solver output:timeslot_ids)The timeslots are linked to the default slots containing them.
- Raises:
ValueError – if the timeslots cannot be generated (e.g., because of partially overlapping default slots)
- AKSolverInterface.lookup.lookup_participants(event: Event) dict[source]
Serialize all participants of the event (export:
idof the participants)Includes the dummy participants generated for the AK owners during export (see
AKSolverInterface.serializers.ExportParticipantAndDummiesSerializer). Their IDs are computed in the same way, assuming that preferences were exported.