View Single Post
  #1   Spotlight this post!  
Unread 28-06-2010, 23:28
BrandonD-1528's Avatar
BrandonD-1528 BrandonD-1528 is offline
Mentor
AKA: Brandon Dusseau
FRC #1528 (Monroe Trojan Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Ann Arbor, MI
Posts: 118
BrandonD-1528 is a jewel in the roughBrandonD-1528 is a jewel in the roughBrandonD-1528 is a jewel in the roughBrandonD-1528 is a jewel in the rough
MARCStats - HELP!

Alright.... I've got the following code for MARCStats when a match's data is entered:

PHP Code:
// Calculate penalized and unpenalized score totals
    
$rupentotal $rscore $rbonus// Unpenalized = Raw + Bonus
    
$rpentotal $rscore $rpen $rbonus// Penalized = Raw - Penalites + Bonus
    
$bupentotal $bscore $bbonus;
    
$bpentotal $bscore $bpen $bbonus;
    
    
// Set penalty minimum
    
if ($rpentotal 0) {
        
$rpentotal 0;
    }
    if (
$bpentotal 0) {
        
$bpentotal 0;
    }
    
    
// Calculate seeding scores and coopertition scores
    // If red wins the match...
    
if ($rpentotal $bpentotal) {
        
$rseed $rpentotal + ($bupentotal);
        
$rcoop = ($bupentotal);
        
$bseed $rupentotal;
        
$bcoop 0;
    }
    
// If blue wins the match...
    
elseif ($bpentotal $rpentotal) {
        
$bseed $bpentotal + ($rupentotal);
        
$bcoop = ($rupentotal);
        
$rseed $bupentotal;
        
$rcoop 0;
    }
    
// If there is a tie...
    
elseif ($rpentotal == $bpentotal) {
        
$rseed $rpentotal + ($rpentotal);
        
$rcoop = ($rpentotal);
        
$bseed $bpentotal + ($bpentotal);
        
$bcoop = ($bpentotal);
    } 
Now... I think these formulas are all working. I was working on it with one of the FTA's (thanks, Keith), and it looks like I was just fed bad data. I've attached the match data and ranking data I've collected, up to match 43.

If you visit this link, you can see that the rankings here don't very well match the actual results. There are, however, some well-defined patterns in the differences with several of the discrepancies. I'll let you guys find those, as I'm too lazy to type out all the differences.

Anyone wanna offer some help?

Note: Ignore the colors in the scores file. Those were for my assistance. The dark blue teams, however, are the ones with perfect ranking data.
Attached Files
File Type: xls rank.xls (21.5 KB, 36 views)
File Type: xls scores.xls (44.5 KB, 30 views)
__________________
Brandon Dusseau (website)
Monroe Trojan Robotics mentor
Software Engineer
Michigan Tech alumnus