Tier II: Case Studies - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Tier II: Case Studies

Description:

Another program, Lingo, will now be demonstrated ... Lingo has a number of other operators, but these are the mathematical operators ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 37
Provided by: DJM56
Category:
Tags: case | lingo | studies | tier

less

Transcript and Presenter's Notes

Title: Tier II: Case Studies


1
(No Transcript)
2
Tier II Case Studies
  • Section 1
  • Lingo Optimization Software

3
Optimization Software
  • Many of the optimization methods previously
    outlined can be tedious and require a lot of work
    to solve, especially as models get more complex
    and move beyond two or three variables, which
    will often be the case
  • Software can be used to solve these problems more
    efficiently

4
Optimization Software
  • Software that is available usually uses the same
    methods previously outlined, but can of course
    perform the calculations quicker, allowing the
    effect of variations in the model to be studied
    more easily

5
Optimization Software
  • Some optimization examples have already been
    shown using Excel
  • Another program, Lingo, will now be demonstrated
  • A trial version of this software can be
    downloaded at www.lindo.com/cgi/frameset.cgi?leftl
    ingo.htmllingof.html

6
Lingo
  • Lingo is a program designed specifically for
    solving optimization problems
  • It uses a syntax that is similar to what would be
    written by hand, or what would be used in Excel,
    not requiring variables to be declared
  • For example, y 3x2 is y 3x2

7
Lingo Operators
  • Many of Lingos mathematical operators are
    similar to what Excel uses
  • Addition - Multiplication
  • Subtraction - - Division /
  • For exponents Xn
  • Equals
  • Greater than or less than gt or lt
  • Note Lingo accepts lt as being lt. It does
    not support strictly less than or greater than.

8
Lingo Operators, cont
  • Absolute value of x _at_abs(x)
  • Natural log of x _at_log(x)
  • Trigonometric functions _at_sin(x), _at_cos(x),
    _at_tan(x) (x in radians)
  • Exponentials _at_exp(x)
  • To return integer portion of decimal number
    _at_floor(x)
  • _at_sign(x) returns -1 if x lt 0, or else 1

9
Lingo Operators, cont
  • Find max or min value in a set _at_smax(x1,x2,xn)
    or _at_smin(x1,x2,xn)
  • To find maximum or minimum of a function max or
    min
  • To allow negative variables _at_free(x)
  • Lingo has a number of other operators, but these
    are the mathematical operators that are most
    likely to be used

10
Using Lingo
  • Other operators, like logic operators, can be
    found in the help files complete list of
    operators
  • Now that we have the mathematical operators that
    are likely to be used, we can demonstrate how
    Lingo works with some examples
  • Lingo can be used strictly as an equation solver
    or as an optimizer

11
Lingo Screenshot
Solve to solve current problem set
If additional help is needed
12
Basic Equation Solver
This will find the intersection of the lines y
3x 4 and y 5x 1
13
Solution
Note Lingo does not distinguish between small
and capital letters
14
Equation Solver 2
15
Solution 2
Only one solution was found! There should be two
solutions to this problem. The solver
automatically stops when it finds the first
solution.
16
Solution 2
17
Non-linear Difficulties
  • Lingo is not designed to deal with non-linear
    equations
  • It cannot find multiple solutions
  • There is a problem with solving non-linear
    problems, especially if the solution is in the
    negative domain

18
Maximum and Minimum
  • The maximum and minimum functions are the most
    important functions needed for optimization
    problems
  • These functions are used as follows
  • max objective function
  • min objective function

19
Solving Optimization Problems
  • Several optimization examples that were worked
    through in previous sections will now be solved
    using Lingo
  • The first example is from the introduction section

20
Chemical Plant Example
  • Objective Maximize 1000x1 1500x2
  • Constraints
  • 4x1 2x2 lt 80
  • 2x1 5x2 lt 60
  • 4x1 4x2 lt 75
  • x1, x2 gt 0

21
Chemical Plant Example
22
Lingo Solution
23
Transportation Scheme Problem
24
Problem 2 Solution
25
Negative Values
  • Lingo cannot automatically solve for a negative
    variable value
  • If it is suspected that a solution will be
    negative, then that variable will need to be
    specifically declared as free
  • _at_free(x)
  • It is a good idea to declare all variables like
    this, unless of course a negative value is
    infeasible

26
Attempting to Obtain a Negative Solution
  • The following example will demonstrate what
    happens if a negative value is required to get an
    optimum solution
  • Lingo will automatically solve for the optimum
    solution obtained from only positive variables,
    even if this is not the true optimum

27
Attempting to Obtain a Negative Solution
28
Attempting to Obtain a Negative Solution
29
Attempting to Obtain a Negative Solution
30
Attempting to Obtain a Negative Solution
31
Greater Than or Less Than
  • Another potential problem that will be
    encountered using Lingo is that it treats lt
    the same as lt, and gt the same as gt
  • Thus, if a variable must be strictly greater than
    a value, the constraint is best treated as
    follows
  • For x gt A, where A is a solution otherwise,
    use x gt A b
  • where b is an arbitrary value, like 0.1, that
    covers a portion where the solution will not lie

32
Example of lt or gt
33
Example of lt or gt
34
Example of lt or gt
This will now force X1 and X2 to be greater than
0. We can do this because we know X1 and X2 are
also greater than 0.1.
35
Example of lt or gt
36
Conclusions
  • Lingo is effective and efficient for solving
    optimization problems if they are linear
  • It is not designed to deal with non-linear
    problems
  • It is not very good at dealing with non-linear
    problems, so these must be approached with
    caution
  • It does not handle multiple maximum or minimum
    points very well in non-linear cases
Write a Comment
User Comments (0)
About PowerShow.com