AL17, AL18 - Solving linear programs with software
Specify an LP or ILP for a solver, read its decision values and objective in context, and distinguish an optimal result from a feasible candidate or a failed model. Software provides computing power; the formulation determines what its answer means.
Supplying the correct mathematical model
A solver reports a minimum of worker-minutes for two tasks, yet the workers can finish them in minutes. Can both statements be correct?
Yes: total worker-time and elapsed completion time are different objectives. First check what the model asked the computer to optimise.
You already know
An LP needs defined numerical decisions, an objective and constraints. Ordinary simplex solves a continuous problem; whole-count decisions need an integer requirement. Graphs and hand calculations help check a small instance before scaling up.
A spreadsheet solver typically needs decision cells, an objective cell with a maximise/minimise setting, resource or balance constraints, and variable domains. Other optimisation software needs the same mathematical information in another format. Some routines accept only standard-form LPs; others also accept non-standard or integer formulations.
Worked example 1: a continuous solver model
Question. Specify a solver model for maximising , subject to , , . The quantities are divisible.
Plan. Identify the decision entries, calculated expressions, optimisation direction and continuous domains.
| Solver component | Required content |
|---|---|
| Decision entries | Numerical values of |
| Objective expression | , maximise |
| First calculated resource | |
| Second calculated resource | |
| Domains | Non-negative continuous |
An optimal output is:
| Variable | Value |
|---|---|
| Objective |
Why this step? The solver's variable cells must be the actual decisions; calculated resource totals are constraints, not extra independent choices.
Answer. The settings in the first table define the continuous model. Its exact optimal solution is , .
Check. Both resources are fully used. The displayed decimals are rounded versions of the exact values, so tiny rounding discrepancies are expected.
Change only the decision domains.
Worked example 2: an integer requirement
Question. The same objective and resource limits now concern complete items. Specify the required solver change and interpret this optimal output.
| Variable | Value |
|---|---|
| Objective |
Plan. Retain the expressions and bounds, but require both decision variables to be integers.
Why this step? Formatting a spreadsheet cell to show no decimal places does not impose an integer constraint on the mathematical solution.
Answer. Add the integer domains to the solver. The output recommends first items and second items, with objective .
Check. The slacks are and ; both are non-negative.
For practical data, keep the constraint coefficient table, bounds and units explicit. A correct solver answer to the wrong table remains the wrong answer to the practical question.
Watch out
Wrong: round a continuous report and call it an integer optimisation. Right: solve with the required integer or binary domains included.
Read a new domain choice before accepting a report.
Interpreting allocation output and units
A solver's output often lists values for many arc or allocation variables. Return to their definitions before adding anything.
Here means worker performs task , not that the task takes one minute. Each worker may do at most one task, and both tasks are required.
| Worker | Task , minutes | Task , minutes |
|---|---|---|
Worked example 3: selected pairings and total time
Question. Interpret this optimal allocation output and calculate its total worker-time.
| Variable | Value |
|---|---|
Plan. Translate the binary selections, then multiply each selected variable by its task time.
Why this step? The objective sums worker-times. Independent simultaneous tasks finish when the slower selected task finishes, not when their durations have been added.
Answer. does task , does task , and is unused. Total worker-time is minutes; with simultaneous starts and no further restrictions, elapsed time is minutes.
Check. Each task appears once, each selected worker has one task, and all other selection variables are zero.
Change only worker availability.
Worked example 4: interpreting a changed optimum
Question. Worker is unavailable. An optimal solver output has , with every other variable zero. Interpret the result and calculate the relevant times.
Plan. Decode the new selection and use the unchanged cost table.
Why this step? A higher total workload need not mean a longer elapsed completion time; the chosen objective and the parallel schedule measure different quantities.
Answer. performs task , performs task . Total worker-time is minutes and possible elapsed time remains minutes.
Check. No variable belonging to unavailable is selected, and both task equalities still hold.
For flow output, add flows across the source boundary or sink boundary, rather than summing every arc value. Internal flow would otherwise be counted several times. For path output, read selected arcs in connectivity order rather than treating the variable listing as a route order.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account