[SCHEDULER-944]  Randomize choice of next plan to run when several have same efficiency function
Type Enhancement
Priority Medium
Severity Trivial
Component Dispatch Scheduler Engine
Fixed In Version [8.08.0
Versions Affected [3.5.33.5.3
Severity Closed
Resolution Complete
Reported By Bob Denny
Resources Bob Denny
Start Date 11/16/2014

Description
When several plans have the same calculated efficiency function value, the dispatcher prefers those which were entered into the database last. Instead, this should be a random choice, or maybe choose from the ones that were entered first. Maybe that could be an option (prefer oldest, random, prefer newest)?

Comments
11/16/2014 5:38:29 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 430
Affected files /trunk/AcquireScheduler.vbs (Modified)
/trunk/Help/RelNotes.htm (Modified)
/trunk/Scheduler/Engine.cs (Modified)
Check-in comment Randomize choice of next plan to run when several have same efficiency function GEM:944
11/16/2014 5:34:16 PM   Bob Denny
Take a shallow copy of the pending Plans, perform a Fisher-Yates shuffle then use that shuffled list to do the selection. This effectively randomizes it because the Eff values are never really equal, they monotonically increase of decrease within a set of "identical" plans (maybe just a filter difference).
11/16/2014 4:51:01 PM   Bob Denny
THis is really crazy. WHat's happening is that as the scheduler checks the Efficiency function, the time is increasing, and the Efficiency changes just an RCH so you can't test for equality and collect them for random selection. It looks like all of the eligible plans will have to be randomized in their order first, then selected.