We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b7bd13 commit a02fb6eCopy full SHA for a02fb6e
src/systems/optimization/constraints_system.jl
@@ -226,12 +226,15 @@ function generate_canonical_form_lhss(sys)
226
lhss = subs_constants([Symbolics.canonical_form(eq).lhs for eq in constraints(sys)])
227
end
228
229
-function get_cmap(sys::ConstraintsSystem)
+function get_cmap(sys::ConstraintsSystem, exprs = nothing)
230
#Inject substitutions for constants => values
231
cs = collect_constants([get_constraints(sys); get_observed(sys)]) #ctrls? what else?
232
if !empty_substitutions(sys)
233
cs = [cs; collect_constants(get_substitutions(sys).subs)]
234
235
+ if exprs !== nothing
236
+ cs = [cs; collect_contants(exprs)]
237
+ end
238
# Swap constants for their values
239
cmap = map(x -> x ~ getdefault(x), cs)
240
return cmap, cs
0 commit comments