IMPRESS
Industrial Modeling & Presolving System
Brenno, December, 2012
12/10/2012
industrIALgorithms
Are you ready to get IMPRESSed?
Simulation based Simulation based Simulation based Optimization based Optimization based
Suite of tools (PIMS,
APS, MBO,
IMOS)
Suite of tools
(SIMTO Sched,
MBlend, Dock
Sol)
Suite of tools
(Flower,
Compass,
Optimix)
Suite of tools (RPMS,
PS, BLEND,
SAND)
Suite of tools
(IMPRESS)
Scheduling Blend:
MBO
Scheduling Blend:
SIMTO M-Blend
Scheduling Blend:
Optimix
Scheduling Blend:
BLEND
Scheduling Blend:
CBS, PBS-IMF
Easy interface
Installed in the
machine
Easy interface
Installed in the
machine
Installed in the
machine
Interface less
interactive
Access by intranet
No User-Interface
Integration by Data
Base
Integration by Web
Service Integration by XML
Integration by File,
Excel, API’s
BP
CONOCO
SHELL
VALERO
CHEVRON
PETROCHINA
INDIAN OIL
Commercial Scheduling Tools
industrIALgorithms
Types of Optimization & Estimation
IMPRESS is designed both for industrial decision-making & data-mining problems deployed off-line, in-line & on-line such as: Planning & Scheduling Optimization (active).
Data Reconciliation & Regression Estimation (passive).
Real-Time Control & Optimization (active).
Monitoring, Tracking & Tracing (passive). The terms active & passive imply the "degree of causality".
Active models must be "causal" (cause & effect amongst variables) & passive models may or may not be causal (no cause & effect required) also known as "observational".
Advanced Modeling System: IMPRESS
Problems are configured either interfacing with a flat-file language (IML = Industrial Modeling Language) or interactively using a programming language such as Python, Java, C#, C++, C or Fortran (IPL = Industrial Programming Language).
Currently have bindings to several linear and nonlinear programming solvers such as COINMP, GLPK, LPSOLVE, SCIP, XPRESS, XPRESS-SLP, CONOPT, IPOPT, KNITRO, NOVA & SLPQPE, etc.
System Architecture: SIIMPL
SIIMPL = Server, Interfacer, Interacter, Modeler, Presolver Libraries.
There are five DLL components in IMPRESS:
Server = data modeling & presolving routines.
Interfacer = parsing for the language.
Interacter = inserting, updating & viewing routines for the interchange.
Modeler = formulating of the variables, constraints, derivatives & expressions including "dependent" sets, lists & parameters.
Presolver = bindings for 3rd-party solving-systems.
Types of Variables (Phenomena)
Q=flow (rate, yield, holdup) q=densities, components, properties, conditions
Q=flow (rate, holdup) q=conditions L=setup, startup, switchover, shutdown
Q=flow L=setup, startup, switchover, shutdown
Q=quantity, L=logic, q=quality
“in-port”
“out-port” “unit-operation”
“out-port-to-in-port” stream, path, etc.
rate = flow / (time-period-duration) yield = (port-flow) / (unit-operation-flow) holdup = flow[t] – flow[t-1]
Time Model
• Logistics (Quantity*Logic (proy’d-quality), MILP): – “discrete-time” where each time-period has the same duration. – Time-periods may be “small-buckets” (un-ary) or “big-buckets”
(N-ary): • If un-ary then only one activity per time-period (scheduling) but if N-ary
then multiple activities per time-period where a “time-portion” variable for each operation is applied (planning).
• Quality (Quantity*quality (fixed-logic), NLP): – “distributed-time” where each time-period may have a different
duration (global/common time-grid). – Same as logistics.
• All input data is entered in “continuous-time” (begin, end-times) and digitized i.e., discretized or distributed accordingly.
Planuling = Planning + Scheduling
Scheduling
planning
crude
without the blender scheduling details
Solution: duration of each blender grade with time-period
Scheduling only for the blender: Including setup, startup, switchover, shutdown
Crude A
Crude B
Crude C
Crude D
Prod A
Prod B
Prod C
Prod D
Prod E
Prod F
Prod G
Prod H
Crude Recipe
Crude Scheduling
Refining Units Operational Modes
Products Recipes
Products Planning
Products Scheduling
Including setup, startup, switchover, shutdown
resulting targets to blender Scheduling/RTO
Prod A
Prod B
Prod C
Prod D
Prod E
Prod F
Prod G
Prod H
1st Planuling (big-buckets) 2nd Scheduling (small-buckets)
User/Adhoc Linear Constraints
• There are 2 ways to add user, adhoc or custom linear/logistics constraints or formulations:
– Inside IML/IPL using special frames with access to UOPSS
flow, holdup, setup, startup, etc. variables i.e., • UOLConstraint-&sUnit,&sOperation,&sName,&iBegin,&iEnd,@sType,@rValue,@rWeight
– Import a “foreign” LP (CPLEX) file generated by GAMS, AMPL, MOSEL, etc. • Variables are referenced as “Xnnn” and constraints by
“Fmmm” where if “nnn” corresponds to an IMPRESS generated variable index number then the IMPRESS variable will be used instead. All “mmm” constraint index numbers correspond to new constraint instances (or cuts/valid inequalities).
• There are 3 ways to add user, adhoc or custom nonlinear/quality constraints or formulations:
– Single-value formula using conditions on “black-box”
subtype unit-operations to calculate port flows, rates, yields, densities, components, etc.
– Single-value functions for “coefficients” as functions of
conditions on “black-box” subtype unit-operations and written in C, C++ or Fortran i.e., useful for physical-properties such as enthalpy, entropy, fugacity, etc.
– Multi-value functions on “black-blox” subtype unit-
operations written in C, C++ or Fortran.
User/Adhoc Nonlinear Constraints
function UOfunction(numtpp, numtpf, & durtpp, durtpf, & numip, numop, & numdns, numcmp, numprp, numcnd, & varipf, varopf, & varipdns, varopdns, & varipcmp, varopcmp, & varipprp, varopprp, & varipcnd, varopcnd, & varuof, varuocnd, & numcon, typcon, & numnzder, rownder, colnzder, & valipf, valopf, & valipdns, valopdns, & valipcmp, valopcmp, & valipprp, valopprp, & valipcnd, valopcnd, & valuof, valuocnd, & valcon, & flag)
Multi-value functions on “black-blox” subtype unit-operations written in C, C++ or Fortran.
User/Adhoc Nonlinear Constraints
Formula Intrinsic/Extrinsic Functions
• Unary intrinsic functions supported are: – ABS, SQRT, LN, LOG, EXP, SIN, COS, TAN, DEG, RAD, INT,
ROUND, FLOOR, CEILING, FACT, IF, NOT and URN, NRN (uniform and normal random numbers).
• Binary and N-ary intrinsic functions are: – EQ, NE, LE, LT, GE, GT, MIN, MAX and
– MNL, MXL, KIP, LIP, SIP, KIP2, LIP2, SIP2 (monotonic spline using piecewise Hermite polynomials).
• Extrinsic unary, binary and N-ary functions are: – XFU1, XFU2, XFU3, XFB1, XFB2, XFB3 & XFN1, XFN2, XFN3
Solving via SLPQPE (not SQP, SLQP, SQLP)
• What is SLPQPE?
– It is identical to SLP (Zhang et. al., 1985) except that at each major iteration of the nonlinear program a QP is called instead of the LP if there are quadratic terms in the objective function.
• Where is it useful?
– When the objective function is a mix of linear (1-norm) and quadratic (2-norm) terms such as found in industrial planning, scheduling, control & reconciliation problems, then SLPQPE has been found to be extremely effective in practice.
• Where is it usually not useful?
– When the objective function has an indefinite Hessian (+/- eigenvalues) i.e., +/- diagonal quadratic terms.
– However, industrial optimization & estimation problems do not usually have an indefinite objective function Hessian although the Hessian of the Lagrangian most likely will be.
J. Zhang, et. al., “An Improved Successive Linear Programming Algorithm”, Management Science, 1985.
Other Techniques found in IMPRESS
Differentiation Engine: All 1st-order partial derivatives are either supplied
analytically or computed numerically of analytical quality using complex-step differencing & graph-colouring. * The modeler or user is not responsible for providing derivatives.
Diagnostic Engine (Work-in-Progress ...): Experience says that over 95% of IOP's have infeasibilities
that occur in the linear part of the model where these can be quickly identified in LP primal presolve. The rest require artificial or what we call excursion variables in both the integer and nonlinear parts of the model and are generated automatically.
IMPRESS.EXE (Console)
• impress.exe -feed=“yourmodelhere.iml" -form=sparsic/symbolic -fit=discrete/distribute -filter=quantity/logistics/quality -foreign=*.ilp -focus=optimization/estimation -factor=1 -factorizer=y12m/ysmp/nspiv/pardiso -fork=lpsolve/xpress/ipopt/slpqpe/secqpe_sorve -flashback=flatfile -fanfare=1073741823
IMPRESS Components
• IMPRSserver.dll, IMPRSinteracter.dll, IMPRSinterfacer.dll, IMPRSmodeler.dll, IMPRSpresolver.dll, IMPRESS.EXE
• Microsoft Visual Studio 10 and Intel Fortran/MKL Redistributables (free).
• IAConstructer.py (2.3) (Flowsheet), UOPSS.sheet, unit_perimeter.shape, etc.
• IAViewer.py (2.7) (Gantt/Trend Charts)
• Python 2.3 and Python 2.7 (coexist)
• Dia 0.97.2 (Gnome)