Skip to content

Commit 9024cc6

Browse files
committed
docs: types in parameters, variables and structural_parameters in @mtkmodel
1 parent 1e2802a commit 9024cc6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/basics/MTKModel_Connector.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ end
220220
```
221221

222222
!!! note
223-
223+
224224
For more examples of usage, checkout [ModelingToolkitStandardLibrary.jl](https://github.com/SciML/ModelingToolkitStandardLibrary.jl/)
225225

226226
## More on `Model.structure`
@@ -234,7 +234,7 @@ end
234234
parameter arrays, length is added to the metadata as `:size`.
235235
- `:variables`: Dictionary of symbolic variables mapped to their metadata. For
236236
variable arrays, length is added to the metadata as `:size`.
237-
- `:kwargs`: Dictionary of keyword arguments mapped to their default values.
237+
- `:kwargs`: Dictionary of keyword arguments mapped to their metadata.
238238
- `:independent_variable`: Independent variable, which is added while generating the Model.
239239
- `:equations`: List of equations (represented as strings).
240240

@@ -246,7 +246,7 @@ Dict{Symbol, Any} with 7 entries:
246246
:components => [[:model_a, :ModelA]]
247247
:variables => Dict{Symbol, Dict{Symbol, Any}}(:v=>Dict(:default=>:v_var), :v_array=>Dict(:size=>(2, 3)))
248248
:icon => URI("https://github.com/SciML/SciMLDocs/blob/main/docs/src/assets/logo.png")
249-
:kwargs => Dict{Symbol, Any}(:f=>:sin, :v=>:v_var, :v_array=>nothing, :model_a__k_array=>nothing, :p1=>nothing)
249+
:kwargs => Dict{Symbol, Dict}(:f=>Dict(:value=>:sin), :v=>Dict{Symbol, Union{Nothing, Symbol}}(:value=>:v_var, :type=>nothing), :v_array=>Dict(:value=>nothing, :type=>nothing), :p1=>Dict(:value=>nothing))
250250
:independent_variable => t
251251
:extend => Any[[:p2, :p1], Symbol("#mtkmodel__anonymous__ModelB"), :ModelB]
252252
:equations => ["model_a.k ~ f(v)"]
@@ -323,7 +323,7 @@ The conditional parts are reflected in the `structure`. For `BranchOutsideTheBlo
323323
julia> BranchOutsideTheBlock.structure
324324
Dict{Symbol, Any} with 5 entries:
325325
:components => Any[(:if, :flag, [[:sys1, :C]], Any[])]
326-
:kwargs => Dict{Symbol, Any}(:flag=>true)
326+
:kwargs => Dict{Symbol, Dict}(:flag=>Dict{Symbol, Bool}(:value=>1))
327327
:independent_variable => t
328328
:parameters => Dict{Symbol, Dict{Symbol, Any}}(:a1=>Dict(:condition=>(:if, :flag, Dict{Symbol, Any}(:kwargs => Dict{Any, Any}(:a1 => nothing), :parameters => Any[Dict{Symbol, Dict{Symbol, Any}}(:a1 => Dict())]), Dict{Symbol, Any}(:kwargs => Dict{Any, Any}(:a2 => nothing), :parameters => Any[Dict{Symbol, Dict{Symbol, Any}}(:a2 => Dict())]))
329329
:equations => Any[(:if, :flag, ["a1 ~ 0"], ["a2 ~ 0"])]

0 commit comments

Comments
 (0)