Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Releases: ModiaSim/ModiaLang.jl

v0.11.3

28 Feb 17:48
Compare
Choose a tag to compare

ModiaLang v0.11.3

Diff since v0.11.2

  • simulate!(..): Unnecessary evaluation of the parameters dictionary is avoided
    (if merge = missing, nothing or has no elements).

  • @instantiateModel(..): Var(hideResult=true) is no longer ignored if present in a sub-component.

v0.11.2

23 Feb 08:00
Compare
Choose a tag to compare

ModiaLang v0.11.2

Diff since v0.11.1

  • Minor (efficiency) improvement if states are SVectors.
  • Require ModiaBase 0.9.2 (to get rid of performance issues in Modia3D).
  • Replace ustrip(..) with ustrip.(..) at some places to get rid of warnings.

v0.11.1

21 Feb 15:19
Compare
Choose a tag to compare

ModiaLang v0.11.1

Diff since v0.11.0

Update of Manifest.toml file

v0.11.0

20 Feb 21:28
Compare
Choose a tag to compare

ModiaLang v0.11.0

Diff since v0.10.0

Non-backwards compatible changes

  • Equations can only be defined with key equations and no other key.

  • Parameter values in the code are now type cast to the type of the parameter value from the
    @instantiatedModel(..) call. The benefit is that access of parameter values in the code is type stable
    and operations with the parameter value are more efficient and at run-time no memory is allocated.
    Existing models can no longer be simulated, if parameter values provided via simulate!(.., merge=xx) are not
    type compatible to their definition. For example, an error is thrown if the @instantedModel(..) uses a Float64 value and the
    simulate!(.., merge=xx) uses a Measurement{Float64} value for the same parameter

Other changes

  • Hierarchical names in function calls supported (e.g. a.b.c.fc(..)).

  • Functions can return multiple values, e.g. (tau1,tau2) = generalizedForces(derw1, derw2).

  • Support for StaticArrays variables (the StaticArrays feature is kept in the generated AST).
    For an example, see ModiaLang/test/TestArrays.jl.

  • Support for Array variables (especially of state and tearing variables)
    where the dimension can change after @instantiateModel(..).
    For examples, see ModiaLang/test/TestArrays.jl and TestMultiReturningFunction10.jl.

  • New keyword Var(hideResult=true) removes variable from the result (has no effect on states, derivative of states and parameters).
    For an example, see ModiaLang/test/TestMultiReturningFunction10.jl

  • New feature of @instantiatedModel(..): If a Model(..) has key :_buildFunction, call this function to merge additional code to the model.
    For details see the docu of function buildSubModels! in ModiaLang.jl.
    For examples, see ModiaLang/test/TestMultiReturningFunction10.jl and
    constructor Model3D(..) in Modia3D/src/ModiaInterface/model3D.jl and Modia3D/src/ModiaInterface/buildModia3D.jl.

  • Generalized connection semantics.

  • Functions converting model to/from JSON: modelToJSON(model), JSONtoModel(json_string)

  • simulate!(..):

    • New option logProgress=false in function simulate!(..) to print current simulation time every 5s (cpu-time).
    • If tolerance is too small, a warning is prented and it is automatically enlarged to a meaningful value
      (e.g. tolerance = 1e-8 is not useful if FloatType=Float32)
    • Logging improved: If log=true or logTiming=true, then timing, memory allocation and compilation time is
      reported for initialization (ths includes compilation of the generated getDerivatives(..) function).
      The remaining log shows cpu-time and memory allocation without initialization
      (and without the resources needed to compile getDerivatives(..)).
    • Prefix messages of the timers with "ModiaLang" or "DifferentialEquations" to more clearly see
      the origin of a message in the timer log.
  • Large speedup of symbolic transformation, if function depends on many input (and output) arguments
    (includes new operator implicitDependency(..)).

  • Included DAE-Mode in solution of linear equation system (if DAE integrator is used and all unknowns of a linear
    equation system are part of the DAE states, solve the linear equation system during continuous integration
    via DAE solver (= usually large simulation speed-up, for larger linear equation systems)

Bug fixes

  • If unitless=true, units in instantiatedModel.evaluatedParameters are removed.

  • The unit macro is kept in the generated code and is no longer expanded. For example, u"N", is kept in the code that is
    displayed with logCode=true (previously, this was expanded and the unit was displayed in the code as N which is not correct Julia code).

  • Function ModiaLang.firstInitialOfAllSegments(..) now correctly returns true for the first call of the getDerivatives function during the simulation.

Merged pull requests:

v0.10.0

05 Feb 01:56
Compare
Choose a tag to compare

ModiaLang v0.10.0

Diff since v0.9.1

  • Require DifferentialEquations.jl version 7.
  • Cleanup of using/export
  • Cleanup of Project.toml/Manifest.toml.´
  • @reexport using Unitful
  • @reexport using DifferentialEquations
  • Cleanup of test files (besides ModiaLang, no other package needed in the environment to run the tests).
  • Change SimulationModel{FloatType,ParType,EvaluatedParType,TimeType} to SimulationModel{FloatType,TimeType}

Merged pull requests:

v0.9.1

04 Feb 11:20
Compare
Choose a tag to compare

ModiaLang v0.9.1

Diff since v0.9.0

  • New function plotPath to plot a PTP_path
  • Replace ustrip(..) with ustrip.(..) at some places to get rid of warnings.
  • Include time in error message, if simulation failed

v0.9.0

03 Feb 13:52
Compare
Choose a tag to compare

ModiaLang v0.9.0

Diff since v0.8.7

  • Require Julia 1.7
  • Upgrade Manifest.toml to version 2.0
  • Update Project.toml/Manifest.toml

v0.8.7

03 Feb 00:11
Compare
Choose a tag to compare

ModiaLang v0.8.7

Diff since v0.8.6

  • Packages used in test models, prefixed with ModiaLang. to avoid missing package errors.
  • Deactivating test with DoubleFloats, since not in Project.toml
  • Version/date updated

v0.8.6

02 Feb 18:18
Compare
Choose a tag to compare

ModiaLang v0.8.6

Diff since v0.8.5

  • Require ModiaResult, version 0.3.9
  • Project.toml/Manifest.toml updated

v0.8.5

02 Feb 09:44
Compare
Choose a tag to compare

ModiaLang v0.8.5

Diff since v0.8.4

  • simulate!(..):

    • Trigger an error, if simulation is not successful (retcode is neither :Default nor :Success nor :Terminate)
    • Use RightRootFind for zero crossings (improves state events based on new DifferentialEquations option)
    • New keyword argument requiredFinalStates_atol=0.0.
    • Improve docu (e.g. add return argument solution).
    • Show correct integrator name QBDF in simulation log (instead of QNDF)
    • Raise an error, if (relative) tolerance is too small for FloatType
    • Use FloatType for zero crossing hysteresis, instead of Float64
    • If log=true print info about end of initialization.
  • Support of MonteCarloMeasurements with units + new test model TestLinearEquationSystemWithUnitsAndMonteCarlo.jl

  • Fixing and activating the deactivated test TestTwoInertiasAndIdealGearWithUnitsAndMonteCarlo.jl.