getModelInstance only dumps the evaluated bindings for structural parameters #10188
Labels
COMP/GUI/InstBased Interface
Issues with new instantiation-based OMEdit feature
Milestone
Description
getModelInstance
does not have access to the original bindings of structural parameters, only the evaluated ones.Steps to Reproduce
Call
getModelInstance
on a model such as this:The binding for
controlModel
will only be1
instead of the original binding.Expected Behavior
The binding for
controlModel
should be the whole original if-expression, so that e.g. OMEdit can reevaluate it when the user changes the value ofcontroller
.Additional Context
We currently overwrite the original binding expression when we evaluate a binding, and we also keep track of whether a binding is unevaluated, being evaluated, or is evaluated. This could potentially be changed to instead store the evaluated expression as an optional value in the binding.
The text was updated successfully, but these errors were encountered: