This macro finds the optimal solution of a linear program, using the Revised Form of the Simplex. Linear programming (LP) deals with an objective function with only linear terms, and assumes only linear constraints exist.
Usually, if the number of constraints is much smaller than the number of decision variables, the original form of the Simplex is inefficient.
The objective function can either be to maximize or minimize a mathematical function, such as representing a profit or cost. The optimization is usually constrained, meaning the optimal solution must be found within certain bounds usually defined by the amount of available resources or budget for a project.
Be sure that Minitab knows where to find your downloaded macro. Choose Macro location browse to the location where you save macro files.. Under
If you use an older web browser, when you click the Download button, the file may open in Quicktime, which shares the .mac file extension with Minitab macros. To save the macro, right-click the Download button and choose Save target as.
The example that follows is taken from Hillier and Lieberman and represents the manufacturing of two products (x1, x2) for the Wyndor Glass Co. The three constraints represent the ability of each one of their three plants to use resources for the production of Product 1 (x1) and Product 2 (x2).
MAXIMIZE Profit = 3x1 + 5x2 (Objective function)
x1 ≥ 0, x2 ≥ 0 (Non-negativity constraints)
The coefficients, equality signs, and results should be entered in a Minitab worksheet as follows:
Suppose your data are organized as above. To run the macro, chooseand type:
%SIMPLEX C1-C2 C4 C5; INEQ C3.
Click Submit Commands.
Usually, n + 2 columns are specified to formulate the problem. The final argument entered in the main command corresponds to the column containing the coefficients of the objective function. The penultimate argument requires a column specifying the right hand side of all inequalities in the problem (with the exception of non-negativity, since this is assumed by default). The first n columns specify the coefficients (a11, a12,...,a1n) for all linear constraints of type a11*x1 + a12*x2 + ... + a1n*xn.
Finally, if all inequalities are of a "<=" type, then you don't have to do anything; otherwise specify the symbols for all constraints in one column. You may enter any of the following symbols: >=, >, ≥, ≤, <=, <, =.
For more technical details about the algorithm see:
Bazaraa, M.S., Jarvis, J.J. and Sherali, H.D. "Linear Programming and Network Flows", Fourth edition. John Wiley & Sons, New Jersey, 2010.