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

Commit

Permalink
Change version number to 0.11, required ModiaBase 0.9, update release…
Browse files Browse the repository at this point in the history
… notes
  • Loading branch information
MartinOtter committed Feb 20, 2022
1 parent a68e241 commit ec3d369
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ModiaLang"
uuid = "34b37210-eaa3-4b48-8781-0b87bf559981"
authors = ["Hilding Elmqvist <[email protected]>", "Martin Otter <[email protected]>"]
version = "0.11.0-dev"
version = "0.11.0"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand Down Expand Up @@ -30,7 +30,7 @@ FiniteDiff = "2"
ForwardDiff = "0.10"
JSON = "0.21"
Measurements = "2"
ModiaBase = "0.9, 0.8"
ModiaBase = "0.9"
ModiaResult = "0.4.0"
MonteCarloMeasurements = "1"
OrderedCollections = "1"
Expand Down
51 changes: 37 additions & 14 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,47 +28,70 @@ julia> ]add ModiaPlot_PyPlot # if plotting with PyPlot desired

## Release Notes

### Version 0.11.0-dev
### Version 0.11.0

Non-backwards compatible improvements
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 improvements
`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)`.

- Generalized connection semantics.

- New option `logProgress=false` in function `simulate!(..)` to print current simulation time every 5s (cpu-time).

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

- Large speedup of symbolic transformation, if function depends on many input (and output) arguments
(includes new operator `implicitDependency(..)`).

- 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.


### Version 0.10.0
Expand Down

0 comments on commit ec3d369

Please sign in to comment.