23 lines
845 B
Python
23 lines
845 B
Python
from batterymodel import BatteryModel
|
|
from batterymodel.models.battery import BatteryState
|
|
|
|
|
|
def test_battery_stats():
|
|
assert BatteryModel()._max_charge_rate == 2000000 # Watts
|
|
assert BatteryModel()._max_discharge_rate == 2000000 # Watts
|
|
assert BatteryModel()._max_storage_volume == 4000000 # Wh
|
|
assert BatteryModel()._charging_efficiency == 0.05
|
|
assert BatteryModel()._discharging_efficiency == 0.05
|
|
assert BatteryModel()._lifetime_years == 10
|
|
assert BatteryModel()._lifetime_cycles == 50000
|
|
assert BatteryModel()._storage_volume_degradation_rate == 0.001 # %/cycle
|
|
assert BatteryModel()._fixed_operational_costs == 50000 # £/year
|
|
|
|
def test_battery_update():
|
|
battery = BatteryModel()
|
|
assert battery._battery_state == BatteryState.IDLE
|
|
|
|
|
|
def test_market_decision_idle():
|
|
battery = BatteryModel()
|