Skip to content

Commit

Permalink
Rename SimulationModel -> InstantiatedModel
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinOtter committed Jun 4, 2023
1 parent e81114f commit 87c4925
Show file tree
Hide file tree
Showing 18 changed files with 145 additions and 145 deletions.
2 changes: 1 addition & 1 deletion docs/src/Internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CurrentModule = Modia
```

```@docs
SimulationModel
InstantiatedModel
generate_getDerivatives!
init!
outputs!
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ Bug fixes
- @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}`
- Change `InstantiatedModel{FloatType,ParType,EvaluatedParType,TimeType}` to `InstantiatedModel{FloatType,TimeType}`


#### Version 0.9.1
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorial/Modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ testArray1 = @instantiateModel(TestArray1, logCode=true)
Note, the generated code is shown in the REPL if `logCode=true` is defined:

```julia
function getDerivatives(_x, _m::Modia.SimulationModel{_FloatType,_TimeType} ...
function getDerivatives(_x, _m::Modia.InstantiatedModel{_FloatType,_TimeType} ...
...
v::ModiaBase.SVector{3,_FloatType} = ModiaBase.SVector{3,_FloatType}(_x[1:3])
var"der(v)" = -v
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorial/Simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ modelInstance = @instantiateModel(model; FloatType = Float64, aliasReduction=tru

The macro performs structural and symbolic transformations, generates a function for
calculation of derivatives suitable for use with [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl)
and returns [`SimulationModel`](@ref) that can be used in other functions,
and returns [`InstantiatedModel`](@ref) that can be used in other functions,
for example to simulate or plot results. Explanation of the arguments:

* `model`: model (declarations and equations)
Expand Down
2 changes: 1 addition & 1 deletion examples/Pendulum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ println("\n... Numerically linearize at stopTime = 10 with Float64 and Double64:

#= DoubleFloats is not necessarily defined in the environment
using Modia.DoubleFloats
pendulum3 = SimulationModel{Measurement{Double64}}(pendulum2)
pendulum3 = InstantiatedModel{Measurement{Double64}}(pendulum2)
(A_10_Double64, x_10_Double64) = linearize!(pendulum3, stopTime=10)
=#

Expand Down
4 changes: 2 additions & 2 deletions models/HeatTransfer/InsulatedRod2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ end


# Called once before initialization of a new simulation segment
function initSegment_InsulatedRod2!(instantiatedModel::SimulationModel{FloatType,TimeType}, path::String, ID,
function initSegment_InsulatedRod2!(instantiatedModel::InstantiatedModel{FloatType,TimeType}, path::String, ID,
parameters::AbstractDict; log=false)::Nothing where {FloatType,TimeType}
obj::InsulatedRodStruct{FloatType} = Modia.get_instantiatedSubmodel(instantiatedModel, ID)

Expand All @@ -99,7 +99,7 @@ end


# Open an initialized InsulatedRod2 model and return a reference to it
function openInsulatedRod!(instantiatedModel::SimulationModel{FloatType,TimeType}, ID)::InsulatedRodStruct{FloatType} where {FloatType,TimeType}
function openInsulatedRod!(instantiatedModel::InstantiatedModel{FloatType,TimeType}, ID)::InsulatedRodStruct{FloatType} where {FloatType,TimeType}
obj::InsulatedRodStruct{FloatType} = Modia.get_instantiatedSubmodel(instantiatedModel, ID)
Modia.copy_Vector_x_segmented_value_from_state(instantiatedModel, obj.T_startIndex, obj.T)
return obj
Expand Down
Loading

0 comments on commit 87c4925

Please sign in to comment.