Refactor BatteryModel and market handling for improved time tracking, logging, and market rate calculations
Something is slow, I suspect its the logging, but time is tight, so I'm going to wrap up to make it at least useable
This commit is contained in:
@@ -110,7 +110,8 @@ class BatteryModel:
|
||||
self._current_charge_value)
|
||||
|
||||
def log_state_change(self, fn, original_state, new_state):
|
||||
self._decision_log_handle.write(f"{self.current_time},{self._runtime},{fn},{original_state},{new_state}\n")
|
||||
# self._decision_log_handle.write(f"{self.current_time},{self._runtime},{fn},{original_state},{new_state}\n")
|
||||
pass
|
||||
|
||||
def handle_storage_capacity_check(self, previous_state: "BatteryModel"):
|
||||
if self._charge_discharge_cycles > previous_state._charge_discharge_cycles and self._charge_discharge_cycles / int(self._charge_discharge_cycles) == 1:
|
||||
|
||||
Reference in New Issue
Block a user