Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: FMI varname parse bug #3934#3935

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
EduardoMartinezLopez wants to merge4 commits intoSciML:master
base:master
Choose a base branch
Loading
fromEduardoMartinezLopez:FMI_varname_parse_bug_#3934

Conversation

@EduardoMartinezLopez
Copy link

@EduardoMartinezLopezEduardoMartinezLopez commentedSep 18, 2025
edited
Loading

This PRFixes#3934

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular theSciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@EduardoMartinezLopezEduardoMartinezLopez marked this pull request as ready for reviewSeptember 18, 2025 23:23
@ChrisRackauckas
Copy link
Member

This reformats the whole repo. Right now the formatter is broken so don't worry about it. Revert that.

…h any of these files except ext/MTKFMIExt.jl!"This reverts commit37c6897.
@EduardoMartinezLopez
Copy link
Author

@ChrisRackauckas Thanks! I reverted the formatter commit.

@EduardoMartinezLopez
Copy link
Author

EduardoMartinezLopez commentedSep 18, 2025
edited
Loading

@ChrisRackauckas Question for you. It seems like the existing code in MTKFMIExt > parseFMIVariableName() mutates the "name" input variable. Is that OK? My understanding is that this is considered bad practice as Julia passes by reference. Also if it the input is mutated, the convention is to add ! to the function name, right?

@ChrisRackauckas
Copy link
Member

I don't see where it mutates it. It creates a view but then creates a Symbol, which is effectively an interned string. But I don't see it actually mutating the string? Put to the line that you're worried about.

Though it probably shouldn't create the symbol there for performance reasons on large models, but that's a minor detail.

@EduardoMartinezLopez
Copy link
Author

Ok, I was concerned about thename = @view name[....] with name on the left side of an assignment. I guess that's ok with@view macro?

@ChrisRackauckas
Copy link
Member

that just makesname be a reference to a subset of what was previouslyname, no mutation there.

@AayushSabharwal
Copy link
Member

The test doesn't work

@EduardoMartinezLopez
Copy link
Author

@AayushSabharwal what is the problem with the test on your end?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@AayushSabharwalAayushSabharwalAwaiting requested review from AayushSabharwal

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Cannot create MTK model from FMU with multi-dimensional variables with derivatives

3 participants

@EduardoMartinezLopez@ChrisRackauckas@AayushSabharwal

[8]ページ先頭

©2009-2025 Movatter.jp