(nonmodular, raise_errors)
| 37 | |
| 38 | |
| 39 | def get_battery_module(nonmodular, raise_errors): |
| 40 | battery = nonmodular.battery |
| 41 | max_capacity = battery.capacity |
| 42 | min_capacity = max_capacity*battery.soc_min |
| 43 | max_charge = battery.p_charge_max |
| 44 | max_discharge = battery.p_discharge_max |
| 45 | efficiency = battery.efficiency |
| 46 | battery_cost_cycle = battery.cost_cycle |
| 47 | init_soc = battery.soc |
| 48 | return BatteryModule(min_capacity=min_capacity, |
| 49 | max_capacity=max_capacity, |
| 50 | max_charge=max_charge, |
| 51 | max_discharge=max_discharge, |
| 52 | efficiency=efficiency, |
| 53 | battery_cost_cycle=battery_cost_cycle, |
| 54 | init_soc=init_soc, |
| 55 | raise_errors=raise_errors) |
| 56 | |
| 57 | |
| 58 | def get_genset_module(nonmodular, raise_errors): |
no test coverage detected