false

Class Notes
(837,839)

Canada
(510,505)

University of Toronto Scarborough
(31,510)

Management (MGO)
(44)

MGOC10H3
(34)

Vinh Quan
(14)

Lecture

by
OneClass2602

Unlock Document

Management (MGO)

MGOC10H3

Vinh Quan

Fall

Description

MGTC74 Analysis for Decision Making
Lecture 03
Chapter 2 – Solving LP Models with LINDO Solver Suite
• Can use LINGO - www.lindo.com, can download student/demo version of software.
• Can also solve Linear Programs with Excel – see textbook Appendix 2.3.
Some LINGO syntax
• There is an “=” after the MAX or MIN in objective. Min = 6*V11+ 2*V12;
• LINGO statements end with semicolon
• Start program with “MODEL:” end of program with “END”
• Arithmetic Operators: Power “^”, Multiply “*”, Division “/”, Addition “+”, Subtraction “-“.
Order of operations applies
• Limit of 32 characters in variable name, must begin with A-Z.
• To enter ≤ type “<=”, to enter ≥ type “>=”.
• Comments may be placed anywhere, comments are denoted by “!” and end with “;”
• Only constant values, not variables, are permitted on the right hand side of a constraint
equation. Conversely, only variables and their coefficients are permitted on the left-hand side
of constraints.
• @FREE(x1) - allows variable x1 to be unrestricted in sign.
@BIN(x1) – specifies that x1 is 0 or 1 (binary)
@GIN(x1) - specifies that x1 is integer
Example - Giapetto’s Woodcarving
LP model LINGO code
x1= # soldiers produced each week
x = # trains produced each week
2 MODEL:
Max z = 3x 1 2x 2 ! MGTC74 LINGO example;
ST 2x +11 x ≤2100 [OBJ] MAX = 3*X1 + 2*X2;
1x1+ 1x 2 80 [FINISH] 2*X1 + X2 <= 100;
x1≤ 40 [CARPENTRY] X1 + X2 <= 80;
x1≥ 0 and x2≥ 0 [DEMAND] X1 <= 40;
END
What is the optimal number of soldiers and trains to produce? Profits?
LINGO Output:
Global optimal solution found.
Objective value: 180.0000
Total solver iterations: 2
Variable Value Reduced Cost
X1 20.00000 0.000000
X2 60.00000 0.000000
Row Slack or Surplus Dual Price
OBJ 180.0000 1.000000
FINISH 0.000000 1.000000
CARPENTRY 0.000000 1.000000
DEMAND 20.00000 0.000000
1 # of soldiers produced = X1 = 20, # of trains produced = X2 = 60, Profits=objective value =$180
Chapter 3 - SensitivityAnalysis using LINGO
Example – 2 product 3 machine problem
A company produces two products using three machines. The profits from each product, the time each
product takes to produce and the amount of time available for each machine is given in the table below.
The objective is to max revenue.
Machine Product 1 Product 2 Hours Available
1 1 0 4
2 0 2 12
3 3 2 18
Revenue $3 $5
LP model LINGO code
Let Xi = # of product i to produce MODEL:
Max Z = 3X 1 5X 2 [OBJ] MAX = 3*X1 + 5*X2;
ST X ≤ 1 [MACH1] X1 <= 4;
2X 2 12 [MACH2] 2*X2 <= 12;
3X 1 2X ≤218 [MACH3] 3*X1 + 2*X2 <= 18;
END
X 1 X2≥ 0
LINGO output
Global optimal solution found at step:2
Objective value: 36.00000
Variable Value Reduced Cost
X1 2.000000 0.0000000
X2 6.000000 0.0000000
Row Slack or Surplus Dual Price
OBJ 36.00000 1.000000
MACH1 2.000000 0.0000000
MACH2 0.0000000 1.500000
MACH3 0.0000000 1.000000
(a) What is the optimal solution (revenue? number of product 1 and 2 made?)
What does the slack or surplus mean?
• For machine 1, slack or surplus = 2 means there are 2 unused hours
• For machine

More
Less
Related notes for MGOC10H3

Join OneClass

Access over 10 million pages of study

documents for 1.3 million courses.

Sign up

Join to view

Continue

Continue
OR

By registering, I agree to the
Terms
and
Privacy Policies

Already have an account?
Log in

Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.