Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are scheduling rules parameter "Max in a row" & "Min Wait" misnamed ? #986

Open
fpeyraud opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@fpeyraud
Copy link
Contributor

fpeyraud commented Oct 7, 2024

Hi
I was questioning myself of the coded behavior of "Max In A Row" and "Min Wait" in order to ban some scheduler codes from certain clocks (which is "Max In a Row = 0") and how to code rules that set no restriction (which is "Max In A Row = 1 and Min Wait = 0").

Analyzing the algorithm, I wonder whether "Max In A Row" is the correct name, or should be renamed "Max In A Range". Let me explain the use-case :
Let's assume we have music style scheduler codes ROCK, CLASSICAL, ELECTRONICA, we have no title nor artist separation for any event, and a clock with scheduler rules such as Max In A Row (MIAR) is 2, and Min Wait (MW) is 5 for ELECTRONICA scheduler code and MIAR = 1 and MW = 0 for ROCK and CLASSICAL scheduler codes.
Let's say we have already scheduled 8 songs, all having either ROCK or CLASSICAL scheduler codes

The next song can either be any of the sched code without breaking any rule. Let's say an ELECTRONICA song has been scheduled

Next scheduling rule will check the "deconflicting rules" looking in the stack, finding one single ELECTRONICA line in the last 6 lines "range" (2+5-1). Everything is OK ELECTRONICA is not disqualified for this round, just like other sched codes. The dices roll and a ROCK song is elected this time. Fine !

Next scheduling round, same business : only one ELECTRONICA song in the last 6 lines. But this time, an ELECTRONICA song is selected. If we look at the stack we see these sched code sequence (yes, we love eclecticism ^^) :

  • ROCK
  • CLASSICAL
  • ROCK
  • CLASSICAL
  • ROCK
  • CLASSICAL
  • CLASSICAL
  • ROCK
  • ELECTRONICA
  • ROCK
  • ELECTRONICA

Next scheduling round, the test will find 2 ELECTRONICA songs in the last 6 scheduled songs, which is >= the "allowed" Max In A Row parameter. This time, ELECTRONICA scheduler code is disqualified. And the same for the 3 following rounds, according to the "Min Wait" parameter. After that, the stack would look like :

  • ROCK
  • CLASSICAL
  • ROCK
  • CLASSICAL
  • ROCK
  • CLASSICAL
  • CLASSICAL
  • ROCK
  • ELECTRONICA
  • ROCK
  • ELECTRONICA
  • CLASSICAL
  • ROCK
  • ROCK
  • CLASSICAL

At this point, there would be only one ELECTRONICA song in the last 6 lines, so this scheduler code becomes eligible again.

My understanding of the algorithm is that is allows "Max In A Row" of the considered scheduler code in the last ("Max In A Row" + "Min Wait") lines.

So yes, the "Max In A Row" do prevent from having too many times the same scheduler code in a row, but also prevent from having this scheduler code in the "MIAR + MW" range. So it looks more like a "Max In A Range" parameter

And it seems that the "Min Wait" is not defining a delay between scheduler code occurrence, but only implied in the sliding window definition

If you confirm my understanding, then maybe, the current wording should be modified to reflect the actual behavior. The behavior as it is now is interesting because it allows tuning the scheduler code occurrence frequency (useful in France with our french-speaking quotas). And I feel like true "Max In A Row" and "Min Wait" parameters would also definitely make sense to have in the scheduling process in order to avoid repetitions and create diversity.

Thanks for your feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant