@@ -1148,47 +1148,6 @@ function reactionsystem_uptodate_check()
1148
1148
end
1149
1149
end
1150
1150
1151
- # used in the `__unpacksys` function.
1152
- function __unpacksys (rn)
1153
- ex = :(begin end )
1154
- for key in keys (get_var_to_name (rn))
1155
- var = MT. getproperty (rn, key, namespace = false )
1156
- push! (ex. args, :($ key = $ var))
1157
- end
1158
- ex
1159
- end
1160
-
1161
- """
1162
- @unpacksys sys::ModelingToolkit.AbstractSystem
1163
-
1164
- Loads all species, variables, parameters, and observables defined in `sys` as
1165
- variables within the calling module.
1166
-
1167
- For example,
1168
- ```julia
1169
- sir = @reaction_network SIR begin
1170
- β, S + I --> 2I
1171
- ν, I --> R
1172
- end
1173
- @unpacksys sir
1174
- ```
1175
- will load the symbolic variables, `S`, `I`, `R`, `ν` and `β`.
1176
-
1177
- Notes:
1178
- - Can not be used to load species, variables, or parameters of subsystems or
1179
- constraints. Either call `@unpacksys` on those systems directly, or
1180
- [`flatten`](@ref) to collate them into one system before calling.
1181
- - Note that this places symbolic variables within the calling module's scope, so
1182
- calling from a function defined in a script or the REPL will still result in
1183
- the symbolic variables being defined in the `Main` module.
1184
- """
1185
- macro unpacksys (rn)
1186
- quote
1187
- ex = Catalyst. __unpacksys ($ (esc (rn)))
1188
- Base. eval ($ (__module__), ex)
1189
- end
1190
- end
1191
-
1192
1151
"""
1193
1152
setdefaults!(rn, newdefs)
1194
1153
0 commit comments