Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Lección 2:Formulación del problema
de optimización Variables
La función objetivo
Restricciones de igualdad
Restricciones de desigualdad
Grados de libertad
Formulación del problema
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Función objetivo
Esta es la formulación general del problema
min max
max ( )
. .( ) 0( ) 0
xf x
s th xg xx x x
=
≤
Restricciones igualadad
Variables límite
Restricciones desigualdad
≤ ≤
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Variables can be grouped into two categories
“decision” or “optimization” variables
These are the variables in the system that are changed independently to modify the behavior of the system.
dependent variables
whose behavior is determined by the values selected for the independent variables.
DESIGN:
OPERATIONS:
MANAGEMENT:
Although they can be grouped this way to help understanding, thesolution method need not distinguish them. We need to solve a setof equations involving many variables.
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=VARIABLES
min maxx x x
reactor volume, number of trays, heat exch. area, …
temperature, flow, pressure, valve opening, …
feed type, purchase price, sales price, ..
≤ ≤≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
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.
1
2
3
15
16
17LC-1
LC3
dP-1
dP-2
To flare
T5
T6
TC7
AC1
LAHLAL
PAH
PC-1
P3
FC4
FC7
FC 8
F9
PV-3
T10
L4
T20
LAHLAL
F
30
P20
P23
T45
T44
P21
T
22
P11
P12
T30
T29
VARIABLES
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Some comments on variables
We should always place bounds on variables.
Exercise: Why place bounds?
Exercise: Propose bounds for variables in the process.
1
2
3
15
16
17LC-1
LC3
dP-1
dP-2
To flare
T5
T6
TC7
AC1
LAHLAL
PAH
PC-1
P3
FC4
FC7
FC 8
F9
PV-3
T10
L4
T20
LAHLAL
F
30
P20
P23
T45
T44
P21
T22
P11
P12
T30
T29
VARIABLES
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
FUNCIÓN OBJETIVO
Este es el objetivo, ejemplos:- maximizar beneficio (minimizar coste)- minimizar uso de energía- minimizar los residuos contaminantes - minimizar el material para contruir un depósito
Formularemos la mayoría de los problemas con una función objetivo escalar
Debería representar el efecto total de las variables (x) en el objetivo. Por ejemplo, $/kg no es un buen objetivo a menos que kg esté fijado.Cuando se necesite hay que incluir el valor actualizado del dinero.
max ( )xf x
How should I formulate these? min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Algunos comentarios sobre la función objetivo
• Aunque es preferible un objetivo escalar. Muchas veces nos encontramos con múltiples objetivos.
• Tener en cuenta que Max (f) es igual que Min (-f)
- Por tanto, no hay diferencia práctica ni fundamental entre problemas de maximizar y de minimizar. El mismo software y algoritmo resuelve ambos.
• Hay dificultades cuando los modelos nos son muy exactos.
• Algunos aspectos son muy difíciles de modelar (respuesta del mercado a una mejora en la calidad del producto).
• Deseamos una función objetivo “suave”.
FUNCIÓN OBJETIVO
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
RESTRICCIONES DE IGUALDAD. .
( ) 0
s t
h x =
Esta expresión limita los valores posibles de x. Definen laRegión factible (feasible region)
Algunas restricciones de igualdad: - materia, energía, fuerza, … - equilibrio - decisiones de ingeniería ( F1 - .5 F2 = 0 ) - valores impuestos por el control set point temp = 231
BALANCES
Por convenio se escriben estas ecuaciones con un cero en la derecha de la igualdad (zero rhs –right hand side-)
Puede haber múltiples restricciones de igualdad, así que h(x) es un vector.
For example?
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
1. Define Objetivos
2. Prepara información
3. Formula el modelo
4. Determina la solución
5. Analiza Resultados
6. Valida el modelo
• ¿Qué decisión?• ¿Qué variable?• Localización
• Dibuja el proceso• Recopila los datos• Declara las suposiciones• Define el sistema
What type of equations do we use first?
Conservation balances for key variable
How many equations do we need?
Degrees of freedom = NV - NE = 0
What after conservation balances?
Constitutive equations, e.g.,
Q = h A (T)
rA = k 0 e -E/RT
Normalmente la solución y la optimización se determinan simultáneamente
RESTRICCIONES DE IGUALDAD
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
Balance: Component Material
masscomponent
of generation
out mass
component
in mass
component
masscomponent
of onAccumulati
Energy
sW-Q
out KE PE Hin KE PE HKE PE U
onAccumulati
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Algunos comentario sobre las restricciones de igualdad
• Los balances se deben de cumplir estrictamente. Si no lo especificamos así, el optimizador encontrará como ¡crear masa y energía!
• Las restricciones pueden tener índices. Por ejemplo, el índice puede ser la localización de un plato.
Estas dos formulaciones son equivalentesjallforxh
jxh
ij
ij
0)(
0)(
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
RESTRICCIONES DE IGUALDAD
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Algunos comentarios sobre las restricciones de igualdad
• Los balances se pueden aplicar sobre diferentes entidades:- materia- tiempo- cajas en un almacén- gente trabajando en una unidad de una planta
• Los modelos pueden cambiar. Por ejemplo, un cambiador puede tener una o dos fases según el resultado de la optimización.
Esto complica la resolución de la optimización.
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
RESTRICCIONES DE IGUALDAD
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
RESTRICCIONES DE DESIGUALDAD. .
( ) 0
s t
g x ≤
Son límites al sistema en una dirección:
- máxima inversión disponible - máximo flujo admisible por la bomba - mínimo caudal líquido en un determinado plato - mínima generación de vapor en una caldera - máxima presión de un depósito
Hay que tener cuidado en no definir un problema de forma incorrecta y que no tenga región factible.
Multiplicando por (-1) podemos cambiar el signo de la desigualdad,así que ambas restricciones están contempladas.
¿Por ejemplo?
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
GRADOS DE LIBERTAD
La siguiente relación determina el número de grados de libertad (DOF)
DOF = (# variables) - (# ecuaciones)
# variables =
# ecuaciones=
¿Cómo deben ser los valores de los grados de libertad para Optimización?
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Normalmente se piensa el problema de optimización como teniendo:
#Opt Var = # var - #equality constr.
En dos dimensiones el gráfico queda:
Opt Var1
Opt
Var
2
feasibleregion
GRADOS DE LIBERTAD (DOF)
min max
max ( )
. .
( ) 0
( ) 0
xf x
s t
h x
g x
x x x
=
≤
≤ ≤
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Opt
Var
2Opt Var1Opt Var1
Opt
Var
2
Caso A Caso B
Podemos dibujar la función objetivo como contornos.
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
GRADOS DE LIBERTAD (DOF)
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
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
T
A
Reactant
Solvent
Coolant
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
GRADOS DE LIBERTAD (DOF)
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
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?
T
A
Reactant
Solvent
Coolant
From Marlin, Process Control, McGraw-Hill, New York, 1995
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
GRADOS DE LIBERTAD (DOF)
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
¿Cómo seleccionamos el sistema para nuestra optimización?
maxmin
0)(
0)(
..
)(max
xxx
xg
xh
ts
xfx
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
How do we define a scalar that represents performance, including
• Economics
• Safety
• Product quality
• Product rates (contracts!)
• Flexibility
• …...
maxmin
0)(
0)(
..
)(max
xxx
xg
xh
ts
xfx
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Cómo de exacto debe ser el modelo del sistema físico?
• Macroscopico
• 1,2 3, dimensiones espaciales
• Dinámico o estado estacionario
• Propiesdades físicas
• Ecs. Constitutivas (U(f), k0e-E/RT, ..
maxmin
0)(
0)(
..
)(max
xxx
xg
xh
ts
xfx
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Cuáles son los límites a las posibles soluciones?
• Seguridad
• Calidad del producto
• Daños de equipos
• Operación de equipos
• Consideraciones legales/éticas
maxmin
0)(
0)(
..
)(max
xxx
xg
xh
ts
xfx
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
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
maxmin
0)(
0)(
..
)(max
xxx
xg
xh
ts
xfx
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
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.
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Very accurate over wide range of conditions
Longer computing
More complex
Less accurate over a narrow range of conditions
Shorter computing
Less complex
The engineer must select the appropriate balance for each problem. The problem must be tractable. Intractable problems have to be reformulated.
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Decisions to be made
modelSolver method and software
Solution
Does the formulation and solution method support the solution?
Not known with certainty
• Structure of equations
• Parameter values
“The truth”
• Measurement error
• Disturbances
Uncertainty: We must recognize uncertainty in our methods and estimate bounds of the effects of out solutions.
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Optimization Formulation: Workshop #1
FORMULATING THE OPTIMIZATION PROBLEM
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?
Material processed (kg/day)
Profit(€/kg)
Plant 1 2 1 2
A MA1 MA2 SA1 SA2
B MB1 MB2 SB1 SB2
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Optimization Formulation: Workshop #2
FORMULATING THE OPTIMIZATION PROBLEM
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.
Material reconciliation
(a) 11.1kg/h
(b) 10.8kg/h
(c) 11.4kg/h
(a) 92.4kg/h
(b) 94.3kg/h
(c) 93.8kg/h
A
C
Bplant
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Optimization Formulation: Workshop #3
FORMULATING THE OPTIMIZATION PROBLEM
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.
Material flows allocation
A
B
C
E
F
G
Raw material
Maximum available (kg/day)
Cost (€/kg)
A 40000 1.5
B 30000 2.0
C 25000 2.5
1
2
3
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Process
Product
Reactants requirements (kg/kg product)
Processing cost (product) (€/kg)
Selling price (product) (€/kg)
1 E 2/3A,1/3B 1.5 4.0
2 F 2/3A,1/3B 0.5 3.3
3 G 1/2A,1/6B,1/3C 1.0 3.8
Formulate the optimization problem. The objective function is to maximize the total operating profit per day in units of €/day
Optimization Formulation: Workshop #3 (cont’d)
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Optimización de procesos químicos. 2007-2008 DIQUIMA-ETSII
Optimization Formulation: Workshop #4
Hallar la relación óptima (L/D) para la construcción de un depósito de modo que se minimicen los costes.
Suposiciones:
•Los extremos son planos
•Las paredes tienen un espesor constante, x. La densidad es ρ.
•El espesor es independiente de la presión
•El coste de fabricación de los extremos y del cilindro es el mismo (€/kg fabricado)
•No se desperdicia nada de material durante la fabricación del depósito.
FORMULACIÓN DEL PROBLEMA DE OPTIMIZACIÓN
Top Related