63
63
@structural_parameters begin
64
64
f = sin
65
65
N = 2
66
+ M = 3
66
67
end
67
68
begin
68
69
v_var = 1.0
69
70
end
70
71
@variables begin
71
72
v(t) = v_var
72
- v_array(t)[1:2 , 1:3 ]
73
+ v_array(t)[1:N , 1:M ]
73
74
v_for_defaults(t)
74
75
end
75
76
@extend ModelB(; p1)
@@ -310,10 +311,10 @@ end
310
311
- ` :defaults ` : Dictionary of variables and default values specified in the ` @defaults ` .
311
312
- ` :extend ` : The list of extended unknowns, name given to the base system, and name of the base system.
312
313
- ` :structural_parameters ` : Dictionary of structural parameters mapped to their metadata.
313
- - ` :parameters ` : Dictionary of symbolic parameters mapped to their metadata. For
314
- parameter arrays, length is added to the metadata as ` :size ` .
315
- - ` :variables ` : Dictionary of symbolic variables mapped to their metadata. For
316
- variable arrays, length is added to the metadata as ` :size ` .
314
+ - ` :parameters ` : Dictionary of symbolic parameters mapped to their metadata. Metadata of
315
+ the parameter arrays is, for now, omitted .
316
+ - ` :variables ` : Dictionary of symbolic variables mapped to their metadata. Metadata of
317
+ the variable arrays is, for now, omitted .
317
318
- ` :kwargs ` : Dictionary of keyword arguments mapped to their metadata.
318
319
- ` :independent_variable ` : Independent variable, which is added while generating the Model.
319
320
- ` :equations ` : List of equations (represented as strings).
@@ -324,10 +325,10 @@ For example, the structure of `ModelC` is:
324
325
julia> ModelC. structure
325
326
Dict{Symbol, Any} with 10 entries:
326
327
:components => Any[Union{Expr, Symbol}[:model_a , :ModelA ], Union{Expr, Symbol}[:model_array_a , :ModelA , :(1 : N)], Union{Expr, Symbol}[:model_array_b , :ModelA , :(1 : N)]]
327
- :variables => Dict {Symbol, Dict{Symbol, Any}} (:v => Dict (:default => :v_var , :type => Real), :v_array => Dict ( :type => Real, :size => ( 2 , 3 )), : v_for_defaults=> Dict (:type => Real))
328
+ :variables => Dict {Symbol, Dict{Symbol, Any}} (:v => Dict (:default => :v_var , :type => Real), :v_for_defaults => Dict (:type => Real))
328
329
:icon => URI (" https://github.com/SciML/SciMLDocs/blob/main/docs/src/assets/logo.png" )
329
- :kwargs => Dict {Symbol, Dict} (:f => Dict (:value => :sin ), :N => Dict (:value => 2 ), :v => Dict {Symbol, Any} (:value => :v_var , :type => Real ), :v_array => Dict {Symbol, Union{Nothing, UnionAll}} (:value => nothing , :type => AbstractArray{ Real} ), :v_for_defaults => Dict {Symbol, Union{Nothing, DataType}} (:value => nothing , :type => Real), :p1 => Dict (:value => nothing ))
330
- :structural_parameters => Dict {Symbol, Dict} (:f => Dict (:value => :sin ), :N => Dict (:value => 2 ))
330
+ :kwargs => Dict {Symbol, Dict} (:f => Dict (:value => :sin ), :N => Dict (:value => 2 ), :M => Dict (:value => 3 ), :v => Dict {Symbol, Any} (:value => :v_var , :type => Real), :v_for_defaults => Dict {Symbol, Union{Nothing, DataType}} (:value => nothing , :type => Real), :p1 => Dict (:value => nothing )),
331
+ :structural_parameters => Dict {Symbol, Dict} (:f => Dict (:value => :sin ), :N => Dict (:value => 2 ), :M => Dict ( :value => 3 ))
331
332
:independent_variable => t
332
333
:constants => Dict {Symbol, Dict} (:c => Dict {Symbol, Any} (:value => 1 , :type => Int64, :description => " Example constant." ))
333
334
:extend => Any[[:p2 , :p1 ], Symbol (" #mtkmodel__anonymous__ModelB" ), :ModelB ]
0 commit comments