Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New version: Modia v0.8.2 #56088

Merged
merged 1 commit into from
Mar 6, 2022
Merged

Conversation

JuliaRegistrator
Copy link
Contributor

  • New exported functions

    • modelToJSON(model; expressionsAsStrings=true)
    • JSONToModel(json)
    • writeModel(filename, model; log=true)
    • readModel(filename; log=true)
      writeModel saves the model in JSON format on file and readModel reads the model from a JSON file.
  • Modia/examples/ServoSystem.jl enhanced, so that the hierarchical model with units is
    first stored in JSON format on file, then the model is read from file, a parameter is modified,
    and then the model is passed to @instantiateModel(..).

  • @instantiateModel(...):

    • @instantiateModel(..., logCode=true, ...) provides now correct unit type casts for scalars.
    • @instantiateModel(..., saveCodeOnFile=fileName, ...) stores the generated code on file fileName.
    • Automatically use @instantiatedModel(..., unitless=true, ..), if FloatType = MonteCarloMeasurements.XXX,
      because there are easily cases where this fails, if units are present.
  • @showModel model: Nicer pretty print if model is hierarchical.

  • New function Modia.unitAsString(unitOfQuantity),
    see Unitful issue 412 (How to get a parseable unit string PainterQubits/Unitful.jl#412).

  • Remove empty hierarchies in model parameters (seen with simulate!(..., logParameters=true)).

  • Memory allocation reduced if states or tearing variables are SVectors.

  • Improved casting and checking of types in the generated code
    (see new test model Modia/test/TestUnitAsString.jl).

  • Moved ModiaBase.Symbolic.makeDerVar from ModiaBase to new file Modia/src/Symbolic.jl (because makeDerVar needs FloatType for
    generating type-stable code and FloatType is available in Modia but not in ModiaBase).

  • Github actions workflow added for automatic tests on Linux/Windows/MacOS, for pull requests on main.

Bug fixes

  • Fixed issue with unit on macOS (exponents had been displayed as Unicode superscripts when converting
    the unit to a string, leading to errors in the further processing).

  • Hide result only if Var(hideResult=true) (previously, hideResult=false was treated as true).

  • Modia/models/Rotational.jl: Change some Int to Float64 values, because errors occured in some situations.

UUID: cb905087-75eb-5f27-8515-1ce0ec8e839e
Repo: https://github.com/ModiaSim/Modia.jl.git
Tree: e318ef3be4b47e5352db1a3085705e06201adda2

Registrator tree SHA: 8e1a5ac2695627143951512d700c7e3c445102ec
@JuliaRegistrator JuliaRegistrator temporarily deployed to stopwatch March 6, 2022 22:00 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2022

Your new version pull request met all of the guidelines for auto-merging and is scheduled to be merged in the next round.


If you want to prevent this pull request from being auto-merged, simply leave a comment. If you want to post a comment without blocking auto-merging, you must include the text [noblock] in your comment.

@JuliaTagBot JuliaTagBot merged commit 619c340 into master Mar 6, 2022
@JuliaTagBot JuliaTagBot deleted the registrator/modia/cb905087/v0.8.2 branch March 6, 2022 22:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants