Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dos-group/vessim
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f4a78624312f89eca03d3d22168178788add39aa
Choose a base ref
..
head repository: dos-group/vessim
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 49692d3eaa4e8977f5dbd127b96aaebba2ee1afc
Choose a head ref
Showing with 4 additions and 4 deletions.
  1. +4 −4 vessim/storage.py
8 changes: 4 additions & 4 deletions vessim/storage.py
Original file line number Diff line number Diff line change
@@ -114,11 +114,11 @@ def update(self, soc: float, duration: int) -> float:
self.T_celsius,
)
self._q = self.model.outputs["q"][-1]
self.samples = 0

sample = self.samples % self.sample_size
self.t_secs[sample] = self.t_secs[sample - 1] + duration
self.soc[sample] = soc
self.T_celsius[sample] = self.temp.now(self.t)
self.t_secs[self.samples] = self.t_secs[self.samples - 1] + duration
self.soc[self.samples] = soc
self.T_celsius[self.samples] = self.temp.now(self.t)
self.samples += 1
return self._q