Module: BrighterPlanet

Defined in:
lib/automobile/carbon_model.rb,
lib/automobile.rb,
lib/automobile/data.rb,
lib/automobile/fallback.rb,
lib/automobile/relationships.rb,
lib/automobile/summarization.rb,
lib/automobile/characterization.rb

Overview

Automobile carbon model This model is used by Brighter Planet's carbon emission web service to estimate the greenhouse gas emissions of an automobile.

Timeframe, acquisition, and retirement The model estimates the emissions that occur during a particular timeframe. To do this it needs to know the automobile's acquisition (the date it started being used) and retirement (the date it stopped being used). For example, if the timeframe is January 2010, an automobile with acquisition of January 2009 and retirement of February 2010 will have emissions, but an automobile with acquisition of February 2010 or retirement of December 2009 will not.

Calculations The final estimate is the result of the calculations detailed below. These calculations are performed in reverse order, starting with the last calculation listed and finishing with the emission calculation. Each calculation is named according to the value it returns.

Methods To accomodate varying client input, each calculation may have one or more methods. These are listed under each calculation in order from most to least preferred. Each method is named according to the values it requires. If any of these values is not available the method will be ignored. If all the methods for a calculation are ignored, the calculation will not return a value. "Default" methods do not require any values, and so a calculation with a default method will always return a value.

Standard compliance Each method lists any established calculation standards with which it complies. When compliance with a standard is requested, all methods that do not comply with that standard are ignored. This means that any values a particular method requires will have been calculated using a compliant method, because those are the only methods available. If any value did not have a compliant method in its calculation then it would be undefined, and the current method would have been ignored.

Collaboration Contributions to this carbon model are actively encouraged and warmly welcomed. This library includes a comprehensive test suite to ensure that your changes do not cause regressions. All changes should include test coverage for new functionality. Please see sniff, our emitter testing framework, for more information.

Defined Under Namespace

Modules: Automobile