Developing the next generation of Real Time Optimization Technologies (Blend Optimization)
1. Real-‐Time
Blend
Optimization
Industrial
Modeling
Framework
(RTBO-‐IMF)
i
n
d
u
s
t
r
IAL
g
o
r
i
t
h
m
s
LLC.
(IAL)
www.industrialgorithms.com
June
2013
Introduction
to
Real-‐Time
Blend
Optimization,
UOPSS
and
QLQP
Presented
in
this
short
document
is
a
description
of
what
is
typically
known
as
on-‐line
or
real-‐time
"multi-‐process",
"multi-‐pool",
"multi-‐product",
"multi-‐property"
and
"multi-‐period"
blend
optimization.
This
kind
of
processing
is
found
in
all
petroleum
refineries
where
the
blending
process
mixes
diverse
refinery
rundown
streams
or
components
into
various
types
and
grades
of
gasoline,
jet
fuel,
diesel
and
heating
oil.
Figure
1
depicts
these
four
types
of
blended
products
with
shared
components
resources
including
their
inventory
such
as
cracked
naphtha,
kerosene,
etc.
configured
in
our
unit-‐operation-‐port-‐state
superstructure
(UOPSS)
(Kelly,
2004b,
2005,
and
Zyngier
and
Kelly,
2012).
Figure
1.
Gasoline,
Jet
Fuel,
Diesel
&
Heating
Oil
Blending
Flowsheet
Example.
2. The
CTank's
and
PTank's
(triangle
shapes)
in
Figure
1
represent
component
and
product
tanks
or
pools
where
the
small
circle
shapes
define
what
we
call
inlet
and
outlet
(with
"x")
ports
and
are
only
found
in
our
UOPSS.
The
Blender's
(rectangle
shapes
with
"x")
are
controlled
mixers
in
the
sense
that
component
flows
into
the
blenders
can
be
regulated
and
are
sometimes
referred
to
as
pools
with
no
inventory
and
maybe
either
in
continuous
or
semi-‐continuous
operation.
The
diamond
shapes
are
called
perimeters
and
are
the
usual
source
and
sink
nodes
found
in
other
types
of
network
flow
representations.
On-‐line
analyzers
or
instruments
are
usually
available
to
measure
the
intensive
property
specifications
of
the
material
such
as
octane,
cetane,
sulfur,
viscosity,
density,
vapor
pressure,
distillation
temperature,
flash
point,
cloud
point,
etc.
just
to
name
a
few.
The
other
type
of
continuous
process
configured
is
a
Hydrotreater
which
reacts
hydrogen
with
the
virgin
diesel
stream
(VDiesel)
in
the
presence
of
a
catalyst
at
high
pressure
to
reduce
its
sulfur
content
i.e.,
HDiesel
will
have
a
very
low
sulfur
concentration.
The
"severity"
(i.e.,
its
process/operating
condition)
of
the
hydrotreater
is
also
modeled
in
order
to
be
able
to
manipulate
or
optimize
the
degree
or
extent
to
which
the
virgin
diesel
is
desulfurized.
The
quantity
(flows
and
inventories)
and
quality
(properties
and
conditions)
aspects
of
the
problem
as
well
as
its
logic
attributes
(Kelly,
2006)
define
what
we
call
the
quantity-‐logic-‐quality
phenomena
(QLQP)
where
more
details
around
the
blending
process
modeling
and
its
planning
and
scheduling
can
also
be
found
in
Kelly
(2004a)
and
Castillo,
Kelly
and
Mahalec
(2013).
Another
important
issue
is
the
handling
feedback
especially
when
controlling
flows,
inventories
and
properties
in
real-‐time
or
closed-‐loop.
This
is
addressed
using
our
state-‐of-‐the-‐art
dynamic
and
nonlinear
data
reconciliation
and
regression
technology
(Kelly,
1998
and
2004c)
implemented
inside
a
"moving
horizon
estimation"
(MHE)
framework
(Kelly
and
Zyngier,
2008).
What
makes
this
blending
configuration
interesting
is
the
modeling
of
all
four
products
together
into
a
single
blending
optimization
problem.
Due
to
the
sharing
of
rundown
components
between
one
or
more
blenders
at
different
times,
there
is
tremendous
opportunity
to
produce
on-‐
specification
product
using
the
lowest
cost
and
most
available
components.
Existing
blend
control
and
optimization
software
only
manage
one
blender
at
a
time
with
no
other
pools
such
as
tanks
included,
and
they
look
out
no
further
than
the
current
blend
(mono-‐period).
In
our
formulation
we
look
out
over
multiple
blends
of
product
over
multiple
blenders
considering
multiple
periods
or
time-‐intervals
into
the
future
where
these
time-‐periods
can
be
either
of
equal
or
unequal
duration.
In
addition
and
unique
to
our
formulation,
we
also
allow
the
integration
of
other
types
of
processes
(not
only
hydrotreaters)
such
as
crude
distillation
units,
catalytic
reformers,
fluidized
catalytic
converters,
hydrocrackers
and
alkylation
units.
This
allows
for
upstream
manipulations
of
process/operating
conditions
to
produce
more
appropriate
component
rundown
properties
before
they
even
enter
the
blending
area.
This
alleviates
possible
quantity
and/or
quality
bottlenecks
(long
and
shorts
of
material)
that
may
arise
during
the
blending
operation
avoiding
off-‐specification
events
as
well
as
minimizing
over
and
under-‐use
of
high-‐octane,
high-‐cetane,
low-‐sulfur
and/or
low-‐viscosity
component
rundowns.
Benefits
for
such
a
RTBO
application
can
be
in
the
millions
of
dollars
and
are
comparable
to
the
benefits
defined
by
Kelly
and
Mann
(2003)
for
crude-‐oil
blend
optimization.
More
specifically,
a
similar
installation
of
this
technology
and
its
approach
installed
at
a
major
oil
company's
refinery
in
Europe
quoted
a
payback
period
of
only
two-‐weeks!
Industrial
Modeling
Framework
(IMF),
IMPRESS
and
SIIMPLE
3. To
implement
the
mathematical
formulation
of
this
and
other
systems,
IAL
offers
a
unique
approach
and
is
incorporated
into
our
Industrial
Modeling
and
Pre-‐Solving
System
we
call
IMPRESS.
IMPRESS
has
its
own
modeling
language
called
IML
(short
for
Industrial
Modeling
Language)
which
is
a
flat
or
text-‐file
interface
as
well
as
a
set
of
API's
which
can
be
called
from
any
computer
programming
language
such
as
C,
C++,
Fortran,
Java
(SWIG),
C#
or
Python
(CTYPES)
called
IPL
(short
for
Industrial
Programming
Language)
to
both
build
the
model
and
to
view
the
solution.
Models
can
be
a
mix
of
linear,
mixed-‐integer
and
nonlinear
variables
and
constraints
and
are
solved
using
a
combination
of
LP,
QP,
MILP
and
NLP
solvers
such
as
COINMP,
GLPK,
LPSOLVE,
SCIP,
CPLEX,
GUROBI,
LINDO,
XPRESS,
CONOPT,
IPOPT
and
KNITRO
as
well
as
our
own
implementation
of
SLP
called
SLPQPE
(successive
linear
&
quadratic
programming
engine)
which
is
a
very
competitive
alternative
to
the
other
nonlinear
solvers
and
embeds
all
available
LP
and
QP
solvers.
The
underlying
system
architecture
of
IMPRESS
is
called
SIIMPLE
(we
hope
literally)
which
is
short
for
Server,
Interacter
(IPL),
Interfacer
(IML),
Modeler,
Presolver
Libraries
and
Executable.
The
Server,
Presolver
and
Executable
are
primarily
model
or
problem-‐independent
whereas
the
Interacter,
Interfacer
and
Modeler
are
typically
domain-‐specific
i.e.,
model
or
problem-‐dependent.
Fortunately,
for
most
industrial
planning,
scheduling,
optimization,
control
and
monitoring
problems
found
in
the
process
industries,
IMPRESS's
standard
Interacter,
Interfacer
and
Modeler
are
well-‐suited
and
comprehensive
to
model
the
most
difficult
of
production
and
process
complexities
allowing
for
the
formulations
of
straightforward
coefficient
equations,
ubiquitous
conservation
laws,
rigorous
constitutive
relations,
empirical
correlative
expressions
and
other
necessary
side
constraints.
User,
custom,
adhoc
or
external
constraints
can
be
augmented
or
appended
to
IMPRESS
when
necessary
in
several
ways.
For
MILP
or
logistics
problems
we
offer
user-‐defined
constraints
configurable
from
the
IML
file
or
the
IPL
code
where
the
variables
and
constraints
are
referenced
using
unit-‐operation-‐port-‐state
names
and
the
quantity-‐logic
variable
types.
It
is
also
possible
to
import
a
foreign
LP
file
(row-‐based
MPS
file)
which
can
be
generated
by
any
algebraic
modeling
language
or
matrix
generator.
This
file
is
read
just
prior
to
generating
the
matrix
and
before
exporting
to
the
LP,
QP
or
MILP
solver.
For
NLP
or
quality
problems
we
offer
user-‐defined
formula
configuration
in
the
IML
file
and
single-‐value
and
multi-‐value
function
blocks
writable
in
C,
C++
or
Fortran.
The
nonlinear
formulas
may
include
intrinsic
functions
such
as
EXP,
LN,
LOG,
SIN,
COS,
TAN,
MIN,
MAX,
IF,
LE,
GE
and
KIP,
LIP,
SIP
(constant,
linear
and
monotonic
spline
interpolation)
as
well
as
user-‐written
extrinsic
functions.
Industrial
modeling
frameworks
or
IMF's
are
intended
to
provide
a
jump-‐start
to
an
industrial
project
implementation
i.e.,
a
pre-‐project
if
you
will,
whereby
pre-‐configured
IML
files
and/or
IPL
code
are
available
specific
to
your
problem
at
hand.
The
IML
files
and/or
IPL
code
can
be
easily
enhanced,
extended,
customized,
modified,
etc.
to
meet
the
diverse
needs
of
your
project
and
as
it
evolves
over
time
and
use.
IMF's
also
provide
graphical
user
interface
prototypes
for
drawing
the
flowsheet
as
in
Figure
1
and
typical
Gantt
charts
and
trend
plots
to
view
the
solution
of
quantity,
logic
and
quality
time-‐profiles.
Current
developments
use
Python
2.3
and
2.7
integrated
with
open-‐
source
Dia
and
Matplotlib
modules
respectively
but
other
prototypes
embedded
within
Microsoft
Excel/VBA
for
example
can
be
created
in
a
straightforward
manner.
However,
the
primary
purpose
of
the
IMF's
is
to
provide
a
timely,
cost-‐effective,
manageable
and
maintainable
deployment
of
IMPRESS
to
formulate
and
optimize
complex
industrial
manufacturing
systems
in
either
off-‐line
or
on-‐line
environments.
Using
IMPRESS
alone
would
be
somewhat
similar
(but
not
as
bad)
to
learning
the
syntax
and
semantics
of
an
AML
as
well
as
having
to
code
all
4. of
the
necessary
mathematical
representations
of
the
problem
including
the
details
of
digitizing
your
data
into
time-‐points
and
periods,
demarcating
past,
present
and
future
time-‐horizons,
defining
sets,
index-‐sets,
compound-‐sets
to
traverse
the
network
or
topology,
calculating
independent
and
dependent
parameters
to
be
used
as
coefficients
and
bounds
and
finally
creating
all
of
the
necessary
variables
and
constraints
to
model
the
complex
details
of
logistics
and
quality
industrial
optimization
problems.
Instead,
IMF's
and
IMPRESS
provide,
in
our
opinion,
a
more
elegant
and
structured
approach
to
industrial
modeling
and
solving
so
that
you
can
capture
the
benefits
of
advanced
decision-‐making
faster,
better
and
cheaper.
References
Kelly,
J.D.,
"A
regularization
approach
to
the
reconciliation
of
constrained
data
sets",
Computers
&
Chemical
Engineering,
1771,
(1998).
Kelly,
J.D.,
Mann,
J.M.,
"Crude-‐oil
blend
scheduling
optimization:
an
application
with
multi-‐million
dollar
benefits",
Hydrocarbon
Processing,
June,
47,
July,
72,
(2003).
Kelly,
J.D.,
"Formulating
production
planning
models",
Chemical
Engineering
Progress,
January,
43,
(2004a).
Kelly,
J.D.,
"Production
modeling
for
multimodal
operations",
Chemical
Engineering
Progress,
February,
44,
(2004b).
Kelly,
J.D.,
"Techniques
for
solving
industrial
nonlinear
data
reconciliation
problems",
Computers
&
Chemical
Engineering,
2837,
(2004c).
Kelly,
J.D.,
"The
unit-‐operation-‐stock
superstructure
(UOSS)
and
the
quantity-‐logic-‐quality
paradigm
(QLQP)
for
production
scheduling
in
the
process
industries",
In:
MISTA
2005
Conference
Proceedings,
327,
(2005).
Kelly,
J.D.,
"Logistics:
the
missing
link
in
blend
scheduling
optimization",
Hydrocarbon
Processing,
June,
45,
(2006).
Kelly,
J.D.,
Zyngier,
D.,
"Continuously
improve
planning
and
scheduling
models
with
parameter
feedback",
FOCAPO
2008,
July,
(2008).
Zyngier,
D.,
Kelly,
J.D.,
"UOPSS:
a
new
paradigm
for
modeling
production
planning
and
scheduling
systems",
ESCAPE
22,
June,
(2012).
Castillo,
P.A.,
Kelly,
J.D.,
Mahalec,
V.,
"Inventory
pinch
analysis
for
gasoline
blend
planning",
AIChE
J.,
June,
(2013).