Interactive hybrid cars resource
GreenHybrid Home - Hybrid Cars
Hybrid Cars Discussion Forums
Hybrid Articles
Hybrid Mileage Database & Car Specs
Hybrid Car Photo Gallery
Shopping Guide for Hybrid Cars


Go Back   GreenHybrid - Hybrid Cars > Hybrid Topics > Fuel Economy & Emissions
Register FAQ Members List Search Today's Posts Mark Forums Read

Fuel Economy & Emissions Talk about the mileage database, EPA, hypermiling, gas and driving strategy. 

Reply
 
Thread Tools Search this Thread
  #11 (permalink)  
Old 09-08-2004, 01:52 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,487
Default

Old numbers:

Quote:
Car Name Image Mi Mi/Tank MPG Gal Gas Gas/Tank °F Min/Ride Highway Traffic
.
JHX 04 CVT Prius 2,928 586 58.8 49.8 10.0 70 37 43% 92%
New numbers:

Quote:
Car Name Image Mi Mi/Tank MPG Gal Gas Gas/Tank °F Min/Ride Highway Traffic
.
JHX 04 CVT Prius 2,928 586 58.4 50.1 10.0 70 36 67% 89%
If this looks right to you, please let me know ASAP and I'll update the rest of the database.

.

Visit my newly-acquired website, Volconvo Debate Forums!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 09-08-2004, 02:07 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,487
Default

Ohhh, no. Please tell me I did this right. Good thing I backed up the database.

I ran the script through all the cars to reconfigure. The mileages have changed dramatically... so much so that I question which is more reliable! The Prius went from 49 to 53. The Insight went from 67 to 58. Ah!

.

Visit my newly-acquired website, Volconvo Debate Forums!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 09-08-2004, 02:11 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,487
Default

Accwai, your equation cannot be right. Look at EMAXX:
Quote:
Car Name Image Mi Mi/Tank MPG Gal Gas Gas/Tank °F Min/Ride Highway Traffic
.
EMAXX 04 CVT Prius 18,498 561 54.7 337.9 10.2 59 46 79% 166%

.

Visit my newly-acquired website, Volconvo Debate Forums!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 09-08-2004, 02:18 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,487
Default

Okay. I've reverted everything back.

Here is the graph for EMAXX based on YOUR equation. Look at that average. It simply cannot be right.

.

Visit my newly-acquired website, Volconvo Debate Forums!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 09-08-2004, 02:34 PM
accwai's Avatar
accwai accwai is offline
Enthusiast
 
Real Name: Andy Wai
Location: Toronto, Canada
Hybrids: 2004 Prius
Posts: 47
Default

Well, I downloaded all of Dan's tank data and crunch them through the Excel equivalent of that formula and I got 18498 total miles and 315.08 total gallons. Works out to 58.7mpg. So something is wrong with the PHP version. Can you put in a debug statement and print out the numerator and denominator?

In any case, I'm busy tonight but I probably crunch through all cars tomorrow night and see what the different car types would be like with the new formula, and how the individual cars will change. Or we can just forget the whole thing. Are you interested in pursuing this further?

Andy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 09-08-2004, 02:38 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,487
Default

Andy,
Yes, it's possible the equation didn't translate properly into PHP. The odd part, however, is that YOUR numbers came out correct. And mine barely changed.

Don't bother going through each car individually. I'll try pulling up some of the code to see what went wrong.

.

Visit my newly-acquired website, Volconvo Debate Forums!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 09-08-2004, 02:42 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,487
Default

Here's what I ran through to update all the cars:

Code:
$cid = 0; while ($cid <= 359) { $weightSQL = "SELECT mileage,distance,temperature,time,highway,traffic FROM data WHERE cid = '$cid'"; $weightresult = mysql_query($weightSQL) or die(mysql_error()); while ( $weight = mysql_fetch_array($weightresult) ) { 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; } if ($override['lmpgoverride'] != 0) { $mileage = $override['lmpgoverride']; } } $updateSQL = "UPDATE car SET avgmileage = '$mileage', avgtemperature = '$temperature', avgtime = '$time', avghighway = '$highway', avgtraffic = '$traffic' WHERE cid = '$cid'"; mysql_query($updateSQL) or die(mysql_error()); echo "$cid<br>"; $cid++; }

.

Visit my newly-acquired website, Volconvo Debate Forums!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 09-08-2004, 02:45 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,487
Default

Okay, I noticed a potential problem with that code. I don't know that it is what caused the large problem, though.

Because you told me to divide by values that could possibly be 0, I put an IF statement in so it wouldn't throw up a DIVIDE BY 0 error. However, if it skips this step then perhaps the variable's value will carry over from the previous car.

.

Visit my newly-acquired website, Volconvo Debate Forums!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 09-08-2004, 02:49 PM
accwai's Avatar
accwai accwai is offline
Enthusiast
 
Real Name: Andy Wai
Location: Toronto, Canada
Hybrids: 2004 Prius
Posts: 47
Default

Ok, I have to run. Will take a look at the code tomorrow.

Andy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 09-09-2004, 05:58 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,487
Default

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.

Andy, thanks for being such a careful observer! On an individual basis, this may make the database a bit more accurate. Overall, it did not influence the mean mileages for any car. Oh, well!

.

Visit my newly-acquired website, Volconvo Debate Forums!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Topic Starter Forum Replies Last Post
Significant Database Updates Jason Website Questions & Input 25 12-20-2004 08:36 PM
Mileage Database Notice Jason Our Announcements 2 11-16-2004 01:01 PM
Database Entree Accuracy kenny General Forum 8 10-22-2004 02:56 PM
"TCP Error" while updating mileage database... BIF Fuel Economy & Emissions 2 09-16-2004 02:51 PM
Upcoming Mileage Database Updates Jason Fuel Economy & Emissions 6 04-22-2004 11:47 AM


All times are GMT -7. The time now is 05:42 PM.



This website is made possible by people like you.
Thank you.


HOME   .   DISCUSS   .   LEARN   .   COMPARE   .   SHARE   .   SHOP

About      Press Release      Contact

Suggested Link      Promote Hybrids      Site Store




COPYRIGHT © 2005-2006 Internet Brands, Inc. | Privacy Policy

SEO by vBSEO 3.0.0