Electric Vehicle Forums

Electric Vehicle Forums (/forums/)
-   Fuel Economy & Emissions (https://electricvehicleforums.com/forums/fuel-economy-emissions-22/)
-   -   Round off error in the database? (https://electricvehicleforums.com/forums/fuel-economy-emissions-22/round-off-error-database-892/)

accwai 09-10-2004 06:54 AM


Originally posted by Jason@Sep 9th 2004 @ 7:58 PM
Ah. Looks like that was the problem. I reset the variables when the script looped (recalculating all of the overall mileages) and it appears to have worked. Please double-check me on that.
I just did the Excel calculation for all cars in the database this morning. They all match exactly (except for those with override). Looking good!


Andy, thanks for being such a careful observer!
Well I fix nasty software problems for a living. Observing the problem, finding out what's wrong, and then convincing everybody involved that this is indeed what's wrong is what I do everyday :)

Andy

P.S. Oh, I was really busy at work yesterday. I was going to take a look at your code fragment last night but my home PC blow up. Took me all night to find out it's the video card and swap in an old card.

xcel 09-10-2004 01:43 PM

Hi Jason:

___I thought we had discussed the lmpg inaccuracy a few months ago with Rick Reese’s and my own tanks but I didn’t find the thread? In any case, my current spreadsheet lmpg now matches up with the database lmpg almost exactly. Wait until I post my next tank at which time my spreadsheet, my lmpg, and the database will finally match because it is going to be a good one ;)

___Accwai, thanks for leaning on Jason for the accuracy fix. I always thought it was a significant digit problem and kept hammering on Jason to fix that to make the lmpg numbers match. Significant Database Updates, By Popular Request * tenth post + down …

___Good Luck

___Wayne R. Gerdes
___Hunt Club Farms Landscaping Ltd.
___Waynegerdes@earthlink.net

Jason 09-10-2004 09:54 PM

Right, I remember that. I think the error was blamed on rounding, however. Unless I don't recall correctly, I assumed that whole-number distances and tenths-digit mileages was creating the abberance.

Ah, well. No reason to dwell on the past. It's fixed.

Jason 09-10-2004 09:56 PM

Looks like things aren't absolutely perfect after all... I see a "highway" percentage in the 90's while every tank's percentage was 0-33. I'll look into it. These are sort of useless variables, anyway

Jason 09-14-2004 07:36 PM

Eh, looks like I have a small bit to fix, still. I haven't yet updated the equations for the Month vs. Mileage graph. Remind me if I forget...

Stevo12886 09-14-2004 08:19 PM


Originally posted by Jason@Sep 10th 2004 @ 11:56 PM
Looks like things aren't absolutely perfect after all... I see a "highway" percentage in the 90's while every tank's percentage was 0-33. I'll look into it. These are sort of useless variables, anyway
Not useless, its good for a quick scan of your competetors and what they are facing.

Jason 09-15-2004 07:38 AM

Haha, ok. Well, I'll look into it anyway.

BIF 09-16-2004 01:42 PM

My wholehearted "thank you" to both Andy and Jason for banging away at this. I appreciate your efforts, both of you!

Jason 09-18-2004 12:04 PM

Andy, for the life of me I cannot figure out why these values are wrong. If it works for mileage, why not the others, as well?

Code:

        if ($weight['mileage'] != 0) { $mileagedenominator = $mileagedenominator + $weight['distance']/$weight['mileage']; }
        if ($weight['temperature'] != 0) { $temperaturedenominator = $temperaturedenominator + $weight['distance']/$weight['temperature']; }
        if ($weight['time'] != 0) { $timedenominator = $timedenominator + $weight['distance']/$weight['time']; }
        if ($weight['highway'] != 0) { $highwaydenominator = $highwaydenominator + $weight['distance']/$weight['highway']; }
        if ($weight['traffic'] != 0) { $trafficdenominator = $trafficdenominator + $weight['distance']/$weight['traffic']; }
       
        $numerator= $numerator + $weight['distance'];
       
        if ($mileagedenominator != 0) { $mileage = $numerator / $mileagedenominator; }
        if ($temperaturedenominator != 0) { $temperature = round($numerator / $temperaturedenominator,0); }
        if ($timedenominator != 0) { $time = round($numerator / $timedenominator,0); }
        if ($highwaydenominator != 0) { $highway = $numerator / $highwaydenominator; }
        if ($trafficdenominator != 0) { $traffic = $numerator / $trafficdenominator; }


Jason 09-18-2004 12:05 PM

Side note: the main bar graph was running on numbers rounded to the tenth insteaded to the whole number. The drawing software rounded these values down. This has been fixed, resulting in a Prius II average of 50 instead of 49.

Side note #2: I am contemplating changing these values to medians instead of means in order to dissassociate "hypermilers."


All times are GMT -7. The time now is 03:29 PM.


© 2024 MH Sub I, LLC dba Internet Brands