First question on Stack overflow... love this website...
I am using PuLP on Python. Based on inputting variables, an objective function, and constraints, I am trying to view the dual variables/values that are associated with the optimal solution of initial LP problem (the primal). I am having trouble searching in the documentation and I just wanted to be clear. Is there a way to do this with pulp? There is example code below showing the input of the primal.
NOTE: I edited my question from asking for the dual to asking for the dual results (based on feedback).
NOTE2: Further edited for clarification based on feedback.
import pulp
lpProb = pulp.LpProblem("example", pulp.LpMinimize)
x1 = pulp.LpVariable("x1", 0, None, pulp.LpContinuous)
x2 = pulp.LpVariable("x2", 0, None, pulp.LpContinuous)
x3 = pulp.LpVariable("x3", 0, None, pulp.LpContinuous)
lpProb += 3*x1 + 4*x2 + 2*x3
lpProb += x1 + 2*x2 + x3 >= 42
lpProb += 5*x1 + 7*x2 + 4*x3 >= 68
lpProb.solve()
print(pulp.LpStatus[lpProb.status])
for i in lpProb.variables():
print("Variable {0} = {1}".format(i.name, i.varValue))
print("Objective function z = {0}".format(pulp.value(lpProb.objective)))