Skip to content

update: SciMLBase modified ReturnCode#162

Closed
johhell wants to merge 1 commit intoModiaSim:mainfrom
johhell:RetCode
Closed

update: SciMLBase modified ReturnCode#162
johhell wants to merge 1 commit intoModiaSim:mainfrom
johhell:RetCode

Conversation

@johhell
Copy link
Copy Markdown
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
Copy Markdown
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)


# 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])
Copy link
Copy Markdown

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
Copy Markdown
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?

Copy link
Copy Markdown

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
Copy Markdown
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