AKPreference.serializers module

class AKPreference.serializers.ExportAKPreferenceSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Export serializer for AKPreference objects.

Used to serialize AKPreference objects for the export to a solver. Part of the implementation of the format of the KoMa solver: https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format#input–output-format

class AKPreference.serializers.ExportAKPreferencePerSlotSerializer(*args, **kwargs)[source]

Bases: BaseSerializer

Export serializer to associate AKPreferences with the AK’s AKSlot objects.

The AKPreference model stores the preference per AK object. The solver however needs the serialization to be per AKSlot, i.e. we need to ‘repeat’ all preferences for each slot of an AK.

Part of the implementation of the format of the KoMa solver: https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format#input–output-format

class AKPreference.serializers.ExportParticipantInfoSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Serializer of EventParticipant objects for the ‘info’ field.

Used in ExportParticipantSerializer to serialize EventParticipant objects for the export to a solver. Part of the implementation of the format of the KoMa solver: https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format#input–output-format

class AKPreference.serializers.ExportParticipantSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Export serializer for EventParticipant objects.

Used to serialize EventParticipant objects for the export to a solver. Part of the implementation of the format of the KoMa solver: https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format#input–output-format