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

Change state event into time event to avoid warning in Modelica.Fluid.Examples.AST_BatchPlant.BaseClasses.Controller #2606

Merged
merged 1 commit into from
Jun 12, 2018

Conversation

dietmarw
Copy link
Member

No description provided.

@dietmarw dietmarw added L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation) V: 3.2.3-beta.2 Issue originates in MSL v3.2.3-beta.2 (and is not present in earlier releases) labels Jun 11, 2018
@beutlich beutlich added example Issue only addresses example(s) and removed V: 3.2.3-beta.2 Issue originates in MSL v3.2.3-beta.2 (and is not present in earlier releases) labels Jun 11, 2018
@beutlich beutlich added this to the MSL3.2.3 milestone Jun 11, 2018
Copy link
Contributor

@HansOlsson HansOlsson 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.

@beutlich beutlich changed the title Change state event into time event to avoid warning. Change state event into time event to avoid warning in Modelica.Fluid.Examples.AST_BatchPlant.BaseClasses.Controller Jun 11, 2018
Copy link
Member

@hubertus65 hubertus65 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.

@hubertus65 hubertus65 merged commit e69a99a into modelica:master Jun 12, 2018
@beutlich beutlich assigned hubertus65 and unassigned beutlich Jun 12, 2018
@beutlich beutlich removed the request for review from casella June 12, 2018 11:39
@dietmarw dietmarw deleted the timeEvent branch June 12, 2018 12:13
@casella
Copy link
Contributor

casella commented Jun 12, 2018

I'm fine with this change, but I still wonder why Dymola can turn time >= 2500 into a time event but cannot do that for time > 2500.

If time was a real Real variable, I would understand the difference, but if it is just an IEEE floating point approximation, what is the difference? Equality among floats doesn't mean anything, right?

@HansOlsson
Copy link
Contributor

HansOlsson commented Jun 13, 2018

I'm fine with this change, but I still wonder why Dymola can turn time >= 2500 into a time event but cannot do that for time > 2500.

Because the Modelica specification in 8.5 Events and Synchronization says:
It is a quality of implementation issue that the following special relations
time >= discrete expression
time < discrete expression
trigger a time event at “time = discrete expression”, i.e., the event instant is known in advance and no iteration is needed to find the exact event instant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example Issue only addresses example(s) L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants