PHEV-PHP
The PHEV-PHP
implements calculations method for Plug-in Hybrid Electric Vehicles.
Introduction
The main difference between normal cars and Plug-in Hybrids is of coarse the 2-different ways of driving on Electricity and Petrol/Gas.
That means that the fill-up of the fuel and the upload of the battery does not have to be on the same time and on the same mileage.
Why is that important.
To be able to calculate the consumption and costs of fuel and electricity you need to have the same base of measurement.
And that is what missing here. And think about the consumption/cost of a single trip.
To summarize the complexity of consumption/cost/trip calculation:
- The fuel fill-up of a PHEV will also not be as frequently as the upload of the battery.
- The trip conditions (city, highway) influence the usage of fuel and electricity.
- City is mainly electric.
- Highway is mainly fuel.
- The weather condition (warm, cold) influence the capacity of the battery and the usage of both energy sources.
- In the Mitsubishi Outlander PHEV using the heating system will cause the car to drive on fuel.
- Cold weather reduces the range of the car on electricity.
PHP Class PHEV
The PHP-Class PHEV
implements these calculations. The functions in the class are:
calcCumulation | |
---|---|
Parmeters | |
string $untilDate | The end-date for the cumulation. |
boolean $forgetFirst | [Optional] If true does does not include first record for Consumption and Costs, but do include the odometer. [default true]. |
boolean $verbose | [Optional] Extra developer help for debugging the function [default false] |
return | boolean false or array aCumulation with the cumulated results. |
Description
Cumulates the Electricity and Fuel results from start until the given end-date, untilDate, inclusive.
The first record is skipped if the forgetFirst is set (the first record includes initial fuel and electricity data).
| |
PHEV_CONS_ELEC | The cumulated uploaded Consumption of Electricity. |
PHEV_COST_ELEC | The cumulated costs of the uploaded Electricity. |
PHEV_CONS_FUEL | The cumulated filled-up Consumption of Fuel. |
PHEV_COST_FUEL | The cumulated costs of the filled-up Fuel. |
PHEV_START_ODO | The maximum of the Energy/Fuel Odometer reading of the first found record. |
PHEV_END_ODO | The maximum of the Energy/Fuel Odometer reading of the last found record. |