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
I tried adding these two lines of code which I found in another example, but this also did not help:
import MathOptInterface
const MOI = MathOptInterface
Apart from that I'm also struggling to understand the meaning of the syntax in the code used to set the sensitivities:
# set sentivitity
MOI.set(
model,
DiffOpt.ForwardConstraintFunction(),
cons[1],
0.0 * index(x[1]) - 1.0, # to indicate the direction vector to get directional derivatives
)
hi, thanks for reaching out, this is because of a breaking change which happened in recent PRs #210#214#216
To have it working, you need to add the master branch of DiffOpt instead of the stable version, we will release a new version soon
Hello,
sorry, this is probably a pretty basic question, I'm very new to Julia.
I'm trying to run the tutorial-files but I always get an error when trying to set the sensitivities. For example in line 140 of matrix-inversion-manual.jl (https://github.com/jump-dev/DiffOpt.jl/blob/master/docs/src/examples/matrix-inversion-manual.jl).
The full error message is:
_UndefVarError: ForwardConstraintFunction not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:35
[2] top-level scope
@ In[1]:140
[3] eval
@ ./boot.jl:373 [inlined]
[4] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1196_
I tried adding these two lines of code which I found in another example, but this also did not help:
Apart from that I'm also struggling to understand the meaning of the syntax in the code used to set the sensitivities:
and in the code used to query the derivatives:
Is there some documentation on these functions somewhere?
Thanks a lot for your help!
The text was updated successfully, but these errors were encountered: