#include <battery.h>
Public Member Functions | |
| void | setBattery (double maxCharge, double initialChargePercentage, double depthOfDischarge, double batteryCRate, double maxRechargeSOC=0.9, double minRechargeSOC=0.5) |
| Sets the battery properties. | |
| double | getBatteryMaxCharge () const |
| Gets the maximum charge of the battery. | |
| void | setBatteryMaxCharge (double newMaxCharge) |
| Sets the maximum charge of the battery. | |
| double | getBatteryInitialCharge () const |
| Gets the initial charge of the battery. | |
| void | setBatteryInitialCharge (double newInitialCharge) |
| Sets the initial charge of the battery. | |
| double | getBatteryCurrentCharge () const |
| Gets the current charge of the battery. | |
| std::pair< bool, double > | consumeBattery (double timeStep, double consumedCharge) |
| Consumes charge from the battery. | |
| double | rechargeBatteryForHybrids (double timeStep, double recharge) |
| Recharges the battery for hybrid vehicles. | |
| double | rechargeBatteryByRegeneratedEnergy (double timeStep, double recharge) |
| Recharges the battery by regenerated energy. | |
| double | getBatteryStateOfCharge () const |
| Gets the state of charge of the battery. | |
| double | getBatteryDOD () const |
| Gets the depth of discharge of the battery. | |
| void | setBatteryDOD (double newBatteryDOD) |
| Sets the depth of discharge of the battery. | |
| double | getBatteryCRate () const |
| Gets the C-Rate of discharge for the battery. | |
| void | setBatteryCRate (double newBatteryCRate) |
| Sets the C-Rate of discharge for the battery. | |
| bool | isBatteryDrainable (double requiredCharge) |
| Checks if the battery can be drained by the required charge. | |
| bool | isBatteryRechargable () |
| Checks if the battery can be recharged. | |
| double | getBatteryMaxDischarge (double timeStep) |
| Gets the maximum discharge of the battery. | |
| double | getBatteryMaxRecharge (double timeStep) |
| Gets the maximum recharge of the battery. | |
| bool | isRechargeRequired () const |
| Checks if the battery requires a recharge. | |
| double | getBatteryRechargeSOCUpperBound () const |
| Gets the upper bound of the battery's recharge state of charge. | |
| void | setBatteryRechargeSOCUpperBound (double newBatteryMaxSOC) |
| Sets the upper bound of the battery's recharge state of charge. | |
| double | getBatteryRechargeSOCLowerBound () const |
| Gets the lower bound of the battery's recharge state of charge. | |
| void | setBatteryRechargeSOCLowerBound (double newBatteryRechargeSOCLowerBound) |
| Sets the lower bound of the battery's recharge state of charge. | |
| double | getBatteryCumEnergyConsumption () |
| Gets the cumulative energy consumption for this battery only. | |
| double | getBatteryCumEnergyRegenerated () |
| Gets the cumulative energy regenerated for this battery only. | |
| double | getBatteryCumNetEnergyConsumption () |
| Gets the cumulative net energy consumption for this battery. | |
| bool | batteryHasCharge () |
| Checks if the battery has enough charge. | |
| bool | IsBatteryExceedingThresholds () |
| Checks if the battery exceeds certain thresholds. | |
| bool Battery::batteryHasCharge | ( | ) |
Checks if the battery has enough charge.
| std::pair< bool, double > Battery::consumeBattery | ( | double | timeStep, |
| double | consumedCharge | ||
| ) |
Consumes charge from the battery.
| timeStep | The time step in seconds. |
| consumedCharge | The amount of charge to be consumed. |
| double Battery::getBatteryCRate | ( | ) | const |
Gets the C-Rate of discharge for the battery.
| double Battery::getBatteryCumEnergyConsumption | ( | ) |
Gets the cumulative energy consumption for this battery only.
| double Battery::getBatteryCumEnergyRegenerated | ( | ) |
Gets the cumulative energy regenerated for this battery only.
| double Battery::getBatteryCumNetEnergyConsumption | ( | ) |
Gets the cumulative net energy consumption for this battery.
| double Battery::getBatteryCurrentCharge | ( | ) | const |
Gets the current charge of the battery.
| double Battery::getBatteryDOD | ( | ) | const |
Gets the depth of discharge of the battery.
| double Battery::getBatteryInitialCharge | ( | ) | const |
Gets the initial charge of the battery.
| double Battery::getBatteryMaxCharge | ( | ) | const |
Gets the maximum charge of the battery.
| double Battery::getBatteryMaxDischarge | ( | double | timeStep | ) |
Gets the maximum discharge of the battery.
| timeStep | The time step in seconds. |
| double Battery::getBatteryMaxRecharge | ( | double | timeStep | ) |
Gets the maximum recharge of the battery.
| timeStep | The time step in seconds. |
| double Battery::getBatteryRechargeSOCLowerBound | ( | ) | const |
Gets the lower bound of the battery's recharge state of charge.
| double Battery::getBatteryRechargeSOCUpperBound | ( | ) | const |
Gets the upper bound of the battery's recharge state of charge.
| double Battery::getBatteryStateOfCharge | ( | ) | const |
Gets the state of charge of the battery.
| bool Battery::isBatteryDrainable | ( | double | requiredCharge | ) |
Checks if the battery can be drained by the required charge.
| requiredCharge | The required charge to be drained. |
| bool Battery::IsBatteryExceedingThresholds | ( | ) |
Checks if the battery exceeds certain thresholds.
| bool Battery::isBatteryRechargable | ( | ) |
Checks if the battery can be recharged.
| bool Battery::isRechargeRequired | ( | ) | const |
Checks if the battery requires a recharge.
| double Battery::rechargeBatteryByRegeneratedEnergy | ( | double | timeStep, |
| double | recharge | ||
| ) |
Recharges the battery by regenerated energy.
| timeStep | The time step in seconds. |
| recharge | The amount of charge to be recharged. |
| double Battery::rechargeBatteryForHybrids | ( | double | timeStep, |
| double | recharge | ||
| ) |
Recharges the battery for hybrid vehicles.
| timeStep | The time step in seconds. |
| recharge | The amount of charge to be recharged. |
| void Battery::setBattery | ( | double | maxCharge, |
| double | initialChargePercentage, | ||
| double | depthOfDischarge, | ||
| double | batteryCRate, | ||
| double | maxRechargeSOC = 0.9, |
||
| double | minRechargeSOC = 0.5 |
||
| ) |
Sets the battery properties.
| maxCharge | The maximum charge the battery can hold in kWh. |
| initialChargePercentage | The initial charge percentage of the battery. |
| depthOfDischarge | The allowable depth of discharge for the battery. |
| batteryCRate | The C-Rate of discharge for the battery. |
| maxRechargeSOC | The maximum State of Charge the battery reaches when recharging (optional). |
| minRechargeSOC | The minimum State of Charge the battery reaches when being drained (optional). |
| void Battery::setBatteryCRate | ( | double | newBatteryCRate | ) |
Sets the C-Rate of discharge for the battery.
| newBatteryCRate | The new C-Rate of discharge for the battery. |
| void Battery::setBatteryDOD | ( | double | newBatteryDOD | ) |
Sets the depth of discharge of the battery.
| newBatteryDOD | The new depth of discharge of the battery as a percentage. |
| void Battery::setBatteryInitialCharge | ( | double | newInitialCharge | ) |
Sets the initial charge of the battery.
| newInitialCharge | The new initial charge of the battery in kWh. |
| void Battery::setBatteryMaxCharge | ( | double | newMaxCharge | ) |
Sets the maximum charge of the battery.
| newMaxCharge | The new maximum charge of the battery in kWh. |
| void Battery::setBatteryRechargeSOCLowerBound | ( | double | newBatteryRechargeSOCLowerBound | ) |
Sets the lower bound of the battery's recharge state of charge.
| newBatteryRechargeSOCLowerBound | The new lower bound of the recharge state of charge. |
| void Battery::setBatteryRechargeSOCUpperBound | ( | double | newBatteryMaxSOC | ) |
Sets the upper bound of the battery's recharge state of charge.
| newBatteryMaxSOC | The new upper bound of the recharge state of charge. |