Automatic Planner - maar35/film-festival-planner GitHub Wiki
Automatic Planner
Responsibilities
- Automatically set screenings to
Attend by me, based on the ratings given to films. - To mark automatically planned screenings, so that they can be made visually recognizable in the Screenings View and the Film Info Dialog.
- Being able to undo the automatic planning.
Transition status
The automatic planner was originally written in C# and is being rewritten in Django.
The documentation below is covering the Django version, what still is implemented only in C# is listed below.
Way of working
- Only films are considered which have rating equal to or higher than
LowestPlannableRating, defined in the config. - Only films are considered which have screenings.
- Of those films, only screenings are considered that can be planned.
- Plannable screenings are sorted.
- Iterating the sorted list, each screening that still can be planned is marked as
Auto Plannedand set toAttended by me.
Films without screenings
Of course no screenings can be planned for films that have no screenings, but why do such films exist?
These films are screened as part of a combination program. For a combination program you can buy tickets, for the individual screened films you can't. It is the responsibility of the loader to guarantee that screened films have no screenings attached.
Plannable screenings
A screening is considered if it:
- Is screened in a theater with priority
High. This may be improved in future. - Is screened when the current fan is available.
- Is not attended by the current fan.
- Has enough travel time to adjacent screenings that are attended by the current fan.
Sorting order of selected screenings
Plannable screenings are considered in this order.
- Highest rating.
- Is attended by friend (preferred).
- Second highest rating.
- Screening has a Q&A (preferred).
- Number of screenings of the film (prefer less screenings).
- Screening duration (prefer shorter).
- StartTime (walk through screenings from the last screening on the last Festival day backward).
Still in C# code exclusively
Plannability criteria that are not in the Djangop version
- Is not sold out.
- Is not screened in a physical location when option
VisitPhysicalis off.
Plannability criteria that are not considered in OnDemand screenings):
- Screened when the current fan is available.
- Has enough travel time to adjacent screenings that are attended by the current fan.
OnDemand screenings
OnDemand screenings are OnLine screenings which can be viewed in a specific time window.
In the app, this means that they can be moved within that window within a day scheme and possibly between day schemes.
Because they can be moved, the automatic planner has different selection criteria.
When being planned, an OnDemand screening is handled as follows.
- If it's Plannable at its time window starttime, attend it there.
- If not move it to the latest time within its time window.
- If it's not Plannable at its latest time slot, try moving it backward in time until it fits or can't be moved.
- Screening is OnDemand is part of the sorting order.