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

Modelica.Blocks.Math.LinearDependency has strange formulation #1724

Closed
modelica-trac-importer opened this issue Jan 15, 2017 · 13 comments · Fixed by #3095
Closed

Modelica.Blocks.Math.LinearDependency has strange formulation #1724

modelica-trac-importer opened this issue Jan 15, 2017 · 13 comments · Fixed by #3095
Assignees
Labels
discussion Discussion issue that it not necessarily related to a concrete bug or feature L: Blocks Issue addresses Modelica.Blocks
Milestone

Comments

@modelica-trac-importer
Copy link

Reported by Joe Riel on 1 Jun 2015 14:58 UTC
The relatively new block LinearDependency seems strange. It's defining equation is y = y0*(1 + k1*u1 + k2*u2);. y0 is a parameter; its description says it is an initial value, which makes no sense. It is a scale factor (with a useless default of 0). However, if its value is nonzero, then one cannot produce an output with a non-zero offset. I'm thinking the block would be slightly more useful if the defining equation were y = y0 + k1*u1 + k2*u2.


Migrated-From: https://trac.modelica.org/Modelica/ticket/1724

@modelica-trac-importer modelica-trac-importer added the discussion Discussion issue that it not necessarily related to a concrete bug or feature label Jan 15, 2017
@modelica-trac-importer
Copy link
Author

Comment by Joe Riel on 1 Jun 2015 15:32 UTC
A correction. A nonzero value of y0, which is practically necessary to have a useful block, means the offset must be nonzero. With the proposed change, the offset is independent of the gains.

@modelica-trac-importer
Copy link
Author

Modified by dietmarw on 1 Jun 2015 20:14 UTC

@modelica-trac-importer modelica-trac-importer added the L: Blocks Issue addresses Modelica.Blocks label Jan 15, 2017
@modelica-trac-importer
Copy link
Author

Modified by beutlich on 18 Aug 2015 12:08 UTC

@modelica-trac-importer
Copy link
Author

Comment by beutlich on 31 Aug 2015 09:29 UTC
There is only one component of LinearDependency in the MSL, however the Real output Modelica.Blocks.Examples.RealNetwork1.linearDependency1.y is not used in the example model.

@modelica-trac-importer
Copy link
Author

Comment by otter on 28 Sep 2015 11:45 UTC
The proposal would lead to a non-backwards compatible change of the library (which is not possible with MSL 3.2.1 build 4). Therefore, the milestone is moved to 3.2.2.

To avoid a non-backwards compatible change in 3.2.2, I would suggest to just improve the documentation of this block (and the use case for which it was designed).

@modelica-trac-importer
Copy link
Author

Modified by otter on 11 Dec 2015 14:20 UTC

@modelica-trac-importer
Copy link
Author

Comment by ahaumer on 18 Dec 2015 12:05 UTC
IMHO the implementation is erroneous and will be changed when a conversion script is applicable. This is stated in the documenation of the block.

@modelica-trac-importer modelica-trac-importer modified the milestones: MSL_next-MAJOR-version, MSL3.2.2 Jan 15, 2017
@modelica-trac-importer
Copy link
Author

Comment by beutlich on 20 Dec 2015 20:45 UTC
I reverted the changes from 811c96e of Math.mo with 8bd005c since

  • it is not clear if this change went in by design or by side-effect (no commit message was given)
  • the comment used the undesired h3 headline
  • the formula in the comment was invalid.

Please revise again for MSL 3.2.2. For that reason I changed the milestone back to MSL 3.2.2 which should be reset again once the comment is without errors. Sorry for the extra work.

@modelica-trac-importer modelica-trac-importer modified the milestones: MSL3.2.2, MSL_next-MAJOR-version Jan 15, 2017
@modelica-trac-importer
Copy link
Author

Comment by ahaumer on 23 Dec 2015 18:28 UTC
Please, do not revert - give a comment what's wrong in your opinion.

Once again: IMHO the implementation is wrong and will be corrected in the next major version (conversion script needed; ticket remains open). This is stated in the documentation (92389bf).

@modelica-trac-importer modelica-trac-importer modified the milestones: MSL_next-MAJOR-version, MSL3.2.2 Jan 15, 2017
@beutlich
Copy link
Member

Point to @JoeRiel.

beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this issue Apr 8, 2019
@beutlich beutlich self-assigned this Apr 9, 2019
@beutlich beutlich assigned MartinOtter and unassigned beutlich Aug 9, 2019
@beutlich
Copy link
Member

beutlich commented Aug 9, 2019

My proposal #2886 was rejected by @MartinOtter .

@AHaumer @MartinOtter Please provide an alternative fix!

@JoeRiel
Copy link
Contributor

JoeRiel commented Aug 9, 2019 via email

@beutlich
Copy link
Member

#3088 is my second attempt to fix this issue.

@beutlich beutlich assigned beutlich and unassigned AHaumer and MartinOtter Aug 10, 2019
beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this issue Aug 18, 2019
beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this issue Aug 18, 2019
Guarantee backward compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion issue that it not necessarily related to a concrete bug or feature L: Blocks Issue addresses Modelica.Blocks
Projects
None yet
5 participants