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

Add a first figure to Modelica.Blocks.Examples.PID_Controller #4094

Merged
merged 5 commits into from
Jan 24, 2024

Conversation

henrikt-ma
Copy link
Contributor

With love from the Modelica design meeting held this week:

This PR adds the first case of an example making use of the Modelica Figure annotation introduced in Modelica 3.5. Note that this means there are actually two important changes in this PR:

  • Switching language version to Modelica 3.5.
  • Adding a figure to the PID_Controller example.

This is what the added figure looks like in System Modeler:
image

@dietmarw
Copy link
Member

I guess before such change can be accepted the MAP-LIB project first of all needs to have some strategic decision on what the next release is going to be and what MLS version it should be based on.

@beutlich beutlich added requires Modelica 3.5 Issue that requires Modelica Language Specification 3.5 enhancement New feature or enhancement labels Mar 20, 2023
Copy link
Contributor

@DagBruck DagBruck left a comment

Choose a reason for hiding this comment

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

Tested in Dymola 2023x Refresh1.

@beutlich beutlich changed the title First figure First figure (Modelica Language Specification version 3.5) Oct 18, 2023
henrikt-ma and others added 2 commits October 18, 2023 21:48
Co-authored-by: Thomas Beutlich <[email protected]>
This reverts commit c015bfc.

Bumping language version is now made the separate PR modelica#4208.
@henrikt-ma
Copy link
Contributor Author

With the bumping of Modelica language version now being done separately in #4208, I removed this part of the present PR, leaving just the first figure.

Modelica/Blocks/package.mo Outdated Show resolved Hide resolved
Co-authored-by: tobolar <[email protected]>
@tobolar
Copy link
Contributor

tobolar commented Oct 24, 2023

@henrikt-ma Looking forward to use this widely!

Any decission to use Figure.preferred = true in MSL per default?

@HansOlsson
Copy link
Contributor

@henrikt-ma Looking forward to use this widely!

Any decission to use Figure.preferred = true in MSL per default?

One consideration would be if there are multiple figures, I prefer not to have more than one preferred and usually have one preferred.
(First part is based on the general rule: if everything is x nothing is x).

@henrikt-ma henrikt-ma changed the title First figure (Modelica Language Specification version 3.5) First figure Jan 15, 2024
@henrikt-ma
Copy link
Contributor Author

@casella, with #4208 out of the way, wouldn't it be great to add this for 4.1 so that everyone has at least one example as source of inspiration for adding more figures?

@henrikt-ma henrikt-ma added this to the MSL4.1.0 milestone Jan 24, 2024
Copy link
Contributor

@maltelenz maltelenz left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@AHaumer
Copy link
Contributor

AHaumer commented Jan 24, 2024

Discussed it in today's MAP-Lib meeting, will merge this, need a second reviewer

@AHaumer AHaumer merged commit d0ff9bc into modelica:master Jan 24, 2024
1 check passed
@AHaumer
Copy link
Contributor

AHaumer commented Jan 24, 2024

@TManikantan please back-port this to the 4.1.0 alpha-branch

@henrikt-ma henrikt-ma deleted the first-figure branch January 24, 2024 09:16
@Harisankar-Allimangalath
Copy link
Contributor

Harisankar-Allimangalath commented Jan 25, 2024

@AHaumer the branch is deleted from the repo and I can't access it so all I could do is cherry pick that commit from master and then add it to the maint/4.1.0. but I don't know if that is a standard MSL work flow or even allowed to do it @henrikt-ma .

As far as I know, you will still be having that branch in the local checkout, you can either push it directly to the maint/4.1.0 or to this repo and I shall look into adding it to the maint/4.1.0.

@henrikt-ma henrikt-ma restored the first-figure branch January 25, 2024 13:31
@henrikt-ma
Copy link
Contributor Author

I'm not sure we have developed routines for how to do this, but in case it helps, I have now restored the branch.

maltelenz pushed a commit to maltelenz/ModelicaStandardLibrary that referenced this pull request Jan 29, 2024
@beutlich beutlich added example Issue only addresses example(s) L: Blocks Issue addresses Modelica.Blocks labels Mar 28, 2024
@beutlich beutlich changed the title First figure Add a first figure to Modelica.Blocks.Examples.PID_Controller Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement example Issue only addresses example(s) L: Blocks Issue addresses Modelica.Blocks requires Modelica 3.5 Issue that requires Modelica Language Specification 3.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants