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 function Math.nearestInteger #4495

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

Conversation

beutlich
Copy link
Member

Cherry-picked from #3247 as proposed by #3247 (review).

@beutlich beutlich added enhancement New feature or enhancement L: Math Issue addresses Modelica.Math labels Oct 27, 2024
@beutlich beutlich added this to the MSL4.2.0 milestone Oct 27, 2024
@beutlich beutlich mentioned this pull request Oct 27, 2024
4 tasks
Copy link
Contributor

@casella casella left a comment

Choose a reason for hiding this comment

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

LGTM

Modelica/Blocks/Math.mo Outdated Show resolved Hide resolved
Copy link
Contributor

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

More though seems needed on how to obtain a useable expression variability of the function result.

@henrikt-ma henrikt-ma self-requested a review November 12, 2024 08:10
Copy link
Contributor

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

(Just restoring my Request changes after changing my mind back and forth.)

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.

The general idea is good, but when using it outside of functions it becomes messy.

It seems we need the annotation GenerateEvents=true and update such functions in terms of variability, e.g., along the lines of modelica/ModelicaSpecification#3610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement L: Math Issue addresses Modelica.Math
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants