diff --git a/src/bsk_rl/sim/dyn.py b/src/bsk_rl/sim/dyn.py index 47a5a7e..4c383e1 100644 --- a/src/bsk_rl/sim/dyn.py +++ b/src/bsk_rl/sim/dyn.py @@ -632,6 +632,10 @@ def setup_battery( self.powerMonitor = simpleBattery.SimpleBattery() self.powerMonitor.ModelTag = "powerMonitor" self.powerMonitor.storageCapacity = batteryStorageCapacity + if storedCharge_Init > batteryStorageCapacity or storedCharge_Init < 0: + self.logger.warning( + f"Battery initial charge {storedCharge_Init} incompatible with its capacity {batteryStorageCapacity}." + ) self.powerMonitor.storedCharge_Init = storedCharge_Init self.powerMonitor.addPowerNodeToModel(self.solarPanel.nodePowerOutMsg) self.simulator.AddModelToTask(