Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug in Modelica.Electrical.Batteries.Utilities.PulseSeries #3901

Closed
modlfo opened this issue Nov 25, 2021 · 0 comments · Fixed by #3902
Closed

Possible bug in Modelica.Electrical.Batteries.Utilities.PulseSeries #3901

modlfo opened this issue Nov 25, 2021 · 0 comments · Fixed by #3902
Assignees
Labels
bug Critical/severe issue L: Electrical.Batteries Issue addresses Modelica.Electrical.Batteries
Milestone

Comments

@modlfo
Copy link

modlfo commented Nov 25, 2021

In the model Modelica.Electrical.Batteries.Utilities.PulseSeries there seems to be a bug. Specifically in the declaration:

parameter SI.Time Tstart2[n1] = array(... for k in 1:n2);

In that case Tstart2 has a size of n1 but the iterator goes up to size n2. Same issue with the equation

on2 = oneTrue(array(time >= Tstart2[k] and time < Tstart2[k] + T2 for k in 1:n1));

In order for the model to work n1 and n2 must be equal.

In the examples where the model is used, n1 and n2 happen to be equal.

@dietmarw dietmarw added the L: Electrical.Batteries Issue addresses Modelica.Electrical.Batteries label Nov 25, 2021
AHaumer added a commit to AHaumer/ModelicaStandardLibrary that referenced this issue Nov 25, 2021
@beutlich beutlich added this to the MSL4.1.0 milestone Nov 25, 2021
@beutlich beutlich added the bug Critical/severe issue label Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: Electrical.Batteries Issue addresses Modelica.Electrical.Batteries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants