-
Notifications
You must be signed in to change notification settings - Fork 10
/
battery.py
23 lines (22 loc) · 1.12 KB
/
battery.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Battery(object):
""" Used to store information about the battery.
:param current_charge: is the initial state of charge of the battery
:param capacity: is the battery capacity in Wh
:param charging_power_limit: the limit of the power that can charge the battery in W
:param discharging_power_limit: the limit of the power that can discharge the battery in W
:param battery_charging_efficiency: The efficiecny of the battery when charging
:param battery_discharing_efficiecny: The discharging efficiency
"""
def __init__(self,
current_charge=0.0,
capacity=0.0,
charging_power_limit=1.0,
discharging_power_limit=-1.0,
charging_efficiency=0.95,
discharging_efficiency=0.95):
self.current_charge = current_charge
self.capacity = capacity
self.charging_power_limit = charging_power_limit
self.discharging_power_limit = discharging_power_limit
self.charging_efficiency = charging_efficiency
self.discharging_efficiency = discharging_efficiency