1 / 34

UNIT 2: FORMULATING THE OPTIMIZATION PROBLEM

UNIT 2: FORMULATING THE OPTIMIZATION PROBLEM. Variables The objective function Equality constraints Inequality constraints Degrees of freedom Formulating the problem. FORMULATING THE OPTIMIZATION PROBLEM. This is the general formulation that we will be using throughout the course.

Download Presentation

UNIT 2: FORMULATING THE OPTIMIZATION PROBLEM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UNIT 2:FORMULATING THE OPTIMIZATION PROBLEM • Variables • The objective function • Equality constraints • Inequality constraints • Degrees of freedom • Formulating the problem

  2. FORMULATING THE OPTIMIZATION PROBLEM This is the general formulation that we will be using throughout the course Objective function Equality constraints Inequality constraints Variable Bounds

  3. VARIABLES Variables can be grouped into two categories “decision” or “optimization” variables dependent variables These arethe variables in the system that are changed independently to modify the behavior of the system. whose behavior is determined by the values selected for the independent variables. Although they can be grouped this way to help understanding, the solution method need not distinguish them. We need to solve a set of equations involving many variables. DESIGN: reactor volume, number of trays, heat exch. area, … OPERATIONS: temperature, flow, pressure, valve opening, … MANAGEMENT: feed type, purchase price, sales price, .. FORMULATING THE OPTIMIZATION PROBLEM

  4. VARIABLES • Some comments on variables • Many variables are continuous, but some are discrete or integer. • Exercise: Should we model the following as continuous or discrete? • - Ball bearings in a plant that manufactures 10,000/day • - Crew on an airplane • - Automobiles in the Missassauga Ford plant • Exercise: Give some additional examples of each. FORMULATING THE OPTIMIZATION PROBLEM

  5. VARIABLES • Some comments on variables • Typically, we do not define the “decision” and “dependent” variables. • Since we solve a set of simultaneous equations, all variables are evaluated together. • Exercise: Identify variables in each category. FORMULATING THE OPTIMIZATION PROBLEM

  6. VARIABLES Some comments on variables We should always place bounds on variables. Exercise: Why place bounds? Exercise: Propose bounds for variables in the process. FORMULATING THE OPTIMIZATION PROBLEM

  7. OBJECTIVE FUNCTION How should I formulate these? This is the goal or objective, e.g., - maximize profit (minimize cost) - minimize energy use - minimize polluting effluents - minimize mass to construct a vessel We will formulate most problems with a scalarobjective function This should represent the full effect of x on the objective. For example, $/kg is not a good objective unless kg is fixed. When needed, include time-value of money. Also, we need a quantitative measure, not “good” or “bad”. The symbol “x” represents the variables. It is a vector. FORMULATING THE OPTIMIZATION PROBLEM

  8. OBJECTIVE FUNCTION • Some comments on the objective function • A scalar is preferred for solving. However, multiple objectives are typical in real life. • Note that Max (f) is the same as Min (-f) • - Therefore, no fundamental or practical difference between max and min problems. The same algorithm and software can solve both. • Sometimes we use a simple, physical variable, such as yield of a key product. This assumes that max (profit) is the same as Max(yield), which might not always be true. FORMULATING THE OPTIMIZATION PROBLEM

  9. OBJECTIVE FUNCTION • Some comments on the objective function (continued) • We have difficulty when the models are inaccurate, for example, the tradeoff between current reactor operation and long-term catalyst activity. • Modelling the market response to improved product quality, etc is difficult. • We want a “smooth” objective function. • The objective function can be a function of indexed variables • Exercise: Write the expression for an objective function that depends on all variables x(i) and the cost associated with each variable is c(i). • - Express the answer as a summation of indexed variables • - Express the answer as a product of vectors FORMULATING THE OPTIMIZATION PROBLEM

  10. EQUALITY CONSTRAINTS This means “subject to”. The expressions below limit (or constrain) the allowable values of the variables x. They define the feasible region For example? These are equality constraints, e.g., - material, energy, force, current, … - equilibrium - decisions by the engineer ( F1 - .5 F2 = 0 ) - behavior enforced by controls TC set point = 231 BALANCES By convention, we will write the equations with a zero rhs (right hand side). There can be many of these equations, so that h(x) is a vector. FORMULATING THE OPTIMIZATION PROBLEM

  11. EQUALITY CONSTRAINTS • What decision? • What variable? • Location 1. Define Goals 2. Prepare information 3. Formulate the model 4. Determine the solution 5. Analyze Results 6. Validate the model • Sketch process • Collect data • State assumptions • Define system Component Material Energy Typically, the solution and optimization are achieved simultaneously. FORMULATING THE OPTIMIZATION PROBLEM

  12. EQUALITY CONSTRAINTS • Some comments on equality constraints • The key balances must be strictly observed. If we do not ensure that they are “closed”, the optimizer will find a way to create mass and energy! • The constraints can also have indices. For example, the index could be a location (tray). These are equivalent statements FORMULATING THE OPTIMIZATION PROBLEM

  13. EQUALITY CONSTRAINTS • Some comments on equality constraints • Balances can be on a wide range of entities, e.g. • - material • - time • - boxes in a warehouse • - people working in sections of a plant • The models can change. For example, a heat exchanger could have either one or two phases, with the number of phases depending on the optimization decisions. • This makes a solution very difficult! Exercise: F(m,n) is the total mass flow rate leaving unit m and going to unit n. Formulate the constraints for material balance for every unit. FORMULATING THE OPTIMIZATION PROBLEM

  14. INEQUALITY CONSTRAINTS These are “one-way” limits to the system, e.g., - maximum investment available - maximum flow rate due to pump limit - minimum liquid flow rate on tray # 24 - minimum steam generation in a boiler for stable flame - maximum pressure of a closed vessel for example? We must be careful to prevent defining a problem incorrectly with no feasible region. By multiplying by (-1), we can change the inequality to g(x)<=0 So, these two forms are equivalent. FORMULATING THE OPTIMIZATION PROBLEM

  15. DEGREES OF FREEDOM (DOF) Can we determine the DOF for an optimization problem using the relationship below? DOF = (# variables) - (# equations) # variables = # equations = For optimization, what value(s) do we expect for the DOF? The answer explains why optimization is so widely applied! FORMULATING THE OPTIMIZATION PROBLEM

  16. DEGREES OF FREEDOM (DOF) Often, we will think of the problem as having #Opt Var = # var - #equality constr. We can plot this if only two dimensions. What about points inside? Which is the best? feasible region Opt Var2 Opt Var1 FORMULATING THE OPTIMIZATION PROBLEM

  17. Opt Var2 Opt Var1 Opt Var1 DEGREES OF FREEDOM (DOF) We can plot values of the objective function as contours. Exercise: Where is the optimum for the two cases shown below? Opt Var2 Case A Case B FORMULATING THE OPTIMIZATION PROBLEM

  18. Solvent T A Reactant Coolant DEGREES OF FREEDOM (DOF) This is a typical feasible region for a CSTR with reaction A  B with reactant and coolant adjusted. Explain the shape of the feasible region. From Marlin, Process Control, McGraw-Hill, New York, 1995 FORMULATING THE OPTIMIZATION PROBLEM

  19. Solvent T A Reactant Coolant DEGREES OF FREEDOM (DOF) The feasible region depends on the degrees of freedom, i.e., the number of variables that are adjusted independently. We revisit the CSTR, but only the coolant flow can be adjusted. What is different? From Marlin, Process Control, McGraw-Hill, New York, 1995 FORMULATING THE OPTIMIZATION PROBLEM

  20. FORMULATING THE OPTIMIZATION PROBLEM How do we select the appropriate “system” for a specific problem? FORMULATING THE OPTIMIZATION PROBLEM

  21. FORMULATING THE OPTIMIZATION PROBLEM • How do we define a scalar that represents performance, including • Economics • Safety • Product quality • Product rates (contracts!) • Flexibility • …... FORMULATING THE OPTIMIZATION PROBLEM

  22. FORMULATING THE OPTIMIZATION PROBLEM • How accurately must we model the physical process? • Macroscopic • 1,2 3, spatial dimensions • Steady-state or dynamic • Physical properties • Rate models (U(f), k0e-E/RT, .. FORMULATING THE OPTIMIZATION PROBLEM

  23. FORMULATING THE OPTIMIZATION PROBLEM • What limits the possible solutions to the problem? • Safety • Product quality • Equipment damage (long term) • Equipment operation • Legal/ethical considerations FORMULATING THE OPTIMIZATION PROBLEM

  24. FORMULATING THE OPTIMIZATION PROBLEM Factoid: Many process simulations and optimizations have a large number of variables and constraints. Why? • Entire model is repeated for many locations, e.g., trays in a tower. • Model repeated for many components in a stream. • Model repeated for many times in a dynamic system FORMULATING THE OPTIMIZATION PROBLEM

  25. FORMULATING THE OPTIMIZATION PROBLEM We use the term “tractable” to describe whether we can 1.Solve the mathematical optimization problem 2.Achieve desired accuracy in the “Real World” - This prevents us from using a useless, simple model 3.Calculate the solution in an acceptable time. The allowable time depends on the problem. FORMULATING THE OPTIMIZATION PROBLEM

  26. FORMULATING THE OPTIMIZATION PROBLEM The engineer must select the appropriate balance for each problem. The problem must be tractable. Intractable problems have to be reformulated. Less accurate over a narrow range of conditions Shorter computing Less complex Very accurate over wide range of conditions Longer computing More complex FORMULATING THE OPTIMIZATION PROBLEM

  27. FORMULATING THE OPTIMIZATION PROBLEM Uncertainty: We must recognize uncertainty in our methods and estimate bounds of the effects of out solutions. • “The truth” • Measurement error • Disturbances • Not known with certainty • Structure of equations • Parameter values Solver method and software Decisions to be made model Solution Does the formulation and solution method support the solution? FORMULATING THE OPTIMIZATION PROBLEM

  28. Optimization Formulation: Workshop #1 We want to schedule the production in two plants, A and B, each of which can manufacture two products: 1 and 2. How should the scheduling take place to maximize profits while meeting the market requirements based on the following data: How many days per year should each plant operate processing each kind of material? FORMULATING THE OPTIMIZATION PROBLEM

  29. Optimization Formulation: Workshop #2 Material reconciliation Suppose the flow rates entering and leaving a process are measures periodically. Determine the best value for stream A in kg/h for the process shown from the three hourly measurements indicated of B and C in the figure, assuming steady-state operation at a fixed operating point. • 92.4kg/h • 94.3kg/h • (c) 93.8kg/h A B plant • 11.1kg/h • 10.8kg/h • (c) 11.4kg/h C FORMULATING THE OPTIMIZATION PROBLEM

  30. Optimization Formulation: Workshop #3 Material flows allocation Consider the process diagram of the figure where each product (E,F,G) requires different amounts of reactants according to the table shown in the next slide. The table below show the maxium amount of reactant available per day as well as the cost per kg. A 1 E F B 2 3 G C FORMULATING THE OPTIMIZATION PROBLEM

  31. Optimization Formulation: Workshop #3 (cont’d) Formulate the optimization problem. The objective function is to maximize the total operating profit per day in units of €/day

  32. TAH > TC TY PC T T FC fo LAH LAL L fc PAH LC fo CW fo Dump to safe location Optimization Formulation: Workshop #4 Problem formulation: We love chemical reactors. Formulate an economic optimization for the reactor in the figure. The reaction is A  B  C with first order, irreversible rate expressions and arrhenius temperature dependence. Include the objective function, equality constraints, inequality constraints, and variable bounds. FORMULATING THE OPTIMIZATION PROBLEM

  33. Optimization Formulation: Workshop #5 • Formulation: Describe the major components of a steady-state optimization model for the distillation tower in the figure. • Define the objective function • Identify continuous and discrete variables • Identify dependent and independent variables • Give examples of each category of equality constraints • Give examples of each category of inequality constraints • Discuss advantages for indexed variables and constraints FORMULATING THE OPTIMIZATION PROBLEM

  34. Solvent T A Reactant Coolant Optimization Formulation: Workshop #6 • Formulation: Let’s consider a semi-batch chemical reactor. • Discuss the major difference in this model from others in this section. • Formulate the model. • Describe how you would optimize the temperature, feed rates, etc. after you have a computer program to solve the model. FORMULATING THE OPTIMIZATION PROBLEM

More Related