Flashcards
Answer
Computational Tools
Computational tools are used when an LP has too many variables or constraints to solve comfortably by hand.
For this course, the important tools are Excel Solver and MATLAB linprog. The mathematical model is still the main work: the solver only computes from the model you give it.
Map of the Section
- Excel Solver: spreadsheet-based LP solving.
- MATLAB linprog: vector/matrix-based LP solving.
- Solver Inputs: objective vector, constraint matrices, bounds, and variable types.
- Checking Solver Output: feasibility, objective value, active constraints, and interpretation.
When to Use a Solver
Use a solver when:
- there are more than two decision variables
- graphical solution is impossible or too slow
- the problem has many constraints
- the exercise explicitly asks for Excel Solver or MATLAB
linprog - you need numerical confirmation of a hand solution
The solver does not replace formulation. If the variables, objective, or constraints are wrong, the computed answer is also wrong.
General Solver Workflow
- Define the decision variables.
- Write the objective function.
- Write every constraint.
- Convert the model into the solver’s input format.
- Run the solver.
- Check feasibility and objective value.
- Interpret the solution in the original problem language.
LP Data Needed by Solvers
Most LP solvers need the following information:
\[\min c^Tx\]subject to:
\[A_{ineq}x\le b_{ineq}\] \[A_{eq}x=b_{eq}\] \[lb\le x\le ub.\]For a maximization problem, convert it to minimization by multiplying the objective by $-1$.
Common Mistakes
The most common solver mistakes are:
- putting coefficients in the wrong column
- forgetting nonnegativity bounds
- using $\le$ instead of $\ge$
- forgetting to convert maximization to minimization for
linprog - reading the minimized negative value as the original maximum
- trusting the answer without checking constraints
Checklist
Before using a solver, verify:
- each variable has a clear meaning
- each row of the constraint matrix corresponds to one real constraint
- units are consistent
- all lower and upper bounds are included
- objective direction is correct
- the result is interpreted in the original units
See Also
Exam checkpoint
For solver questions, the solver result is not enough. Also report the LP model, variable meanings, objective value, active constraints, and whether the result matches algebraic expectations.