Yes, you’re right Abel. @nlaws if you want to know the mapping between VariableRefs and indices in a MathOptNLPModel you just need that :
vr = all_variables(model)
indices = [vr[i].index.value for i=1:length(vr)]
Yes, you’re right Abel. @nlaws if you want to know the mapping between VariableRefs and indices in a MathOptNLPModel you just need that :
vr = all_variables(model)
indices = [vr[i].index.value for i=1:length(vr)]