Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Extra Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=68)
-   -   paper: New Scouting Database from Team 2834 (http://www.chiefdelphi.com/forums/showthread.php?t=70111)

Killraine 12-03-2009 12:55

Re: paper: New Scouting Database from Team 2834
 
Quote:

Originally Posted by Phyrxes (Post 835119)
Well the guys from TBA just posted such a request, hopefully people read it and e-mail them pictures.

:P That was me

Could anyone write a program that downloads the picture at http://www.thebluealliance.net/tbatv.../2009/####.jpg (where #### is the team number) and puts it into a folder? You would just have to run the program once and then drop the spreadsheet in there and it would have all the pictures that are currently on TBA. Basically create a matrix of team numbers (already together as Column A on the sheet "2009 Teams") and then use a loop to go through the list and download the picture to a folder on the desktop.

In psuedo-code:
Code:

for(<Every value in the matrix>)
if(http://www.thebluealliance.net/tbatv/pictures/2009/####.jpg exists)
Download the file at the link to "/Desktop/2009 FRC Pictures";

If you wanted to go all the way, you could have it so when the program creates the matrix, it first checks "/Desktop/2009 FRC Pictures" it only adds the teams from the list that you don't already have. Then, if there is a way to include that program in a startup script for this excel document, you would always have an updated set of photos from TBA.

I'm pretty sure you can do all of this in c++ except maybe the part where excel runs the program before opening the spreadsheet. But then again, its not that much of a hassle to click a .exe before opening up the spreadsheet.

Ed Law 12-03-2009 15:44

Re: paper: New Scouting Database from Team 2834
 
Quote:

Originally Posted by Killraine (Post 835120)
:P That was me

Could anyone write a program that downloads the picture at http://www.thebluealliance.net/tbatv.../2009/####.jpg (where #### is the team number) and puts it into a folder? You would just have to run the program once and then drop the spreadsheet in there and it would have all the pictures that are currently on TBA. Basically create a matrix of team numbers (already together as Column A on the sheet "2009 Teams") and then use a loop to go through the list and download the picture to a folder on the desktop.

In psuedo-code:
Code:

for(<Every value in the matrix>)
if(http://www.thebluealliance.net/tbatv/pictures/2009/####.jpg exists)
Download the file at the link to "/Desktop/2009 FRC Pictures";

If you wanted to go all the way, you could have it so when the program creates the matrix, it first checks "/Desktop/2009 FRC Pictures" it only adds the teams from the list that you don't already have. Then, if there is a way to include that program in a startup script for this excel document, you would always have an updated set of photos from TBA.

I'm pretty sure you can do all of this in c++ except maybe the part where excel runs the program before opening the spreadsheet. But then again, its not that much of a hassle to click a .exe before opening up the spreadsheet.

I asked Greg Marra of TBA about a year ago about this. This was his reply.

Quote:

Install the Firefox "Down Them All" plugin. It lets you download all the links on a single page by right clicking then selecting "down them all".

Then you can go here: http://www.thebluealliance.net/tbatv/pictures/2008/ which is a page linking to all of the 2008 team photos.

Just use down them all to grab every single picture in one go
For this year's photo, just substitute 2009 for 2008. This way they can all be in the same folder as the Scouting spreadsheet. "Down Them All" is quite powerful. It will probably give you options not to download a file if it already exists in your folder. Downloading all the pictures every time takes quite a bit of time and is not practical.

Ed Law

Ed Law 12-03-2009 17:20

Re: paper: New Scouting Database from Team 2834
 
I would like to spend some time to clarify regarding the different rankings OPR, DPR, CCWM and PMR (plus/minus ranking). I tried to explain this in another post but I was rushing and didn't explain fully.

If we look at the system of equations to calculate OPR, it is

A * OPR = B(opr)

B(opr) is assembled by adding the scores of every match each team was involved in

and the system of equations to calculate DPR is

A * DPR = B(dpr)

B(dpr) is assembled by adding the scores of the opposing alliance of every match each team was involved in.

The way I solve for CCWM is

A * CCWM = B(wm) = B(opr)-B(dpr)

A is the same matrix for all 3 systems of equations. I put the winning margin into vector B which is the same as vector B for OPR minus vector B for DPR.

The way PMR is calculated is to first calculate OPR and DPR separately. Then PMR = OPR - DPR

I don't remember the proper name of the math theory but since this is a linear system, you can do some kind of superposition such that

A * PWR = A * (OPR-DPR) = A * OPR - A * DPR = B(opr) - B(dpr)

Hence CCWM and PWR are identical numerically. This was confirmed by Jesse Knight. Having said that, once I have OPR and CCWM which is what my spreadsheet calculates, I can get DPR simply by

DPR = OPR - CCWM

Isn't math great? I learned all that and more when I was in college and there is some use for it afterall.

Ed Law

Ed Law 13-03-2009 09:50

Week 3 Regional underway
 
Regionals at Florida, Peachtree and Pittsburg are underway and started to post results. The spreadsheet that I did ahead of time is working. Don't worry about the error message right now, just click "End" to get out of it. Once every team has played one match, you will not see that error message any more. If necessary I will fix that for Week 4. I will continue to monitor until every team at every week 3 regionals has played at least one match.

I hope this will help you with alliance selection tomorrow.

Ed Law

Phyrxes 13-03-2009 09:55

Re: paper: New Scouting Database from Team 2834
 
Aside from that error the spread sheet is working flawlessly on my computer here at school this morning (Using Excel 2003).

Killraine 13-03-2009 10:45

Re: paper: New Scouting Database from Team 2834
 
I don't know why I didn't think to go to http://www.thebluealliance.net/tbatv/pictures/2009/ yesterday. Should have been the first place I checked.

Thanks.

Ed Law 13-03-2009 12:19

Re: paper: New Scouting Database from Team 2834
 
I uploaded a new version "Team_2834 2009_Scouting_Database Week 3c.zip" to clean up some formating issues. I also fixed the error message when not every team has played one match yet. There was also a small bug that I fixed. For example in Pittsburg, I had 38 teams listed but there are only 37 teams. One team must have dropped out after I put the list in a few months ago. This produced an error. The new version will take care of this problem.

When I have time, I will fix the score prediction. Originally this program was written to run only after a regional is completed. Now we want it to run during a regional and some things were not planned. For example, in score prediction, you may notice the numbers predicted are very small when teams have played only a few matches. This is because the matrix A was assembled with all the scheduled matches. However vector B only has scores of finished matches. This is why the answer x is smaller than expected. I need to scale the answer x based on number of matches played and number of matches scheduled.

If anybody sees any problems with the spreadsheet, please let me know.

Ed Law

Ed Law 13-03-2009 13:18

Re: paper: New Scouting Database from Team 2834
 
I fixed the score prediction. It turned out to be easier than I thought. The new version now is "Team_2834 2009_Scouting_Database Week 3d.zip". I didn't do an extensive study yet, but some of the score predictions are amazingly accurate.

Ed Law

Killraine 13-03-2009 13:25

Re: paper: New Scouting Database from Team 2834
 
After updating the spreadsheet, I tried to Query team 330 and nothing came up in that window. It would be nice to be able to still use the Query function while you are at an in-progress competition (Situation: At the regional, we are paired up with team #### and team #### in our next qualification match. We don't have much information on them yet and this is their first regional this year, but we want a general idea what our strategy will be. A quick look-up in the spreadsheet shows us there records and a vague idea what their OPR/CCWM are)

Killraine 13-03-2009 13:27

Re: paper: New Scouting Database from Team 2834
 
Quote:

Originally Posted by Ed Law (Post 835503)
I fixed the score prediction. It turned out to be easier than I thought. The new version now is "Team_2834 2009_Scouting_Database Week 3d.zip". I didn't do an extensive study yet, but some of the score predictions are amazingly accurate.

Ed Law

I'm not seeing 3d. In fact I'm not seeing 3c anymore either... Anyone else have this problem?

Ed Law 13-03-2009 13:40

Re: paper: New Scouting Database from Team 2834
 
Quote:

Originally Posted by Killraine (Post 835508)
I'm not seeing 3d. In fact I'm not seeing 3c anymore either... Anyone else have this problem?

It is there now. You are too quick for me. Are you at a regional now?

Ed

Ed Law 13-03-2009 14:02

Re: paper: New Scouting Database from Team 2834
 
Quote:

Originally Posted by Killraine (Post 835506)
After updating the spreadsheet, I tried to Query team 330 and nothing came up in that window. It would be nice to be able to still use the Query function while you are at an in-progress competition (Situation: At the regional, we are paired up with team #### and team #### in our next qualification match. We don't have much information on them yet and this is their first regional this year, but we want a general idea what our strategy will be. A quick look-up in the spreadsheet shows us there records and a vague idea what their OPR/CCWM are)

Again the original plan was transfer the data only after a regional is completed, I transfer the data from the sheet from that regional to sheets "WM data" and "OPR data" for use by the Query sheet. If we want to transfer during a regional also, I need to reprogram that part. Right now it only allow one transfer per regional. If you transfer more than one time, it will think that it is a new regional because it looks for blank space and dump the data there.

For now, you have to refer to the sheet for your current regional and find the data there for the teams which is not that hard. Actually I think it is more convenient to have all the teams you are competing with at your regional all on one page than to have to query one team at a time. The Query was meant to be printed out before you get to the regional or to be printed out after your scouts take pictures of all the robots on Thursdays.

Thanks for the suggestions.

Ed Law

Team 1746 13-03-2009 22:19

Re: paper: New Scouting Database from Team 2834
 
Peachtree regional is not updating. All other regional seem to be updating OK.

Error message

run time error 13

type mismatch

Ed Law 14-03-2009 20:14

Re: paper: New Scouting Database from Team 2834
 
Quote:

Originally Posted by Team 1746 (Post 835634)
Peachtree regional is not updating. All other regional seem to be updating OK.

Error message

run time error 13

type mismatch

The reason Peachtree is not updating is because they did not broadcast the ranking information. All the links in the spreadsheet are correct.

Phyrxes 14-03-2009 22:11

Re: paper: New Scouting Database from Team 2834
 
So incase anybody was wondering this spreadsheet doesn't appear to work with OpenOffice.org Calc.


All times are GMT -5. The time now is 08:42.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi