Skip to content

update: SciMLBase modified ReturnCode #162

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

Closed
wants to merge 1 commit into from

Conversation

johhell
Copy link
Contributor

@johhell johhell commented Feb 20, 2023

ReturnCode was changed in SciMLBase SciML/SciMLBase.jl@fba56c9

MartinOtter added a commit that referenced this pull request Mar 28, 2023
- DifferentialEquations 7.6.0 introduced a non-backwards compatible change with [#867](SciML/DifferentialEquations.jl#867). Modia was corrected to cope with this change (based on [#162](#162)).
- Newest DifferentialEquations does not longer support Measurements. Deactivated temporarily tests with measurements.
@MartinOtter
Copy link
Member

Thanks for the pull request. I have just introduced the proposed changes in main together with related changes (and deactivating temporarily tests with Measurements, since not support in DifferentialEquations 7.7.0)

@@ -258,7 +258,7 @@ function simulate!(m::SimulationModel{FloatType,TimeType}, algorithm=missing; me
eh.nFullRestartEvents, m.linearEquations)

# Raise an error, if simulation was not successful
if !(solution.retcode == :Default || solution.retcode == :Success || solution.retcode == :Terminated)
if !(solution.retcode in [ReturnCode.Default, ReturnCode.Success, ReturnCode.Terminated])

Choose a reason for hiding this comment

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

Instead of this you should use SciMLBase.successful_retcode(solution.retcode). See https://docs.sciml.ai/SciMLBase/stable/interfaces/Solutions/#retcodes

Copy link
Member

Choose a reason for hiding this comment

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

Currently, SciMLBase is not a package that is imported in Modia. Is there a way to access SciMLBase via DifferentialEquations, or is it necessary that this package is explicitly imported?

Choose a reason for hiding this comment

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

It's always re-exported by DifferentialEquations.jl

Copy link
Member

Choose a reason for hiding this comment

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

Thanks. Fixed this as you suggested.

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.

3 participants