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

Reset eventInfo only on entering event mode #959

Merged
merged 2 commits into from Jun 18, 2020

Conversation

AnHeuermann
Copy link
Member

@AnHeuermann AnHeuermann commented Jun 12, 2020

Fix for ticket 5367.

  • fmi2EnterEventMode will reset eventInfo. Then the FMU integrator will set newDiscreteStatesNeeded=fmi2True.
    Inside fmi2NewDiscreteStates value for valuesOfContinuousStatesChanged will stay true if it becomes true at some point.
  • valuesOfContinuousStatesChanged can't trigger another call to fmi2EventUpdate any more. Would lead to infinit loop.

@AnHeuermann
Copy link
Member Author

I added a test that validates the results with the FMUComplianceChecker for BouncingBall example.

@AnHeuermann AnHeuermann self-assigned this Jun 12, 2020
@AnHeuermann
Copy link
Member Author

AnHeuermann commented Jun 12, 2020

@adrpo or @sjoelund Jenkins will ignore my changes to the Jenkinsfile. Can one of you rebase this or move it to a branch that is allowed to change the Jenkinsfile?

@adrpo adrpo force-pushed the ticket5367-FmuMissingEvents branch from c9019cb to 7bfcd3c Compare June 16, 2020 10:33
@AnHeuermann
Copy link
Member Author

@sjoelund
I'm not happy with the changes I did to the Jenkinsfile. All I need for my test in stage testsuite-fmu-crosscompile is the build omc and fmuCheck.linx64 in PATH.
Is this a minimal change to accomplish that?

@sjoelund
Copy link
Member

I'm not sure why you needed to create an additional stage for this. It's quite expensive to install all libraries and unstash a whole omc installation for one test. Make it part of the other stage instead.

Also, the syntax of the Jenkinsfile is invalid. I gave you write access to the repository so Jenkins will trust your changes to the Jenkinsfile.

 Fix for ticket 5367.
  - `fmi2EnterEventMode` will reset `eventInfo`. Then the FMU integrator
    will set `newDiscreteStatesNeeded=fmi2True`.
    Inside fmi2NewDiscreteStates value for
    `valuesOfContinuousStatesChanged` will stay true if it becomes true
    at some point.
  - `valuesOfContinuousStatesChanged` can't trigger another call to
    `fmi2EventUpdate` any more. Would lead to infinit loop.
@AnHeuermann AnHeuermann force-pushed the ticket5367-FmuMissingEvents branch 2 times, most recently from d9da06d to 2e4c783 Compare June 17, 2020 14:13
  - Simulate bouncing ball model with fmuCheck and validate results.
  - Added test to cross-build-fmu in Jenkinsfile
@AnHeuermann
Copy link
Member Author

@sjoelund sjoelund merged commit e374ec0 into OpenModelica:master Jun 18, 2020
@lochel lochel added the COMP/FMI Issue and pull request related to FMI export label Jun 18, 2020
@lochel lochel changed the title [FMI] Reset eventInfo only on entering event mode Reset eventInfo only on entering event mode Jun 18, 2020
@AnHeuermann AnHeuermann deleted the ticket5367-FmuMissingEvents branch November 5, 2020 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/FMI Issue and pull request related to FMI export
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants