Skip to content

Releases: ModiaSim/Modia.jl

v0.12.1

05 Nov 23:51
Compare
Choose a tag to compare

Modia v0.12.1

Diff since v0.12.0

Pull request #170

Merged pull requests:

Modia v0.12.0

04 Jun 14:44
a3f179f
Compare
Choose a tag to compare

Modia v0.12.0

Diff since v0.11.0

  • Improved documentation of built-in component functions.

Non-backwards compatible changes:

  • Renamed struct SimulationModel to InstantiatedModel.
  • Renamed function get_scalar_x_segmented_value to copy_scalar_x_segmented_value_from_state
  • Renamed function get_SVector3_x_segmented_value to copy_SVector3_x_segmented_value_from_state
  • Renamed function get_Vector_x_segmented_value! to copy_Vector_x_segmented_value_from_state
  • Renamed function add_der_x_segmented_value! to copy_der_x_segmented_value_to_state
  • Renamed function add_w_segmented_value! to copy_w_segmented_value_to_result

v0.11.0

04 Jun 08:01
572ab57
Compare
Choose a tag to compare

Modia v0.11.0

Diff since v0.10.0

  • Require ModiaBase 0.11.1
  • Manifest.toml file removed.
  • test.yml for github actions changed to use Julia 1.9.0

Non-backwards compatible changes

These changes only influence models that use the new feature of built-in components.

  • _buildFunction argument list changed (options of @instantiateModel added)

Merged pull requests:

v0.10.0

29 May 17:42
ff2a4e2
Compare
Choose a tag to compare

Modia v0.10.0

Diff since v0.9.4

  • Initial support of segmented simulations where the number of states can change during simulation.
    For examples, see Modia/test/TestHeatTransfer2.jl and models in directory Modia3D/test/Segmented
    (of release 0.12.0 and later). The tutorial will be updated for this feature in an upcoming version.

Non-backwards compatible changes

These changes should usually not influence user models, since these functions are typically not directly called by a user.

  • _buildFunction = <functionName> changed to _buildFunction = Par(functionName = <functionName>) and
    changed argument list of <functionName>.
  • _instantiateFunction = Par(..) changed to _initSegmentFunction = Par(functionName = <functionName>)
    and changed argument list of <functionName>.

Merged pull requests:

v0.9.4

21 May 19:16
Compare
Choose a tag to compare

Modia v0.9.4

Diff since v0.9.3

  • Precompile statements included (compilation of Modia package takes more time, but startup of Modia model simulations is faster).
  • @instantiateModel(..., logFile=true): New keyword argument logFile in order that log of file and line number can be
    switched off, when @instantiateModel is called.
  • Error messages improved, when model errors result in failed evaluation of parameters.
  • Log of statistics improved and included in writeSignalTable(..) of instantiatedModel.
  • SignalTables.getSignalNames(..): Order of signal names improved so that the linear listing reflects the hierarchy of the names.
  • writeSignalTable(..): attributes renamed to _attributes. All used simulate!(..) options included in Map experiment.
  • Require SignalTables 0.4.2 (since several issues fixed with writeSignalTable(..)).
  • Update to newest versions of packages.

Bug fixes

  • DifferentialEquations 7.6.0 introduced a non-backwards compatible change with #867. Modia was corrected to cope with this change (based on #162).
  • @instantiateModel(..., logCalculations=true) skipped actual computations. This was fixed via #161.

Closed issues:

  • Link to documentation broken (#159)
  • Precompilation fails (#163)

Merged pull requests:

v0.9.3

05 Aug 07:00
f0fec8a
Compare
Choose a tag to compare

Modia 0.9.3

  • Requires SignalTables 0.4.0 (introduces Map-signal)
  • getSignalNames(...; getVar=true, getPar=true, getMap=true): New keyword arguments to filter names.
  • writeSignalTable(instantiatedModel,..): Include attributes = Map(model=..., experiment=...).
  • Some internal bug-fixes.
  • Update to newest DifferentialEquations.jl and DiffEqBase

v0.9.2

12 Jul 14:25
Compare
Choose a tag to compare

Modia 0.9.2

Diff since v0.9.1

  • Bug fix: integrator IDA() can be used (especially to avoid solving large linear equation systems in the model).
    Extend some test models to use IDA().

v0.9.1

07 Jul 13:02
b034baa
Compare
Choose a tag to compare

Modia 0.9.1

Diff since v0.9.0

  • Requires SignalTables 0.3.5.

  • @usingModiaPlot: corrected and fixed in docu. Alternatively, @usingPlotPackage can be used,
    provided package SignalTables is present in your current environment.

  • Internal: A function call in the generated code prefixed with Modia..

v0.9.0

05 Jul 17:59
958fad1
Compare
Choose a tag to compare

Modia 0.9.0

Before using this new Modia version, it is probably best to first remove all "old" Modia related packages from your current environment and then add the new packages:

]
remove Modia, Modia3D, ModiaResult, ModiaPlot_PyPlot, ModiaPlot_GLMakie
add Modia, Modia3D, SignalTables, SignalTablesInterface_PyPlot, SignalTablesInterface_GLMakie

Diff since v0.8.4

  • This version is slightly non-backwards compatible to 0.8.x. Most important, the result handling has been changed. Especially, package ModiaResult.jl has been replaced by package SignalTables.jl. Also the plot package interfaces ModiaPlot_PyPlot, ModiaPlot_GLMakie etc. have been replaced by packages SignalTablesInterface_PyPlot, SignalTablesInterface_GLMakie etc. In order that plotting works again with your models, you have to add one of the new plot package interfaces, e.g. ]add SignalTablesInterface_PyPlot. One benefit is, that the plot packages have now access to all attributes associated with a variable.

  • An instantiated model (as returned from @instantiateModel(..)) is now a signal table according to SignalTables.jl. This means that all functions defined for a signal table (see function overview) can be applied on a simulated model. Hereby, all Var(..) and Par(..) Modia variables are seen as signals of the signal table (so both time varying variables, as well as parameters). See example Modia/test/TestFirstOrder2.jl.
    For example, it is now possible to store simulation results (together with all parameter and start values) on file in JSON format with writeSignalTable(filename, instantiatedModel), see firstOrder.json (or in HDF5 format via JDL). You get an overview of a simulation result via showInfo(instantiatedModel).

  • New functions hasParameter, getParameter, getEvaluatedParameter, showParameters, showEvaluatedParameters to get parameter/init/start values by name (e.g. getEvaluatedParameter(instantiatedModel, "a.b.c")) or show all parameters.

  • New functions to add states and algebraic variables from within functions that are not visible in the generated code (see Variable definitions in functions and example Modia/test/TestLinearSystems.jl). This feature is used in the next version of Modia3D to allow (Modia3D) model changes after code generation and to get more light weight code.

  • simulate!(..): Maximum number of iterations is switched off (DifferentialEquations.jl option set to: maxiters = Int(typemax(Int32)) ≈ 2e9).

  • Docu improved.

Bug fixes

  1. A hierarchical model name with a derivative operator, say der(a.b.c), has now the correct name a.b.der(c) in the result. For example, the plot command needs to be changed to plot(..., "a.b.der(c)") instead of the previous command plot(..., "der(a.b.c)").
  2. The initial state vector was not always correctly filled with start/init values of the model (is now fixed).
  3. signalNames(instantiatedModel) did sometimes not show the correct signal names available in the result (is now fixed).
    signalNames is deprecated. Use instead getSignalNames.

Non-backwards compatible changes

  • Bug fix 1 can lead for some models to warnings and the selected variable is no longer plotted (-> the model needs to be changed).

  • Bug fix 2 can lead for some models to a different result (without notice).

  • The result data structure is now constructed with deepcopy(..) of every involved result variable. Previously, for some result variables just the variable reference was stored. The effect is that if previously a complex internal data structure was incorporated into the result data structure, then it was present just once. Now, a deepcopy of the data structure is stored at every time instant. Note, a variable v (especially, a complex internal data structure) is not stored in the result if defined as v = Var(hideResult=true). In some rare cases, deepcopy(..) gives an error (if module variables are, for whatever reason, tried to be copied). Such variables v need to be declared with v = Var(hideResult=true), in order that this error does not appear (and these variables are then not stored in the result).

  • Function rawSignal(instantiatedModel, name) is no longer supported. Use getValues or getSignal instead.

  • Function getPlotSignal(instantiatedModel, name) is no longer supported. Use getFlattenedSignal instead.

  • Function getPath(path, ...) does no longer return a dictionary but a SignalTable.

v0.8.4

05 Jul 08:15
8c8ab98
Compare
Choose a tag to compare

Modia 0.8.4

Diff since v0.8.3

  • Fix issue with DiffEqBase, version 6.91.6 and later.