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

Delay blocks do not belong to Blocks.Nonlinear #3460

Open
casella opened this issue Feb 29, 2020 · 7 comments
Open

Delay blocks do not belong to Blocks.Nonlinear #3460

casella opened this issue Feb 29, 2020 · 7 comments
Assignees
Labels
conversion Issue addresses the conversion L: Blocks Issue addresses Modelica.Blocks task General work that is not related to a bug or feature
Milestone

Comments

@casella
Copy link
Contributor

casella commented Feb 29, 2020

The Blocks.Nonlinear package contain three time delay implementations: FixedDelay, PadeDelay, and VariableDelay.

As everybody knows, pure time delay y(t) = u(t - tau) is a linear operator, linear as linear can be, since obviously the superposition principle applies to it 100%. It is in principle infinite-dimensional, but that doesn't make it less linear. Also its Padé approximation is of course linear, as explicitly explained in the documentation.

I guess the only reason why these blocks belong to Blocks.Nonlinear is to mimick the Simulink Block library, where the delay block was put in the Nonlinear category 30 years ago for reasons I cannot fathom.

I don't think we need to worry too much looking the same as Simulink, at least as far as wrong features are concerned. We should rather worry about not calling Nonlinear something which is most definitely 100% linear.

I would propose to move those three blocks to Continuous, where they belong, now that we have a once-in-a-lifetime opportunity to do so with the conversion scripts. If there is consensus about this, I can open a proper PR with the code change ASAP.

Please note this can only be done in 4.0.0, not in a subsequent minor release.

@beutlich
Copy link
Member

beutlich commented Feb 29, 2020

Since we won't touch upcoming MSL 4.0.0 to introduce any new conversion rules, we have to postpone the proposed changes until MSL 4.0.0 is released and branched to maint/4.0.x.

now that we have a once-in-a-lifetime opportunity to do so with the conversion scripts

Next opportunity already is for MSL v5.0.0 or v4.1.0 to be expected in spring 2021 (provided we decide on #3461, and if we claim that changes requiring conversion imply a new MAJOR revision).

@beutlich beutlich added conversion Issue addresses the conversion L: Blocks Issue addresses Modelica.Blocks task General work that is not related to a bug or feature labels Feb 29, 2020
@HansOlsson
Copy link
Contributor

(Well, VariableDelay is non-linear in the delay argument.)
However, NonLinear is a bad name - especially as most non-linear blocks are in Math.

Since they all have internal states Continuous does seem like a better fit for the delays.
And the remaining ones in NonLinear are then limiters and deadzone, and we might be able to find a better name for them.

@casella
Copy link
Contributor Author

casella commented Mar 2, 2020

Next opportunity already is for MSL v5.0.0 or v4.1.0 to be expected in spring 2021 (provided we decide on #3461, and if we claim that changes requiring conversion imply a new MAJOR revision).

Just as a clarification, according to SEMVER, a major revision is required if you change the API. In case we have a conversion script, would this change be considered as "not changing the API", so it could end up in 4.1.0?

@dietmarw
Copy link
Member

dietmarw commented Mar 2, 2020

No because the conversion script would change the user library so it can work with the new MAJOR version. It will no longer be able to work with the previous version. Conversion script is a one-off operation to the user library.

@MartinOtter
Copy link
Member

I would propose to move those three blocks to Continuous, where they belong, now that we have a once-in-a-lifetime opportunity to do so with the conversion scripts. If there is consensus about this, I can open a proper PR with the code change ASAP.

Fine for me

@casella
Copy link
Contributor Author

casella commented Mar 3, 2020

No because the conversion script would change the user library so it can work with the new MAJOR version. It will no longer be able to work with the previous version. Conversion script is a one-off operation to the user library.

I'm confused. @beutlich mentioned 4 days ago that this change could end up in 4.1.0, which is a MINOR version. Do I miss something?

@dietmarw
Copy link
Member

dietmarw commented Mar 4, 2020

He said " MSL v5.0.0 or v4.1.0" and it will depend what the exact nature of the change is.

@beutlich beutlich removed their assignment May 4, 2020
@dietmarw dietmarw added this to the MSL5.0.0 milestone Jan 28, 2021
@dietmarw dietmarw removed their assignment Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conversion Issue addresses the conversion L: Blocks Issue addresses Modelica.Blocks task General work that is not related to a bug or feature
Projects
None yet
Development

No branches or pull requests

7 participants