Hi my freinds.
how to get simplex table in julia?
Thanks for your guidance
Hello
If you are using CPLEX or Gurobi you can use functions from their C APIs. Here is an example of what I did for a model with 3 rows and 10 columns. Remeber to solve the LP relaxation before requesting the row.
function getrow(j, m)
ci = m.internalModel.inner
row = zeros(10)
ccall((:CPXbinvarow,CPLEX.libcplex),Cint,(Ptr{Void},Ptr{Void},Cint,Ptr{Cdouble}),ci.env.ptr, ci.lp, j,row)
return row
end
tableau = zeros(3,10)
for j in 0:2
tableau[j+1,:] = getrow(j)
end
I hope it helps.
Also check slides 17-22 of the seminar I did on JuMP
http://egon.cheme.cmu.edu/ewo/docs/EWO_Seminar_03_10_2017.pdf
regards!
1 Like