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.

Way of working

Only films are considered which have rating equal to or higher than FilmRating.LowestSuperRating.

Only films are considered which have screenings.

Only films are considered that are plannable.

Plannable screenings are sorted and then set to Attended by me if that's still possible.

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 when I am available (not considered in OnDemand screenings)
  • Is not attended by me
  • Screens in an eligible [theater].
  • Has enough travel time to adjacent screenings that are attended by me (not considered in OnDemand screenings)
  • Is not sold out
  • Is not screened in a physical location when option VisitPhysical is off

Sorting order of selected screenings

Plannable screenings are considered in this order.

  • Is attended by friend (preferred).
  • Screening has status Free, meaning that screening doesn't overlap a screening attended by me (or hasn't enough travel time), screening is not attended by a friend, and film is not attended by me in another screening.
  • Screening has a Q&A (preferred).
  • Number of screenings of the film (prefer less screenings).
  • Screening is OnDemand.
  • StartTime (walk through screenings from the last screening on the last Festival day backward).

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.