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

Be clearer about showStartAttributes. #3604

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

HansOlsson
Copy link
Collaborator

Closes #3406

Copy link

@d-hedberg d-hedberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give tools more freedom to show what makes most sense when showStartAttribute is not specified.

chapters/annotations.tex Outdated Show resolved Hide resolved
chapters/annotations.tex Outdated Show resolved Hide resolved
chapters/annotations.tex Outdated Show resolved Hide resolved
chapters/annotations.tex Outdated Show resolved Hide resolved
HansOlsson and others added 2 commits November 7, 2024 13:28
Co-authored-by: Henrik Tidefelt <[email protected]>
Co-authored-by: Henrik Tidefelt <[email protected]>
@HansOlsson HansOlsson added this to the 2024-Decemeber milestone Dec 4, 2024
chapters/annotations.tex Outdated Show resolved Hide resolved
@HansOlsson HansOlsson modified the milestones: 2024-December, 2025-January Jan 8, 2025
@HansOlsson
Copy link
Collaborator Author

To me this:

  • Gives tools the freedom to show start-values when appropriate
  • Gives model developers the possibility to override that

The only part that seem controversial is the interaction between values of connectorSizing and showStartAttributes and showing the variable in the parameter-dialog, but I don't see any practical issues with it, only that it looks a bit impure.

As an example consider:

   Real x1 annotation(Dialog(showStartAttribute=false));
   Real x2 annotation(Dialog(showStartAttribute=false,group="Start"));
   Real x3 annotation(Dialog(showStartAttribute=true));
   Real x4 annotation(Dialog(showStartAttribute=true,group="Start"));

giving something like:
image

@henrikt-ma
Copy link
Collaborator

It is precisely the difference between the visibility of x1 and x3 that bothers me. The showStartAttribute should not have anything to do with whether the variable is visible or not, just tell whether it is the value or the start/fixed which is exposed in case the variable is visible.

@HansOlsson
Copy link
Collaborator Author

It is precisely the difference between the visibility of x1 and x3 that bothers me. The showStartAttribute should not have anything to do with whether the variable is visible or not, just tell whether it is the value or the start/fixed which is exposed in case the variable is visible.

The logical and strict case would be that x3 wouldn't be visible either (so one would have to write Real x3 annotation(Dialog(showStartAttribute=true, group="Initialization")); to ensure that it is shown as in the picture above).

The proposed text allows that; it's just that it will be seen as cumbersome for some.

@HansOlsson HansOlsson modified the milestones: 2025-January, 2025-February Feb 5, 2025
@henrikt-ma
Copy link
Collaborator

The proposed text allows that; it's just that it will be seen as cumbersome for some.

Of course it is allowed, and yes, some will perceive it as cumbersome. Others will appreciate a separation of concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Appearance of initialization variables in the parameter dialog
3 participants