TA: Feng Xie, xief@mcmaster.ca
, ITB 116
The solver can be found in the Analysis toolbar of the Data tab. It is not activated by default. To activate it, click the Microsoft Office Button, then Excel Options, followed by Add-Ins. In the Manage list, choose Excel Add-ins, click Go, check the Solver Add-in box, and then click OK.
Find here the detailed steps of using the solver and the spreadsheet file for the example problem.
The LP solver offered by Matlab is called linprog. Note that linprog always minimizes a function.
To use Matlab on server moore.mcmaster.ca, log in using ssh with your MAC ID, then type matlab (or matlab -nodisplay if you have no local X Window client). Issue the following commands to solve the example problem:
AMPL student version can be downloaded from www.ampl.com.
The model and data files for the example problem are tut1.mod, tut1.dat. Issue the following commands in AMPL to solve the problem:
More examples:
A callable library allow users to call the solver as a subroutine from some other program. Here is a rather rudimentary implementation of the Simplex method: simplex.cc. It can only handle the standard form. To solve the example problem, input:
2 5
3 4 4 1 0
2 3 2 0 1
80 50
300 500 400 0 0
Algebraic view | Geometrical view |
---|---|
variables | dimensions |
inequality constraint | halfspace |
objective function | objective vector |
slack variable | "distance" from hyperplane |
feasible solution | point in feasible region |
basic feasible solution | vertex of feasible region |
initial basic feasible solution | starting vertex of "hopping" |
optimal basic feasible solution | furthest vertex in the direction of objective vector |
one iteration of Simplex method | one "hopping" from current vertex to a neighboring vertex by following an edge |
candidate entering variables | edges from the current vertex that follow the direction of the objective vector |
pivot rule | dictates which edge to take for the next "hopping" |
leaving variable | dictates how far a "hopping" can be (where the next vertex is) |
Updated on Mar. 29, 2010.