I'm trying to reconstruct the final simplex tableau using CPLEX for the following problem
\ENCODING=ISO-8859-1\Problem name: Maximizeobj: 4 x1 - x2Subject Toc1: x2 + x3 = 3c2: 2 x1 - 2 x2 <= 3c3: - 7 x1 + 2 x2 >= -14EndUsing the function
print(problem.solution.advanced.binvarow()[0] + problem.solution.advanced.binvrow())[0], I get the following output
[1.0, 0.0, 0.2857, 0.2857, 0.0, -0.1428]Thus, the coefficients of the first equation can be read from the elements of this array. For example,
1.0 x1 + 0.0 x2 + 0.2857 x3 + 0.2857 x4 + 1.0 x5 + 1.428 x6 = 2.8571However, the order in which these equations appear have interchanged. This corresponds to the third constraint in the original model specification, but is the first row in the function outputs.
I want to know if the original constraint correspond to this equation can be mapped easily, i.e., is there a way to know that this equation is associated with constraint
c3?
I can find the basic columns and find its inverse without using the above in-built CPLEX function, but I wanted to avoid calculating the inverse, especially for larger problems.
#DecisionOptimization