You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the missing variables are namespaced with the name of the system \
587
+
`$(err.sysname)` passed to `mtkcompile`. This may be indicative of a namespacing \
588
+
issue. `mtkcompile` requires that the $(err.variant) provided are not namespaced \
589
+
with the name of the root system. This issue can occur when using `getproperty` \
590
+
to access the variables passed as $(err.variant). For example:
591
+
592
+
```julia
593
+
@named sys = MyModel()
594
+
inputs = [sys.input_var]
595
+
mtkcompile(sys; inputs)
596
+
```
597
+
598
+
Here, `mtkcompile` expects the input to be named `input_var`, but since `sys`
599
+
performs namespacing, it will be named `sys$(NAMESPACE_SEPARATOR)input_var`. To \
600
+
fix this issue, namespacing can be temporarily disabled:
601
+
602
+
```julia
603
+
@named sys = MyModel()
604
+
sys = toggle_namespacing(sys, false)
605
+
inputs = [sys.input_var]
606
+
sys = toggle_namespacing(sys, true)
607
+
mtkcompile(sys; inputs)
608
+
```
609
+
""")
610
+
end
611
+
end
612
+
568
613
"""
569
614
Modify the variable metadata of system variables to indicate which ones are inputs, outputs, and disturbances. Needed for `inputs`, `outputs`, `disturbances`, `unbound_inputs`, `unbound_outputs` to return the proper subsets.
0 commit comments