# Accessing Lagrange Multipliers in CPLEX

I want to get the lagrange multipliers for a solution from cplex. I am using it via Python.

The problem is continuous with a linear objective function and elements of solution vector $$x$$ are constrained to be in the interval $$[0,1]$$. Here are the main cplex calls.

my_prob = cplex.Cplex()
my_prob.objective.set_sense(my_prob.objective.sense.minimize)
lb=my_lb,
ub=my_ub,
names=my_colNames)

senses=my_sense,
rhs=my_rhs)

my_prob.solve()
x = my_prob.solution.get_values()


$$x$$ contains the solution. I want to know what function returns the Lagrange multipliers of the solution. I now think the answer is

l = my_prob.solution.get_dual_values()


Can someone please confirm.

• Is your problem an LP? (You specified that the objective was linear but left the constraints unspecified.) If so, by "lagrange multipliers" do you mean the solution to the dual LP? – prubin May 1 at 21:11