Simplex tableau


Hi my freinds.
how to get simplex table in julia?
Thanks for your guidance



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

tableau = zeros(3,10)
for j in 0:2
    tableau[j+1,:] = getrow(j)

I hope it helps.

Also check slides 17-22 of the seminar I did on JuMP