We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 966a8ab commit b60bc6eCopy full SHA for b60bc6e
linear_programming/dual_simplex.py
@@ -5,9 +5,9 @@
5
prob = LpProblem("Dual_Simplex_Example", LpMaximize)
6
7
# Create decision variables for the dual problem
8
-y1 = LpVariable('y1', lowBound=0) # y1 >= 0
9
-y2 = LpVariable('y2', lowBound=0) # y2 >= 0
10
-y3 = LpVariable('y3', lowBound=0) # y3 >= 0
+y1 = LpVariable("y1", lowBound=0) # y1 >= 0
+y2 = LpVariable("y2", lowBound=0) # y2 >= 0
+y3 = LpVariable("y3", lowBound=0) # y3 >= 0
11
12
# Objective function (minimization in dual corresponds to maximization here)
13
prob += 4 * y1 + 2 * y2 + 3 * y3, "Objective"
@@ -29,4 +29,3 @@
29
30
# Print the objective value (minimized value)
31
print(f"Optimal objective value: {value(prob.objective)}")
32
-
0 commit comments