Deterministic Optimization and Design - Non-Linear Programming | ECI 153, Study notes of Civil Engineering

Material Type: Notes; Class: Deterministic Opt & Desg; Subject: Engineering Civil & Environ; University: University of California - Davis; Term: Winter 2002;

Typology: Study notes

Pre 2010

Uploaded on 07/30/2009

koofers-user-zvh
koofers-user-zvh 🇺🇸

10 documents

1 / 20

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Deterministic Optimization and Design Jay R. Lund
UC Davis Winter 2002
71
Non-Linear Programming
General Approach: Finding and comparing peaks and valleys in the objective function within a feasible
region defined by the constraint set.
Example Applications
Profit maximization with price elasticity
Transportation problems with volume discounts on shipping costs
Portfolio selection with risky investments (also a multi-objective programming problem)
Farm management considering agricultural production functions
Hydropower scheduling
Truss design
Abbreviated Outline of Methods
Unconstrained Nonlinear Optimization
Analytical methods
Calculus
Searching without derivatives
Fibonacci search method
Grid search method
Genetic algorithms
Searching with first derivatives
One-dimensional (line) search procedure
Gradient search (steepest descent) method (one of many “hill-climbing” methods)
Quasi-Newton methods
Conjugate gradient method
Searching with second derivatives
Newton’s method
Trust region methods
Constrained Nonlinear Optimization (Nominally, these are globally optimal for min. of convex functions
over convex feasible regions.)
Analytical methods
Lagrange multiplier method
Exterior penalty function methods
Interior (barrier) function methods
Gradient projection methods
Generalized reduced gradient methods
Successive linear programming methods
Successive quadratic programming methods
Genetic algorithms (constraints represented in “fitness” function)
Algorithms for Special Cases of NLP (Nominally, these are globally optimal.)
Separable programming (linear/mixed integer approximation)
Quadratic programming (for min. convex functions)
Dynamic programming
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Deterministic Optimization and Design - Non-Linear Programming | ECI 153 and more Study notes Civil Engineering in PDF only on Docsity!

UC Davis Winter 2002

Non-Linear Programming

General Approach : Finding and comparing peaks and valleys in the objective function within a feasible region defined by the constraint set.

Example Applications

  • Profit maximization with price elasticity
  • Transportation problems with volume discounts on shipping costs
  • Portfolio selection with risky investments (also a multi-objective programming problem)
  • Farm management considering agricultural production functions
  • Hydropower scheduling
  • Truss design

Abbreviated Outline of Methods

Unconstrained Nonlinear Optimization

  • Analytical methods Calculus
  • Searching without derivatives Fibonacci search method Grid search method

Genetic algorithms

  • Searching with first derivatives One-dimensional (line) search procedure Gradient search (steepest descent) method (one of many “hill-climbing” methods) Quasi-Newton methods Conjugate gradient method
  • Searching with second derivatives Newton’s method Trust region methods

Constrained Nonlinear Optimization (Nominally, these are globally optimal for min. of convex functions over convex feasible regions.)

  • Analytical methods Lagrange multiplier method
  • Exterior penalty function methods
  • Interior (barrier) function methods
  • Gradient projection methods
  • Generalized reduced gradient methods
  • Successive linear programming methods
  • Successive quadratic programming methods
  • Genetic algorithms (constraints represented in “fitness” function)

Algorithms for Special Cases of NLP (Nominally, these are globally optimal.)

  • Separable programming (linear/mixed integer approximation)
  • Quadratic programming (for min. convex functions)
  • Dynamic programming

UC Davis Winter 2002

Non-Linear Search Procedures

Like the simplex method for linear programming, search procedures for nonlinear programming problems find a sequence of trial solutions that lead to an optimal solution. In each iteration, you begin with the current trial solution and proceed systematically to a new improved trial solution. Typically, you stop when either one of the following conditions are met:

(1) Your trial solutions have converged to a given value (i.e., successive solutions show little or no improvement). (2) Your solution satisfies certain optimality criteria , such as the Karush-Kuhn-Tucker conditions.

Fibonacci Search : An efficient method of finding the minimum of a single-variable function f(x) which strictly increases on either side of an optimum value (i.e., is unimodal ), considering a number of discrete values of the decision variable. In a sequence of n Fibonacci numbers, Fn, the next number in the sequence is the sum of the previous two numbers, e.g., 1, 1, 2, 3, 5, 8, 13, 21, 34.... Where there are (Fn -

  1. ordered discrete values of the decision variable X with values xi , the Fibonacci search can find the

minimum of the unimodal function f (X) in (n-1) iterations.

For a minimization search over the interval a 1 to b (^) 1: Initialization : Select a final solution tolerance, t > 0. Set index i = 1 L 1 = a 1 + (Fn-2/Fn)(b 1 – a (^) 1) and U 1 = a 1 + (Fn-1/Fn)(b 1 – a (^) 1)

Step 1: If f ( Li ) < f ( Ui ), then:

The optimal value is below Ui. Set a (^) i+1 = a (^) i and b (^) i+1 = Ui and Set Li+1 = a (^) i+1 + (Fn-i-2/Fn-i)(b (^) i+1 – a (^) i+1) and Ui+1 = Li Step 2: If f ( Li ) >= f ( Ui ), then:

The optimal value is above L i. Set a (^) i+1 = Li and b (^) i+1 = bi and Set Li+1 = Ui and Ui+1 = a (^) i+1 + (Fn-i-1/Fn-i)(bi+1 – a (^) i+1) Step 3: Set i = i + Step 4: If i < n-1, go to Step 1 Step 5: If f(Li) > f(Ui), then: Final solution lies above Li, so final solution interval is [L (^) i, b (^) i]. ELSE, Final solution lies below Li, so final solution interval is [a (^) i, Ui].

This method is often used in determining the step size (or number of steps, given a specified step size) in the gradient search method, described below. Wagner (1975, p. 455) has a nice example. Bazaraa, et al (1993) have excellent write-ups on this and related search methods.

Grid Search Method : A grid search evaluates points evenly spaced over a suitable grid in the decision space. While this method is easy to program, it is too time-consuming for problems with more than a few decision variables. However, it can find an approximate solution or a good starting point for a more intensive search algorithms.

UC Davis Winter 2002

and then substituting these expressions into f ( x ).

  1. Use the one-dimensional line search procedure (or calculus or Fibonacci search) to find t

= t* that minimizes f ( x ' + t ∇ f ( x '))over t > 0.

3. Reset x ' = x '+ t *∇ f ( x ')and go to the stopping rule.

Stopping rule: Evaluate ∇ f ( x '). Check if

x j

f

for all j = 1,…., n.

If so, stop with the current x’ as the approximate optimal solution. Otherwise, perform another

iteration.

u

u

o

X 1

X

X

X

2

o

u o is to contour line of f(X ) .o

X

As do most of the search methods discussed here, the gradient search only finds a local optimum.

It also can have very slow convergence, especially for banana-shaped functions. Why?

X 1

X 2

UC Davis Winter 2002

Newton's Method : An iterative search method that uses both first and second derivatives. Like many other search methods, the direction of the iteration is found using the first derivative (slope). The method then cleverly uses the second derivative at a point to predict how far to step to where the first derivative equals zero.

Derivation of Method:

Begin your search at a point X^0 , with f ( X^0 ) = value of the objective function.

The Taylor series of f ( X ) at X^0 is:

f ( X0^ + ∆ X ) = f ( X0 ) +

dX

df ( X^0 )

2

dX

d f X

Let X^1 = X^0 + ∆^ X^ be your next estimate of the optimal solution X*.

Since

dX

df

= 0 at any max or min, express

dX

df

as a Taylor series, set = 0. The first-order Taylor series

of

dX

df

= 0 at X^1 is:

dX

df ( X^1 )

dX

df ( X^0 )

2

2 0

dX

d f X

∆ X.

Manipulating, this becomes: ∆ X =

2

2 0

0

dX

d f X

dX

df X

, or

X1^ = X0^ + ∆ X = X0^ −

2

2 0

0

dX

d f X

dX

df X

Repeat the use of this equation until ≤ ε

x j

f

for all j = 1,…, n. Graphically,

What if there is more than one local optimum or more than one decision variable? The selection of the initial/starting solution is important.

f(X)

X

df/d

X0 X

UC Davis Winter 2002

Sequential Linear Programming: An efficient technique for solving convex programming problems with nearly linear objective and constraint functions. As the name suggests, each of the approximating problems will be an LP problem that can be solved relatively efficiently. Also, successive problems will differ only by one constraint, so the dual simplex method can be used to solve the sequence of problems very efficiently.

General procedure:

  1. Start with an initial trial solution, x i ( i = 0).
  2. Use a first-order Taylor series approximation to linearize the objective and constraint functions about the point x i : f ( x )≈ f ( x i )+∇ f ( x i ) T ( xx i )

g ( x )≈ g ( x i )+∇ g ( x i ) T ( xx i )

  1. Formulate the approximating linear programming problem as

Minimize f ( x (^) i )+ ∇ f ( x i ) T ( xx i ) Subject to

( )+ ∇ ( ) ( − i ) ≤ 0 T

g j x i gj x i x x for j = 1,…, m.

  1. Solve the approximating LP to find a new trial solution x i +1.
  2. Evaluate the original constraints at x i +1; that is, find

g j ( x i + 1 ), j = 1,…, m.

Example Sequential LP problem: Max 3X 1 + 5X 2 + 10 cos(X 3 ) S.T. X 1 + X 2 + X 3 ≤ 20 -) Search over X 3 (enumeration, Fibonacci, Newton, or Gradient Search) -) LP for each value of X 3 tried.

UC Davis Winter 2002

Quasi-Global Optimum Search Methods

Relies on finding and comparing several local optima by starting local searches in different areas of the feasible region.

Once a local optimum has been found, how can a new starting point be found that makes finding a different local optimum most likely?

Approaches:

  1. Eye-ball it, manually choosing starting points from different parts of the feasible region.
  2. Randomly select new starting points.
  3. Select a new starting point which maximizes the distance from all previously-examined points.

Step 1:Start a local optimum search starting from X^

0,

and ending with X

F 1 ,1 ; X

F 1 ,1 = X

Remember the best solution found X

and its objective function value f*. Step 2: If k previous local searches have been undertaken over n decision variables; solve:

Max Z = (^) ∑ j=

k ∑ i=

n ∑ l=

Fj |X (^) i - X (^) il,k|

S.T. g X b

Step 3: Use the solution to this linear program as a new starting point for a local search. Step 4: Go to step 2.

The above linear program finds a point a maximum distance from all points previously examined. If Z*^ ≤ ε, STOP; Enough area has been searched. -) Computationally intensive -) Often only local optima are found. -) Harder to program; fewer nice solution packages.

Example:

Modeling to Generate Alternatives using HSJ.

Brill, E.D., S.Y. Chang, and L.D. Hopkins (1982), “Modeling to generate alternatives: The HSJ approach,” Management Science , Vol. 28, No. 3, pp. 221-225.

UC Davis Winter 2002

So this method will not guarantee the optimal solution.

  1. Dynamic Programming Note that the routing decision is divided into 4 stages. At each stage only one next-step of several possible steps can be chosen.

For Stage 4: The last decision: Make a table:

n = 4 S f

4

* (S)= Cij X

4

8 3 10 9 4 10

X 4 *^ is the decision variable of which location to go to next.

X 4

is always 10, the end.

S is the state in which the stage 4 decision is made (the entering state or condition). Go from 8 or 9.

f 4 *^ (S) is the cost of going from the present possible state to the final state.

So far this isn't very interesting.

Let's now work backwards, to the next-to-last stage, stage 3. f 3 (S 3 ,X 3 )=c 3 (X 3 )+f 4 *(X 3 )

n = 3 S X^3 : 8 9 f

3

* (S) X

3

5 4 8 4 8 6 9 7 7 9 7 6 7 6 8

-) Going from 5 to 10, it is best to pass through 8. -) Going from 6 to 10, it is best to pass through 9. -) Going from 7 to 10, it is best to pass through 8. f (^) i() = recursive objective function, “cost-to-go” function, or accumulated objective function. It has two parts, 1) the direct costs of the decision in the current stage and state and 2) the best implied cost for all the later states, f* (^) i+1(S (^) i+1).

Backwards again to Stage 2. f 2 (S 2 ,X 2 )=c 2 (X 2 )+f 3 *(S 3 =X 2 )

n = 2 S X 2 : 5 6 7 f

2

* (S) X

2

2 11 11 12 11 5 or 6 3 7 9 10 7 5 4 8 8 11 8 5 or 6 Same interpretation. Give examples.

Finally, back again to Stage 1.

f 1 (S 1 ,X 1 )=c 1 (X 1 )+f 2 *(S 2 =X 1 )

n = 1 S X 1 : 2 3 4 f

1

* (S) X

1

1 13 11 11 11 3 or 4

The best decision in Stage 1 is to go either to loc. 3 or 4. This is the overall optimum.

UC Davis Winter 2002

Looking at Stage 2 results, note that if coming from loc. 3, going to loc. 5 is preferred and if coming from loc. 4 go either to loc. 5 or 6.

Then for Stages 3 and 4:

There are 3 equally-optimal paths:

1,4,5,8,10, and 1,4,6,9,10. All have total costs of $11.

Why did this work? Elimination of inferior subsets of decisions. Go through stages to show why.

UC Davis Winter 2002

For solution by DP:

Stages: Let each country be a stage. The decision in Stage 3 will be how many teams go to Country 3?

States: The incoming state of each will be the number of teams remaining to be allocated.

Decision: How many teams should go to the country in a given stage if only 5 teams are remaining to be allocated?

Objective function: Max z = (^) ∑

i=

Pi (X (^) i )

Accumulated objective function:

f (^) n(S,Xn) = Pn (Xn) + f* (^) n+1(S - Xn)

the "recursive relationship"

Go over

Again, we'll solve it backwards, starting with Stage/County 3.

Stage 3 n = 3 S f* (^) n (S) X* (^2) 0 0 0 1 50 1 2 70 2 3 80 3 4 100 4 5 130 5

Essentially, allocate all that remains at the last Stage to Country 3.

Stage 2 n = 2 f 2 (S,X 2 ) = P 2 (X 2 ) + f* 3 (S – X 2 )

S / X (^) 2: 0 1 2 3 4 5 f* 2 (S) X* (^2) 0 0 -- -- -- -- -- 0 0 1 50 20 -- -- -- -- 50 0 2 70 70 45 -- -- -- 70 0 or 1 3 80 90 95 75 -- -- 95 2 4 100 100 115 125 110 -- 125 3 5 130 120 125 145 160 150 160 4

f 3 (4,2) = P 2 (2) + f 3 *(4-2=2) = 45 + = 115

UC Davis Winter 2002

Stage 1: At Stage 1, no allocations have been made, so S = 5. n = 1 f 1 (S,X 1 ) = P 1 (X 1 ) + f* 2 (S – X 1 )

S: X 1 : 0 1 2 3 4 5 f* 1 (S) X* (^1) 5 160 170 165 160 155 120 170 1 ↓ =P1(1) + f* 2 (5-1=4) =45+ = 170 The Solution The maximum number of additional person-years is 170,000. Trace the optimal decisions forward through the stages:

Stage i (^) X (^) i^ S (^) S - X (^) i 1 1 5 4 = 5 - 1 (^2 3 4) 1 = 4 - 3 (^3 1 1) 0 = 1 - 1

Compare Calculations Needed for Enumeration Vs. DP

Typical comparison is by number of cost calculations needed to solve the problem.

For DP: No. of Cost Calculations =

∑ Stage n = 1

nmax (number of states in stage n)*(number of decisions examined)

if S (^) max and d (^) max are same for all stages (^) :

No. of cost cal. = nmax • S max • d max

For enumeration:

No. of cost cals. =

∏ d^ n,max n = 1

n (^) max

If d (^) max is same for all stages:

No. cost cal. = dmax n^ max

For WHC problem: For DP: No. cost calc. = 6(1) + (6) (6) + 1(6) = 48 (including infeasible sol'ns)

= 6 + 21 + 6 = 33 (excluding infeasible sol'ns)

By Enumeration: No. of cost calc. - 6 • 6 • 6 = 6 3 = 216 (including infeasible sol'ns)

DP requires 22% the calculation effort for this problem.

UC Davis Winter 2002

More DP Applications

Reservoir Releases Over Time from a Single Reservoir

given

I

S (^) Q

t

t t

S t+ 1 =^ S (^) t -^ Q (^) t + It mass balance

The DP: Stages: time-periods, t

States: Volume of water in reservoir at time t, S (^) t

Decisions: How much water to release at time t, Q (^) t Objective function: Max economic benefits = ( ) 1

t n t t t t

b S Q

=

Cumulative objective function: Backward moving:

f (^) t (St , Qt )= b(S (^) t , Qt ) + f *t+1 (St+1 =St - Qt + It )

Start with t = t (^) n and move stages backwards to t = 1.

If Qt > St + It , then b(S (^) t , Qt ) = - ∞; infeasible.

Stage t (^) n

n = t (^) n f (^) t (Stn , Qtn )= b(S (^) tn , Qtn )

State Stn Qtn : 0 - - - - - - - - - - - - - - - - - - - - Qmax f (Stn ) Qtn 0 | - - - - - - - - - - - - - - - - - - | Reservoir Capacity = Sp

Must discretize both -) Release values (m values) -) Storage values (p values)

Stage t

n = t f (^) t (St , Qt )= b(S (^) t , Qt ) + f *t+1 (St+1 =St - Qt + It )

State St Qt : 0 - - - - - - - - - - - - - - - - - - - - Qmax f (St ) Qt 0 | - - - - - - - - - - - - - - - - - - | Reservoir Capacity = Sp

UC Davis Winter 2002

Stage t = 1

n = 1 f 1 (S 1 , Qt )= b(S 1 , Qt ) + f * 2 (S 2 =S 1 - Q 1 + I 1 )

S 1 Q 1 : 0 - - - - - - - - - - - - - - - - - - - - - - - Qmax f (S 1 ) Q 1 S 1 = initial - - - - - - - - - - - - - - - - - - - - - - storage value

There is only one reservoir state in the present, S 1.

What would a forwards formulation be? f (^) t (St , Qt )= b(S (^) t , Qt ) + f *t-1 (St-1 =St + Qt - It ), where S (^) t is the storage/state leaving stage t.

Computational effort to solve this reservoir problem: Let t (^) n = number of stages m = number of decision alternatives per stage p = number of discretizations of the state variable Number of cost calculations by DP approx. t (^) n pm

Number of cost calculations by enumeration: approx. mtn

Let's compare the computational effort for tn = 7 days, and p = m.

Discretizations of m and p Calculations By DP Calculations by enumeration 10 7. 10 .10=700 10,000, (^100) 70,000=7.^104 10 1,000 (^) 7,000,000=7.^10 6 10

It's possible to solve a much larger reservoir problem by DP than would otherwise be possible.

UC Davis Winter 2002

To set-up for each stage:

Stage t f (^) t (S1t , S2t , Q1t , Q2t ) States Q 1 : 0 1 - - - - - - -

S 1 S 2 Q 2 : 0 1 2 3 - - - m 0 1 2 3 - - - m - - - - - - - ft (S1t S2t ) Q (^) 1t Q* (^) 2t

0 0 1 2 | | | p

1 2 | | | p 2 3 | | | | p

Computational Effort:

No. of cost calculations by DP = t (^) n • p 1 • p 2 • m 1 • m 2

For 2 reservoirs over 7 days, let p 1 = p 2 = m 1 = m 2

Discretizations of m Calculations By DP Calculations by enumeration 10 70,000 1014 (^100) 700,000,000 = 710^8 10 1,000 (^) 710 12 1042

Calculations by enumeration = m2•

General Comments: -) Multiple State Variables -) Multiple Decision Variables -) "Curse of Dimensionality"

UC Davis Winter 2002

The Final Days

-) Multi-Objective Optimization

-) Viewing operations research in terms of Alternative Generation & Comparison

  • to suggest solutions
  • to get people talking
  • need to test and refine decisions suggested by optimization methods

-) Review again the steps of O.R. application.

-) Uses of operations research in practice

Pre-Opt. & Post-Opt.

Go back and put methods in context of Operations Research method. Pre-Opt.: (use notes from early in class)

  1. Formulating the Problem as an O-R-problem -) What is the problem? -) Objective function definition(s) -) Decision variables -) Constraints -) Simplifications identified

  2. Solve Mathematical Problem

  3. Interpret Results (perhaps modify, re-solve, and re-interpret)

Overview/Review of Solution Methods (Make a huge table)

  1. Formulation limitations
  2. Computational limitations
  3. Advantages
  4. Disadvantages
  5. How does this method work? for: Trial & Error Enumeration Calculus Lagrange Multipliers LP Integer-LP Non-Linear Programming DP GA

Discussion: why select one method over another.