Call back with matrix

I think you should use vcat() for that. For instance, something like

vars = vcat( [model[:u][i,j] for i in 1:gmax for j in 1:hmax]  )
vals = vcat( u_vals[i,j] for i in 1:gmax for j in 1:hmax]  )
status = MOI.submit( model, MOI.HeuristicSolution(cb_data), vars, vals )
println("$status")

but I am not sure. Probably also reshaping helps (see here ). Regarding the objective function value: I always computed it manually with the current variable values.

1 Like