Professional Documents
Culture Documents
01 Formulation Handout (Simple)
01 Formulation Handout (Simple)
4G03
1 / 31
4G03
2 / 31
The conclusions are drawn from the model (mathematical program), not from the problem! An inadequate model typically leads to false conclusions The model must be computationally tractable: its analysis must be practical!
The validity of a model is the degree to which inferences drawn from the model hold for the real system The tractability of a model is the degree to which this model admits convenient analysis How much analysis is practical
Assessment
Analysis
Tradeo:
Decision makers almost always confront a tradeo between validity of optimization models and their tractability to analysis
Very accurate over wide range of conditions Longer computations More complex Less accurate over narrow range of conditions Shorter computations Less complex
3
Decisions Inference Solutions
Dofasco:
We nd it useful to formulate the optimization problem even if we cannot solve it...
4G03
3 / 31
4G03
4 / 31
Decision Variables, x
1
At the formulation stage, decision variables can be grouped into two categories:
Independent variables, whose values can be changed independently to modify the behavior of the system Dependent variables, whose behavior is determined by the values selected for the independent variables
max f (x)
x
At the solution stage, independent and dependent variables need not be distinguished: the solution method just sees an optimization problem involving many variables
A variable is discrete if it is limited to a xed or countable set of values (e.g., all-or-nothing, either-or decisions) A variable is continuous if it can take on any value in a specied interval
Problems with both discrete and continuous variables are called mixed-integer programs
Heuristics:
When there is an option, modeling with continuous variables is preferred to discrete variables (for tractability reasons) Example: Variable magnitudes are likely to be large enough that fractions have no practical importance
Beno t Chachuat (McMaster University) Formulating an Optimization Problem 4G03 7 / 31 Beno t Chachuat (McMaster University) Formulating an Optimization Problem 4G03 8 / 31
Exercise: Decide whether a discrete or a continuous variable would be best employed to model each of the following quantities:
1 2 3 4 5
the optimal temperature of a chemical process the warehouse slot assigned a particular product whether a capital project is selected for investment ball bearings in a plant that manufactures 10,000+/day the number of aircraft produced on a defense contract
Indexes (or subscripts) permit representing collections of similar quantities with a single symbol, e.g. {xi : i = 1, . . . , 100} represents 100 similar values with the same x name, distinguishing them with the index i
The rst step in formulating a large optimization model is to choose appropriate indexes for the dierent dimensions of the problem; multiple indexes are extremely common!
Formulating an Optimization Problem 4G03 10 / 31
4G03
9 / 31
Variable bounds specify the domain of denition for decision variables: the set of values for which the variables have meaning
1
Setting the min and max values equal sets the variable to a constant value: xmin,i = xmax,i = xi , for some i {1, . . . , n} The most common variable bound constraint is non-negativity, e.g. xi 0, i = 1, . . . , n
Choose appropriate decision variables for a model of this problem (use indexing). What is the total number of decision variables for this model?
Formulating an Optimization Problem 4G03 11 / 31 Beno t Chachuat (McMaster University) Formulating an Optimization Problem 4G03 12 / 31
Inequality Constraints:
g(x) 0 Exercise: Propose bounds for variables in the process
1
These are one-way limits on the system and are essential for optimization Inequality constraints of the form 0 and 0 are equivalent. Do you see why? There can be many of these inequalities, so that g(x) is a vector (indexing is used for constraints too!) We must be careful to prevent dening a problem incorrectly with no feasible region or an unbounded solution
Formulating an Optimization Problem 4G03 14 / 31
4G03
13 / 31
These describe interactions between the variables in the model Equality constraints are written with a zero right-hand side by convention There can be many of these inequalities, so that h(x) is a vector (indexing is used for equality constraints too!) There cannot be more (independent) equality constraints than decision variables in the model! Do you see why?
4G03
16 / 31
Objective functions in optimization models tell us how to rate decisions accumulation of q = rate of q in rate of q out + generate rate of q
1
We need a quantitative measure; a qualitative measure such as good or bad is not adequate! A scalar objective function is preferred for solving, even though multiple objectives are typical in real life! There is no fundamentale or practical dierence between max and min problems: max f (x) min f (x)
x x
Q = hAT E rA = k0 exp( RT ) equilibrium relations, e.g. VLE decisions by the engineer, e.g. FA 2FB = 0 behavior enforced by controllers, e.g. temperature set-point Ts = 231 K
Beno t Chachuat (McMaster University) Formulating an Optimization Problem 4G03 17 / 31
4G03
18 / 31
Express the answer as a summation of indexed variables Express the answer as a product of vectors
Formulating an Optimization Problem
Graphing Constraints
1
Very simple graphic solution have enough power to deal with tiny models, such as 2- or 3-variable models The rst issue in graphic solution is the feasible set:
Saudi Arabia
30%
gasoline 40%
The feasible set S (or feasible region) of an optimization model is the collection of choices for decision variables satisfying all model constraints: S = {x : g(x) 0, h(x) = 0, xmin x xmax }
REFINERY
40%
jet fuel
The set of all points satisfying an equality constraint plots as a line or a curve (in 2-d) The set of all points satisfying an inequality constraint plots as a boundary line or curve, where the constraint holds with equality, along with all points on whichever side of the boundary satisfy the constraint as an inequality
Beno t Chachuat (McMaster University) Formulating an Optimization Problem 4G03 22 / 31
Venezuela
20% 30%
4G03
21 / 31
To nd out the best feasible point, the objective function must be introduced into a plot Objective functions are normally plotted in the same coordinate system as the feasible set by introducing contours:
3 2 1
2
2
The contour Cz of an objective function (in the decision variable space) is the line or curve passing through points having equal objective values z : Cz = {x : f (x) = z }
1
1
4G03
23 / 31
4G03
24 / 31
Optimization Outcomes
Optimum
An optimal solution x is a feasible choice for decision variables with objective function value at least equal to that of any other solution satisfying all constraints. For a minimization problem: f (x ) f (x),
2 1
1
x1 ,x2
s.t. x1 + x2 2 x1 , x2 0
s.t. x1 + x2 2 x1 , x2 0
x S
2 1
0.5 2 4.5 8
3 4
0 1.5 3 4.5 6
Optimal solutions show graphically as points lying on the best objective function contour that intersects the feasible region The optimal value f in an optimization model is the objective function value of any optimal solutions: f = f (x ) An optimization model can have only one optimal value An optimization model may have:
Exercise: Plot the objective function contours in the two-crude case study.
Beno t Chachuat (McMaster University) Formulating an Optimization Problem 4G03 25 / 31
a unique optimal solution several alternative optimal solutions no optimal solutions (unbounded or infeasible models)
Formulating an Optimization Problem 4G03 26 / 31
x1 ,x2
s.t. x1 + x2 2 x1 , x2 0
s.t. x1 + x2 2 x1 , x2 0
s.t. x1 + x2 2 x1 , x2 0
s.t. x1 + x2 2 x1 , x2 0
2 1
2
1
2 1
0.5 2 4.5 8
0 1.5 3 4.5 6
T , cA , cB , cC
This is an isothermal CFSTR with the series reaction: ABC The goal is to maximize CB in the euent at steady state
T , cA , cB , cC
This is an isothermal CFSTR with the series reaction: ABC The goal is to maximize CC in the euent at steady state
in , F Tc c
out Tc
in , F Tc c
out Tc
4G03
29 / 31
4G03
30 / 31
in F , T in , cA
AB
AC
The goal is to maximize CB in the euent at steady state Only the ow rate of feed F can be adjusted
in , F Tc c out Tc
4G03
31 / 31