View Single Post
  #2   Spotlight this post!  
Unread 19-10-2016, 08:57
sirwin sirwin is offline
Registered User
AKA: Stacy Irwin
FRC #1318 (Issaquah Robotics Society)
Team Role: Mentor
 
Join Date: May 2016
Rookie Year: 2016
Location: Bellevue, WA
Posts: 10
sirwin is a glorious beacon of lightsirwin is a glorious beacon of lightsirwin is a glorious beacon of lightsirwin is a glorious beacon of lightsirwin is a glorious beacon of lightsirwin is a glorious beacon of light
Re: R Package for Downloading FIRST API Data

With respect to speeding up the calculation, I had a thought.

It takes my algorithm 9 seconds to produce the 2696 x 2696 A matrix -- but updating the A matrix with new match data should be nearly instantaneous. For every new match, we just have to add 1 to 18 different elements in the A matrix (all other A matrix elements will remain unchanged). Each element of the a matrix is directly accessible by team numbers. So it takes 13 seconds to calculate world OPR from scratch, but as long as we retain the A matrix, it should only take about 5 seconds to update world OPR with new match data. That's 2 seconds for updating the A and B matrices and 3 seconds for solving for OPR.

Of course, this is assuming that R's underlying C code doesn't do anything stupid, like extracting an array element by going through every array element until it gets to the right one. Also, the A matrix would need to be maintained in memory -- disk access would slow things down.
Reply With Quote