If we use evaluate in a reformulation, then we are locking in the currently-fix!ed value to the expression tree, and later updates to it (or free!s won't be respected. This is the https://github.com/jump-dev/Convex.jl/issues/585 issue.
If we use evaluate during conic_form!, that's fine since that gets called every solve. (Though it will have to be figured out if we do #383).
One way we can fix this is by adding a DotMultiply atom so we can do the reformulation at conic_form! time instead of expression-building time, and therefore get the latest value. We could add a QuadForm atom also, to support fix!'d variables rather than erroring.
I couldn't find any other usages left. It would be nice to figure out a way to add to our atom tests that evaluate wasn't called, but I don't know a reasonable way to do that. (What I can think of is splitting recursive evaluate from non-recursive, then adding a global or ScopedValue based check to the non-recursive one to error depending on the context, but that isn't very nice).
evaluate
in a reformulation, then we are locking in the currently-fix!
ed value to the expression tree, and later updates to it (orfree!
s won't be respected. This is the https://github.com/jump-dev/Convex.jl/issues/585 issue.evaluate
duringconic_form!
, that's fine since that gets called every solve. (Though it will have to be figured out if we do #383).One way we can fix this is by adding a
DotMultiply
atom so we can do the reformulation atconic_form!
time instead of expression-building time, and therefore get the latest value. We could add aQuadForm
atom also, to supportfix!
'd variables rather than erroring.I couldn't find any other usages left. It would be nice to figure out a way to add to our atom tests that
evaluate
wasn't called, but I don't know a reasonable way to do that. (What I can think of is splitting recursiveevaluate
from non-recursive, then adding a global or ScopedValue based check to the non-recursive one to error depending on the context, but that isn't very nice).