Pulp, Python Programming, Linear Programming, Application, Snippet.
10a + 15b <= 300 b <= 10 a>=0, b>=0 What is the optimal solution? from pulp import * prob=LpProblem('apol_q1', LpMaximize) a=LpVariable("a", 0) b=LpVariable("b", 0) prob += 120*a + 97*b prob += 10*a + 15*b <= 300 prob += b <= 10 prob += a>=0 prob += b>=0 prob.solve() for v in prob.variables():