JuMP/CPLEX: retrieve value of array-variables in callback

I found a solution:

y_val = callback_value.(Ref(cb_data), model[:y])
z_val = callback_value.(Ref(cb_data), model[:z])

does the job (although I do not understand why the Ref(.) is needed).

1 Like