Sie sind auf Seite 1von 23

Examples of Various

Formulations of Optimization
Problems
Example 1 (bad formulation)
A chemical factory produces a chemical
from two materials, x and y. x can be
purchased for $5 per ton and y can be
purchased for $1 per ton. The
manufacturer wants to determine the
amount of each raw material required to
reduce the cost per ton of product to a
minimum. Formulate the problem as an
optimization problem…
Solution (?): Linear problem
Minimize f(x,y) 5 x  y
subject to x  0, y  0
Solution (?)
Minimize f(x,y) 5 x  y
subject to x  0, y  0
 x  0, y  0
Example 2
Given the perimeter of a rectangle must be
at most 16cm, construct the rectangle with
maximum area. Formulate this as an
optimization problem.
Solution: Nonlinear problem

Maximize f(x,y)  xy
Subject to
2 x  2 y  16
x  0, y  0
Example 3
Suppose we want to maximize the area of
an object, but we have a choice between a
square and a circle, where the length of
the square is equal to the radius of the
circle, and the radius can be at most 4 cm.
Formulate this as an optimization problem.

Object 1
Object 2
Solution: Mixed integer nonlinear problem
Let A1 , A2 correspond to the area of the square
and circle. Let x be the length of the radius. Let y1 , y2
be a binary va riable, that is y1  1 if the object chosen
is a square or 0 otherwise. ..
Minimize f(A, x,y)   A1  A2
Subject to
A1  x 2 , A2  x 2
0 x4
Ai  1000 yi (1000 was chosen to be arbitraril y large)
y1  y2  1
Parameter Identification
Identify the damping, c, and the spring
constant, k, of a linear spring by
minimizing the difference of a numerical
prediction and measured data. Assume
that the spring-mass system is set into
motion by an initial displacement from
equilibrium and measurements of
displacement are taken at equally spaced
time increments.
Parameter Identification continued
The motion of an unforced harmonic oscillator
satisfies the initial value problem,

u  cu  ku  0, u (0)  u0 , u(0)  0 on [0, T].


c
Let x    be out vector of unknown paramters.
k 

Formulate this as an optimization problem


Nonlinear Least Squares Problem
Let u j denote our observatio n points at times t j ,
for j  1:M .
Let u(t j :x) denote our numerical prediction at time t j
c
for a given x   .
k 
1 M
Minimize f(x) |u(t j :x)  u j|2

2 j 1
Example: ‘Black-Box’ Formulation
Suppose there is a contaminated region of
groundwater (a plume) that we wish to
keep from moving. We can do this by
installing wells in the region and changing
the direction of groundwater flow. We
would like to do this as cheaply as
possible…
Hydraulic Capture Models
Goal: To alter the direction of groundwater
flow to control plume migration

Possible Decision Variables:


u  (n, Qi , ( xi , yi )), i  1 : n  N

• Number of wells
• Well rates
• Well locations
Governing Equations
h
Flow Equation : S    ( BK h)  qh
t

K
Darcy' s Law : v   h

C
Transport R    ( D(v)  C )  v  C  qC
t

vi v j
where Dij   t v  ij  (  l   t )
v
Objective Function:
Cost to install and operate wells
n ne
J (u )   c d   c1 Q ( z gs  h min ) b 2 
0 i
b0
i
m b1

i 1 i 1
   
installation cost

 ne n 
 
tf
0  i1
 c 2 Qi ( hi  z gs ) 
i  n 1
e
c3Qi



d t
  
operational cost

Evaluation of J(u) requires hi  flow simulation


Implementation: Simulators
 MODFLOW for flow equation
• USGS code
• Cell centered finite differences
• FORTRAN 77, serial

 MT3DMS for transport equation


• EPA code
• Links to flow data from MODFLOW
• Cell centered finite differences
• FORTRAN 90, serial
Constraints

Well capacity  0.0064  Qi  0.0064 m  s


3

Net pumping rate


n

Q
i 1
i  s
 0.0032 m
3

Don' t flood/dry out land h min  hi  h max (m)

Don' t install a useless well :


Qi  106  Remove well from design
Capture constraint to keep the
plume from spreading
“We leave it to the modeler to choose the
physical and mathematical representation of
the constraint.”

7 + 6 =?
A closer look at FBHC
h h  d
1
k k
2

We can consider head differences in adjacent


h h  d
1
k k
2

nodes (aligned in the x,y,or z direction) as


constraints on the approximate velocity since
Dacry’s Law is v   K h

For example: A finite difference head gradient in the
X direction is h( x  x )  h( x )
x
A closer look at FBHC

h h  d
1
k k
2
d?
k?
Locations?
FBHC
Advantages:
• Easy to implement
• Constraint requires flow info only
Disadvantages
• Not constraining the concentration
• d? k? locations?
Alternate FBHC approach
• Is there another way we can use only flow
information to capture the plume?
• A method for choosing d,k,locations?
• Directional derivatives?
• Fix well locations easier?
Optimization min J (u )
uD

Implementation Issues
• Evaluation of J(u) requires a simulation
• Parallelism is preferred
• Gradient information is unavailable
• Removing a well means J(u) discontinuous

 Sampling methods look appealing:


Optimization is governed by function values

Das könnte Ihnen auch gefallen