The purpose of this post is to explain exactly how to calculate the sub-OPR, i.e. autonomous OPR, teleop OPR, climb OPR to adjust for issues with surrogate matches, no shows and DQ matches. I would like to ensure all programs that calculate OPRs will give identical results so users can trust the data.
Ether explained the issue very well at http://www.chiefdelphi.com/forums/showpost.php?p=1276151&postcount=22 so I am not going to repeat it.
It is fairly easy to find out what the missing scores are whether it is due to surrogate match, no show or DQs. If you add up all the scores from all of the team’s matches, and then subtract the AP, CP and TP from the Team Standings data, you will get the missing score.
When solving for A x = b, imagine b is the missing score vector, we can solve for x which represents how much effect it has on each of the teams due to the missing score.
Hence it is possible to scale the score vector b before calculating the OPR which is x in the equation.
Considering the fact that if A x1 = b1, A x2 = b2, then it is true that A (x1+x2) = b1+b2. In my program, it is much easier to scale the x than to scale the b, so that’s what I did.
Here are the codes I used shown in pseudo code
shift = OPR - (OPR_auto + OPR_tele + OPR_climb)
sum = abs(OPR_auto) + abs(OPR_tele) + abs(OPR_climb)
OPR_auto = OPR_auto + shift * abs(OPR_auto) / sum
OPR_tele = OPR_tele + shift * abs(OPR_tele) / sum
OPR_climb = OPR_climb + shift * abs(OPR_climb) / sum
Example: Finger Lakes Team 4023
All teams were schedueld to play 9 matches. Team 4023’s record was 1-6 which means they missed two matches. The alliance in those two matches scored a total of 92 points which is missing from the calculation of Team 4023’s sub-OPR score. It makes their sub-OPR number even worse. The side effect is it also affect all the other team’s sub-OPR numbers.
Using old way of calculating sub-OPR,
OPR_auto = -3.9
OPR_climb = -8.3
OPR_tele = 0.6
Using the new proposed way of calculating sub-OPR,
OPR_auto = 0.0
OPR_climb = -0.1
OPR_tele = 1.3
This matches the overall OPR of 1.2 much better and a better estimate of what actually happened than a OPR_climb of -8.3. I also compared a few other cases and I am very happy with the results but I am not listing them here. Check it out and let me know what you think.