import Battery, ElectricPower battery = new Battery battery.voltage = 3.7V +/- 10% # Li-ion cell battery.capacity = 2000mAh +/- 5% # Connect to system power system_power = new ElectricPower battery.power ~ system_power # Battery specifications will constrain system voltage assert system_power.voltage within battery.voltage # For multiple cells in series battery_pack = new Battery battery_pack.voltage = 11.1V +/- 10% # 3S Li-ion pack battery_pack.capacity = 2000mAh +/- 5%
ato create component
True