Unrestricted Variables in LP
Variables
x1 loaves of bread baked
x2 oz. our bought or sold (positive if bought, negative if sold)
Objective:
max 30x1 4x2
Constraints:
5 packages of yeast
x1 5
need enough our to bake x1 loaves
5x1 30 + x2
Nonnegativity: x1
Denition of a Linear Program
Denition: A function f (x1, x2, . . . , xn) of x1, x2, . . . , xn is a linear function if
and only if for some set of constants c1, c2, . . . , cn,
f ( x 1 , x2 , . . . , x n ) = c 1 x 1 + c 2 x 2 + + c n x n .
Examples:
x1
LINGO 8.0 TUTORIAL
Created by:
Kris Thornburg
Anne Hummel
Table of Contents
Introduction to LINGO 8.0.2
Creating a LINGO Model3
Solving a LINGO Model.4
Using Sets in LINGO.6
The LINGO Data Section8
Variable Types in LINGO.10
Navigating the LINGO Interface
A Degenerate LP
Denition: An LP is degenerate if in a basic feasible solution, one of the
basic variables takes on a zero value. Degeneracy is a problem in practice,
because it makes the simplex algorithm slower.
Original LP
maximize
subject to
x1 + x2 +
Solution to BreadCo
Variables
x1 loaves of French Bread baked
x2 loaves of Sourdough Bread baked
x3 packets of yeast bought
x4 oz. of our bought
Objective:
max 36x1 + 30x2 3x3 4x4
Constraints:
yeast used yeast on hand
x1 + x2 x3 + 5
ower used ower on hand
Solution to Sunco
What are the descisions :
Solution to Sunco
What are the descisions :
The amount of crude i in gas j : xij .
How much to advertise gas j : aj .
Solution to Sunco
What are the descisions :
The amount of crude i in gas j : xij .
How mu
Finding feasible solutions to a LP
In all the examples we have seen until now, there was an easy initial
basic feasible solution: put the slack variables on the left hand side. However, this is not always the case, especially for minimization problems, or