Releases: ModiaSim/Modia.jl
v0.12.1
Modia v0.12.1
Pull request #170
Merged pull requests:
- Update for [email protected] (#170) (@johhell)
Modia v0.12.0
Modia v0.12.0
- Improved documentation of built-in component functions.
Non-backwards compatible changes:
- Renamed struct
SimulationModel
toInstantiatedModel
. - Renamed function
get_scalar_x_segmented_value
tocopy_scalar_x_segmented_value_from_state
- Renamed function
get_SVector3_x_segmented_value
tocopy_SVector3_x_segmented_value_from_state
- Renamed function
get_Vector_x_segmented_value!
tocopy_Vector_x_segmented_value_from_state
- Renamed function
add_der_x_segmented_value!
tocopy_der_x_segmented_value_to_state
- Renamed function
add_w_segmented_value!
tocopy_w_segmented_value_to_result
v0.11.0
Modia v0.11.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:
- Prepare release 0.11.0 (#166) (@MartinOtter)
v0.10.0
Modia v0.10.0
- Initial support of segmented simulations where the number of states can change during simulation.
For examples, seeModia/test/TestHeatTransfer2.jl
and models in directoryModia3D/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:
- Release0.10.0 (#165) (@MartinOtter)
v0.9.4
Modia v0.9.4
- Precompile statements included (compilation of Modia package takes more time, but startup of Modia model simulations is faster).
@instantiateModel(..., logFile=true)
: New keyword argumentlogFile
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:
Merged pull requests:
- Improve signal tables (#153) (@MartinOtter)
- add snoopPrecompile + other improvements (#156) (@MartinOtter)
- SciMLBase.FullSpecialize (#157) (@MartinOtter)
- Use DiffEqBase 6.104.3 + reactivate MonteCarloSimulation tests (#158) (@MartinOtter)
- Fix logCalculation=true skips actual work for residual (#161) (@RagibHasin)
- Update version message (#164) (@MartinOtter)
v0.9.3
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
Modia 0.9.2
- 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
Modia 0.9.1
-
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
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
-
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 exampleModia/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 withwriteSignalTable(filename, instantiatedModel)
, see firstOrder.json (or in HDF5 format via JDL). You get an overview of a simulation result viashowInfo(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
- A hierarchical model name with a derivative operator, say
der(a.b.c)
, has now the correct namea.b.der(c)
in the result. For example, the plot command needs to be changed toplot(..., "a.b.der(c)")
instead of the previous commandplot(..., "der(a.b.c)")
. - The initial state vector was not always correctly filled with start/init values of the model (is now fixed).
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 variablev
(especially, a complex internal data structure) is not stored in the result if defined asv = Var(hideResult=true)
. In some rare cases,deepcopy(..)
gives an error (if module variables are, for whatever reason, tried to be copied). Such variablesv
need to be declared withv = 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.