23 double batteryMaxCapacity;
24 double batteryInitialCharge;
25 double batteryCurrentCharge;
26 double batteryStateOfCharge;
27 double batteryDischargeCRate;
28 double batteryRechargeCRate;
30 double batteryRechargeSOCUpperBound;
31 double batteryRechargeSOCLowerBound;
32 bool enableRecharge =
false;
33 double batteryCumEnergyConsumed = 0.0;
34 double batteryCumEnergyRegenerated = 0.0;
35 double batteryCumNetEnergyConsumed = 0.0;
47 void setBattery(
double maxCharge,
double initialChargePercentage,
double depthOfDischarge,
48 double batteryCRate,
double maxRechargeSOC = 0.9,
double minRechargeSOC = 0.5);
87 std::pair<bool, double>
consumeBattery(
double timeStep,
double consumedCharge);
double rechargeBatteryByRegeneratedEnergy(double timeStep, double recharge)
Recharges the battery by regenerated energy.
Definition battery.cpp:60
double getBatteryCumNetEnergyConsumption()
Gets the cumulative net energy consumption for this battery.
Definition battery.cpp:183
void setBattery(double maxCharge, double initialChargePercentage, double depthOfDischarge, double batteryCRate, double maxRechargeSOC=0.9, double minRechargeSOC=0.5)
Sets the battery properties.
Definition battery.cpp:191
double getBatteryRechargeSOCUpperBound() const
Gets the upper bound of the battery's recharge state of charge.
Definition battery.cpp:139
double getBatteryDOD() const
Gets the depth of discharge of the battery.
Definition battery.cpp:81
double getBatteryCumEnergyRegenerated()
Gets the cumulative energy regenerated for this battery only.
Definition battery.cpp:179
void setBatteryMaxCharge(double newMaxCharge)
Sets the maximum charge of the battery.
Definition battery.cpp:8
bool isBatteryDrainable(double requiredCharge)
Checks if the battery can be drained by the required charge.
Definition battery.cpp:106
void setBatteryCRate(double newBatteryCRate)
Sets the C-Rate of discharge for the battery.
Definition battery.cpp:101
double getBatteryMaxRecharge(double timeStep)
Gets the maximum recharge of the battery.
Definition battery.cpp:131
double getBatteryCurrentCharge() const
Gets the current charge of the battery.
Definition battery.cpp:20
void setBatteryRechargeSOCUpperBound(double newBatteryMaxSOC)
Sets the upper bound of the battery's recharge state of charge.
Definition battery.cpp:143
void setBatteryDOD(double newBatteryDOD)
Sets the depth of discharge of the battery.
Definition battery.cpp:85
bool isRechargeRequired() const
Checks if the battery requires a recharge.
Definition battery.cpp:135
double getBatteryStateOfCharge() const
Gets the state of charge of the battery.
Definition battery.cpp:77
double getBatteryMaxCharge() const
Gets the maximum charge of the battery.
Definition battery.cpp:4
double rechargeBatteryForHybrids(double timeStep, double recharge)
Recharges the battery for hybrid vehicles.
Definition battery.cpp:43
bool IsBatteryExceedingThresholds()
Checks if the battery exceeds certain thresholds.
Definition battery.cpp:119
bool isBatteryRechargable()
Checks if the battery can be recharged.
Definition battery.cpp:112
void setBatteryRechargeSOCLowerBound(double newBatteryRechargeSOCLowerBound)
Sets the lower bound of the battery's recharge state of charge.
Definition battery.cpp:163
double getBatteryMaxDischarge(double timeStep)
Gets the maximum discharge of the battery.
Definition battery.cpp:126
double getBatteryRechargeSOCLowerBound() const
Gets the lower bound of the battery's recharge state of charge.
Definition battery.cpp:159
double getBatteryCumEnergyConsumption()
Gets the cumulative energy consumption for this battery only.
Definition battery.cpp:175
double getBatteryCRate() const
Gets the C-Rate of discharge for the battery.
Definition battery.cpp:97
std::pair< bool, double > consumeBattery(double timeStep, double consumedCharge)
Consumes charge from the battery.
Definition battery.cpp:24
bool batteryHasCharge()
Checks if the battery has enough charge.
Definition battery.cpp:187
double getBatteryInitialCharge() const
Gets the initial charge of the battery.
Definition battery.cpp:12
void setBatteryInitialCharge(double newInitialCharge)
Sets the initial charge of the battery.
Definition battery.cpp:16