As part of my IE535 Linear Programming class at Purdue University, I addressed the challenge of optimizing land allocation for a forestry company managing four sites. The company cultivated four tree species—pines, spruces, walnuts, and hardwoods—each with varying yield rates and revenue contributions. The goal was to determine the optimal allocation of land across these sites to maximize annual revenue while meeting minimum yield requirements for each species and staying within site-specific area constraints.
Fig 1: Constraints for the Problem Statement
I started by defining decision variables to represent the land allocation for each tree species at each site. The objective function was formulated to maximize total revenue, computed as the sum of allocated areas multiplied by their respective revenue coefficients. The model also had to satisfy key constraints, including:
Land availability constraints, ensuring that the allocated area at each site did not exceed its total available land.
Minimum yield constraints, ensuring that the total expected yield for each species met the given thresholds.
Non-negativity constraints, enforcing that allocated areas could not be negative.
The Problem defined as a LP is:
Xij: i=The index of the site
j=The type of tree
Maximize
16X11+12X12+20X13+18X14+14X21+13X22+24X23+20X24+17X31+10X32+28X33+20X34+ 12X41+11X42+18X43+17X44
Subject To:
1X11+1X12+1X13+1X14 ≤ 1500
1X21+1X22+1X23+1X24 ≤ 1700
1X31+1X32+1X33+1X34 ≤ 900
1X41+1X42+1X43+1X44 ≤ 600
17X11+15X21+13X31+10X41 ≥22.5
14X12+16X22+12X32+11X42 ≥ 9
10X13+12X23+14X33+8X43 ≥ 4.8
9X14+11X24+8X34+6X44 ≥ 3.5
Xij ≥ 0
I programmed the linear programming problem using the Simplex Method in MATLAB to solve an optimization problem with multiple constraints and objectives. The code was structured into four main parts:
Main Code:
The main code served as the controller, initiating the process by calling functions for Phase 1, Phase 2, and Bland’s Anti-Cycling Rule. It set up the problem, including the objective function, constraints, and starting solution, before moving through Phase 1 and Phase 2 to find the optimal solution.
Phase 1 Function:
Phase 1 ensured the problem had a feasible solution by introducing artificial variables and checking for feasibility. It removed redundant constraints and evaluated termination conditions to either find a feasible solution or stop if no solution existed, before proceeding to Phase 2.
Phase 2 Function:
Once feasibility was confirmed, Phase 2 started optimizing the objective function by pivoting through solutions. It checked for optimality and continued pivoting until the best possible solution was found, improving the objective value at each iteration.
Bland’s Anti-Cycling Rule:
To avoid cycling, which could cause infinite loops in the Simplex Method, Bland’s Rule was implemented. It ensured that in case of ties in pivoting, the smallest-indexed variable was chosen, guaranteeing that the algorithm progressed toward the optimal solution.
By coding this process in MATLAB, I leveraged its built-in functionality and efficient handling of matrices to effectively solve the linear programming problem while avoiding cycling and ensuring the optimal outcome.
Once I implemented the Simplex Method in MATLAB, I ran the program with the given data and successfully obtained the output. The solution provided the optimal allocation of areas for each tree species across the four sites, while satisfying all the constraints and maximizing the expected annual revenue. The optimal value calculated was 106,789, which represents the maximum expected annual revenue the forestry company can achieve. To ensure the accuracy of my results, I verified the output by comparing it with the results from a commercial solver, linprog. This verification process confirmed that the solution was correct, as both the MATLAB implementation and the commercial solver provided the same optimal solution, validating the correctness and effectiveness of my model. The results show how the company can allocate resources efficiently for maximum profitability while meeting all area and yield requirements for the tree species.