Battery-Intelligence-Lab / SLIDE

SLIDE is C++ code that simulates degradation of lithium ion cells. It extends the single particle model with various degradation models from literature. Users can select which degradation models they want to use for a given simulation.
Other
107 stars 35 forks source link

Windows unit workflow fails #11

Closed ElektrikAkar closed 1 year ago

ElektrikAkar commented 1 year ago

The action for building and testing for Windows cannot complete after several hours although it does not show the same behavior on local.

ElektrikAkar commented 1 year ago

This issue lead to a bug in setStates:

std::copy(s.begin(), s.begin() + st.size(), st.begin());

Because in tests we only set old cell-specific states (i.e., I, SOC, T); however, if cumulative states are being stored then they also need to be set. Otherwise, we try to access a a memory area (up to pointer + 6) instead of (up to pointer + 3).

This should not occur normally since we use getStates to get states which also get cumulative states.

ElektrikAkar commented 1 year ago

This issue has been solved by augmenting states manually created states vector by 3. ff3db4f