solving linear programand knapsack problem in matlab
TRANSCRIPT
SOLVING LINEAR PROGRAM AND KNAPSACK PROBLEM IN MATLAB
1. Revised Simplex Method: RSM, BigM
2. MATLAB LP Solver: linprog
3. Unbounded Knapsack Problem: uknap
Use a function in MATLAB
• [output1, output2, …] = function(input1, input2, …)
• Example 1:
• Example 2:
Big-M method: BigM.m
• Standard form: Big-M:
• Usage:
• No initial BFS is needed.
• An appropriate M is needed.
MATLAB built-in solver: linprog.m
• Problem:
• Usage:
• Algorithms: large-scale, active-set, simplex
• Output: optimal solution/value, terminating reason, dual variables…
Unbounded Knapsack problem
• Auxiliary problem in column generation method for cutting-stock problem.
• General form:
• A branch-and-bound algorithm:
• MATLAB implementation: uknap
• Usage: