*gasp* robot? what robot? we were suppose to build a robot? - LightWaves1636 [more]
 Chief Delphi OPR Formula
 CD-Media CD-Spy
 portal register members calendar search Today's Posts Mark Forums Read FAQ rules

#1
01-28-2012, 02:33 PM
 brennonbrimhall Lead Mentor AKA: Brennon Brimhall FRC #6844 (Provotypes) Join Date: Jan 2012 Rookie Year: 2012 Location: Provo, UT Posts: 389
OPR Formula

This is going to sound extremely stupid, but what is the formula for OPR?

#2
01-28-2012, 03:18 PM
 Tom Line Don't lay blame. Fix probems. FRC #1718 (The Fighting Pi) Team Role: Mentor Join Date: Jan 2007 Rookie Year: 1999 Location: Armada, Michigan Posts: 3,164
Re: OPR Formula

That is not a stupid question.

OPR is actually a system of simultaneous equations. The difficulty lies in solving that many simultaneous equations.

For instance. In a standard district event in Michigan, there might be 80 matches.

Each match has equations that lay out like this:
Robot_1_score+Robot_2_score+Robot_3_score=Red_Scor e
Robot_4_score+Robot_5_score+Robot_6_score=Blue_Sco re

So, in the end you'll have a system with 160 equations, and 40 variables (each robot is one variable, as shown in the equations above). The trick is solving those equations. Until just recently, excel didn't have the firepower to do it unless you used macros. However, with the newer versions, the Matrix formulas are powerful enough to do it. Keep in mind this isn't like algebra - the computer has to iterate to find an answer.

This is not a simple process. It is fairly complicated. Look up "solving simultaneous equations using matrices" in excel, and you should be able to find some examples. That is how we wrote our OPR. It requires pretty in-depth knowledge of excel though. You'll have to understand named arrays, matrix math functions, and array formulas.

2834 the Bionic Barons put out an awesome OPR sheet that handles the calculations through some open-source macro code. It is far more complex (to me) than using matrix formulae, because I have never used macros and vb programming in excel.

Of course, programs like matlab have more advanced equation solvers and you may be able to easily write a program to perform the calculations.

Last edited by Tom Line : 01-28-2012 at 11:53 PM. Reason: Corrected team number
#3
01-28-2012, 03:31 PM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: OPR Formula

Quote:
 Originally Posted by Tom Line So, in the end you'll have a system with 160 equations, and 40 variables (each robot is one variable, as shown in the equations above). The trick is solving those equations.
Tom,

I've done a fair amount of work with large overdetermined systems of equations (20,000 equations in 6,000 variables).

I'd like to play around with some of this data. Maybe I could write and post a small app. Do you know where I could get a couple of CSV, or whitespace-delimited, or fixed-field text files from 2011?

Thanks.

#4
01-28-2012, 03:59 PM
 Tom Line Don't lay blame. Fix probems. FRC #1718 (The Fighting Pi) Team Role: Mentor Join Date: Jan 2007 Rookie Year: 1999 Location: Armada, Michigan Posts: 3,164
Re: OPR Formula

I believe you can copy and paste from the old scores on the FIRST website. For instance, here:

http://www2.usfirst.org/2011comp/eve...chresults.html

That is how I developed ours. I've never tried to do the whole web-scrape or download the scores automatically as they are posted by FIRST. If, however, someone could explain how that's done it would be absolutely wonderful!
#5
01-28-2012, 06:07 PM
 plnyyanks Data wins arguments. AKA: Phil Lopreiato no team (The Blue Alliance) Team Role: Engineer Join Date: Apr 2010 Rookie Year: 2010 Location: NYC Posts: 1,217
Re: OPR Formula

Quote:
 Originally Posted by Tom Line I've never tried to do the whole web-scrape or download the scores automatically as they are posted by FIRST. If, however, someone could explain how that's done it would be absolutely wonderful!
In newer versions of Excel, go to the Data tab, and then click (under Get External Data - left most panel) "From Web". Then, you can put the URL of the results page into the little browser window that pops up and then select the table with match results. To refresh, click "Refresh All" in the Connections pane (still on the data tab).
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
The Blue Alliance | The Blue Alliance for Android | FRC Notebook
#6
01-28-2012, 06:13 PM
 MagiChau Registered User no team Join Date: Jan 2010 Rookie Year: 2010 Location: Michigan Posts: 875
Re: OPR Formula

Also, the FIRST FMS system uploads its data in twitter posts under @frcfms so you could scrape a lot more data from that since it tells of penalties point total for instance.
#7
01-28-2012, 06:25 PM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: OPR Formula

Quote:
 Originally Posted by plnyyanks In newer versions of Excel, go to the Data tab, and then click (under Get External Data - left most panel) "From Web". Then, you can put the URL of the results page into the little browser window that pops up and then select the table with match results. To refresh, click "Refresh All" in the Connections pane (still on the data tab).
Is there a CSV or whitespace-delimited or fixed-field text file somewhere that has all the scores from all the matches around the country (world) in one file for 2011?

#8
01-28-2012, 07:38 PM
 plnyyanks Data wins arguments. AKA: Phil Lopreiato no team (The Blue Alliance) Team Role: Engineer Join Date: Apr 2010 Rookie Year: 2010 Location: NYC Posts: 1,217
Re: OPR Formula

Quote:
 Originally Posted by Ether Is there a CSV or whitespace-delimited or fixed-field text file somewhere that has all the scores from all the matches around the country (world) in one file for 2011?
How's this? I just threw it together by scraping all the competitions and putting them in one big file.

Also, some fun facts I found:
- there were 5,258 FRC matches played in 2011
- There were 357,981 points scored total
- The average individual alliance score was 34.04 points
- The average total number of points per match was 68.08311145 points
- The highest alliance score was 147 points
Attached Files
 2011 matches.xlsx (253.4 KB, 159 views)
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
The Blue Alliance | The Blue Alliance for Android | FRC Notebook
#9
01-28-2012, 08:01 PM
 brennonbrimhall Lead Mentor AKA: Brennon Brimhall FRC #6844 (Provotypes) Join Date: Jan 2012 Rookie Year: 2012 Location: Provo, UT Posts: 389
Re: OPR Formula

Many thanks for all the info. Can I assume the same basic principles hold true with DPR as well?
#10
01-28-2012, 09:00 PM
 Alex.q Registered User FRC #2220 (Blue Twilight) Team Role: Alumni Join Date: Jan 2011 Rookie Year: 2008 Location: Eagan, Minnesota Posts: 163
Re: OPR Formula

Quote:
 Originally Posted by MagiChau Also, the FIRST FMS system uploads its data in twitter posts under @frcfms so you could scrape a lot more data from that since it tells of penalties point total for instance.
I was not aware of this. Would someone be able to tap this data during the tournament to feed it into a scouting program? How much information is available there?

Also, I know OPR means offensive power rating, but what does this actually mean?
#11
01-28-2012, 10:03 PM
 EricH New year, new team FRC #1197 (Torbots) Team Role: Engineer Join Date: Jan 2005 Rookie Year: 2003 Location: SoCal Posts: 22,011
Re: OPR Formula

Quote:
 Originally Posted by Alex.q I was not aware of this. Would someone be able to tap this data during the tournament to feed it into a scouting program? How much information is available there? Also, I know OPR means offensive power rating, but what does this actually mean?
IIRC, OPR is the expected points contribution of any given robot to an alliance.

DPR... I don't think anybody's ever come up with a good way to calculate that. First you have to find a way to calculate a defensive score...
__________________
Past teams:
2003-2007: FRC0330 BeachBots; 2008: FRC1135 Shmoebotics; 2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

#12
01-28-2012, 10:21 PM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: OPR Formula

Quote:
 Originally Posted by EricH IIRC, OPR is the expected points contribution of any given robot to an alliance. DPR... I don't think anybody's ever come up with a good way to calculate that. First you have to find a way to calculate a defensive score...
Couldn't you do it the same way Tom said he did the OPR, with the following twist?

Set up the equations like so:

red1+red2+red3 = blue_alliance_score

... then solve the system.

The lower the number, the better the DPR. Like golf.
#13
01-28-2012, 10:34 PM
 Ed Law Registered User FRC #0008 (formerly with 2834) Team Role: Mentor Join Date: Apr 2008 Rookie Year: 2009 Location: Foster City, CA, USA Posts: 760
Re: OPR Formula

http://www.chiefdelphi.com/media/papers/2174

I will post an updated 2012 version of the presentation file shortly.
__________________
Please don't call me Mr. Ed, I am not a talking horse.
#14
01-28-2012, 11:07 PM
 EricH New year, new team FRC #1197 (Torbots) Team Role: Engineer Join Date: Jan 2005 Rookie Year: 2003 Location: SoCal Posts: 22,011
Re: OPR Formula

Quote:
 Originally Posted by Ether Couldn't you do it the same way Tom said he did the OPR, with the following twist? Set up the equations like so: red1+red2+red3 = blue_alliance_score ... then solve the system. The lower the number, the better the DPR. Like golf.
Possibly. The hardest part about DPR is that a low blue_alliance_score could come from two possible sources. It could be that one or more red robots are playing really good defense. But, it could be that the blue alliance has a very low combined OPR (read: needs better offense even without defense being played). Without having an OPR-to-score comparison built in, there is no real way to determine whether red is playing good defense or blue is playing bad offense.

You might be able to do it with

red1+red2+red3 = blue_alliance_OPR - blue_alliance_score

and the higher the score the better (due to the OPR-score) but that involves knowing the blue alliance's combined OPR.
__________________
Past teams:
2003-2007: FRC0330 BeachBots; 2008: FRC1135 Shmoebotics; 2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

#15
01-28-2012, 11:48 PM
 Ed Law Registered User FRC #0008 (formerly with 2834) Team Role: Mentor Join Date: Apr 2008 Rookie Year: 2009 Location: Foster City, CA, USA Posts: 760
Re: OPR Formula

Quote:
 Originally Posted by EricH Possibly. The hardest part about DPR is that a low blue_alliance_score could come from two possible sources. It could be that one or more red robots are playing really good defense. But, it could be that the blue alliance has a very low combined OPR (read: needs better offense even without defense being played). Without having an OPR-to-score comparison built in, there is no real way to determine whether red is playing good defense or blue is playing bad offense. You might be able to do it with red1+red2+red3 = blue_alliance_OPR - blue_alliance_score and the higher the score the better (due to the OPR-score) but that involves knowing the blue alliance's combined OPR.
Numerically, DPR = OPR - CCWM (calculated contribution to winning margin). A team will have high DPR if their CCWM is low or negative comparing to OPR. Low DPR means a team is good in defense. Basically it means they do not allow their opponents to score much.
I do not agree with low DPR is a result of opposing alliance's inability to score. Over a number of matches, those teams with low OPRs will also cause other teams to experience the same thing. A team's DPR will only be higher or lower based on how they perform on average comparing to other teams. Remember OPR, DPR and CCWM are all calculations of that team's calculated contribution.
__________________
Please don't call me Mr. Ed, I am not a talking horse.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is Off HTML code is Off
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum         FIRST E-Mail Blast Archive     Rumor Mill     Career     Robot Showcase Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         C/C++         Java         Python     Control System         FRC Control System         Sensors     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics     National Instruments LabVIEW and Data Acquisition         LabView and Data Acquisition Competition     Unsung FIRST Heroes     Awards         Chairman's Award     Rules/Strategy         Scouting         You Make The Call     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     District Events     Off-Season Events     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A         OCCRA Programming Other     Chit-Chat         Games/Trivia             Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         Western Region Robotics Forum         Southern California Regional Robotics Forum         The Blue Alliance             Video Archives     FIRST In the News...     FIRST Lego League         Lego Mindstorm Discussion     FIRST Tech Challenge     VEX         VEX Robotics Competition         VEX IQ     Televised Robotics     Math and Science         NASA Discussion ChiefDelphi.com Website     CD Forum Support     Extra Discussion

All times are GMT -5. The time now is 07:09 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Archive - Top