Pipeline optimization Industrial Modeling Framework


Published on

Presented in this short document is a description of what is called a “Pipeline Scheduling Optimization Problem” and was first described in Rejowski and Pinto (2003) where they modeled the first-in-first-out (FIFO) and multi-product nature of the segregated pipeline using both discretized space (multi-batches, packs or pipes) and time (multi-intervals, slots or periods). The same MILP model can also be found in Zyngier and Kelly (2009) along with other related production/process objects.

Published in: Software
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Pipeline optimization Industrial Modeling Framework

  1. 1. Pipeline Scheduling Optimization Problem Industrial Modeling Framework (PPSOP-IMF) i n d u s t r IAL g o r i t h m s LLC. (IAL) www.industrialgorithms.com March 2014 Introduction to Pipeline Scheduling, UOPSS and QLQP Presented in this short document is a description of what is called a “Pipeline Scheduling Optimization Problem” and was first described in Rejowski and Pinto (2003) where they modeled the first-in-first-out (FIFO) and multi-product nature of the segregated pipeline using both discretized space (multi-batches, packs or pipes) and time (multi-intervals, slots or periods). The same MILP model can also be found in Zyngier and Kelly (2009) along with other related production/process objects. Figure 1. Pipeline Scheduling Optimization Problem Flowsheet. Figure 1 depicts a relatively simple flowsheet problem in our unit-operation-port-state superstructure (UOPSS) (Kelly, 2004, 2005, and Zyngier and Kelly, 2012). The diamond shapes are called perimeter units where “S” stands for supply, “D” for demand and the “A”, “B” and “C” operation labels represent the three (3) different types of segregated materials or products that can be contained and tracked within the pipeline. The rectangular shapes are the multi-product or segregated pipeline projectional unit-operations labeled “PL-A”, “PL-B” and “PL-
  2. 2. C” which are discretized spatially or structurally into five (5) pipes (or packs). The circles indicate in-ports and out-ports (with an “X” inside) which are known as the unambiguous flow interfaces in to and out of non-port shapes where the entire flowsheet description or UOPS superstructure can be found in Appendix A in the UPS file. The 0’s and 1’s in the projectional, virtual or logical pipeline shapes represent at time-period zero (0) (past/present time-horizon) which product or material fills the pipe where if the pipeline is flowing then the FIFO sequence will be B, B, C, A, A meaning that two batches of B will discharge first, then one batch of C and followed by two batches of A. The two important aspects or assumptions of this pipeline MILP modeling is that the physical pipeline is always filled with at least one type of material and that the pipeline flowrate is two- valued i.e., either 0 (zero) or some constant non-zero value. These two assumptions imply that all of the pipe-sizes or volumes displaced are equal and that the flow per time-period equals the pipe-size exactly. This allows the products in each pipe to be properly tracked over the scheduling time-horizon when the pipeline flow is zero i.e., the pipeline is shutdown or more appropriately not flowing. It also implies that the total volume of the pipeline is equal to the number of pipes times the pipe’s volume or its flowrate. This may seem somewhat restrictive though it should be pointed out that in practice, typical pipeline operations discourage the use of continuously varying the pipeline’s flowrate over a significant range where instead they prefer to operate with a nominal flowrate to minimize energy costs (sweet-spot). Although the pipeline operator can speedup and slowdown the pipeline when required to meet timing constraints and system pressure bounds, from a planning and/or scheduling perspective, a nominal constant flowrate is assumed. For this problem the pipeline has a total volume displaced of 50.0 volume-units with a flow per time-period or flowrate equal to 10 volume-units per time-units. This of course implies that we have 50.0 / 10.0 = 5 (five) equal-volume pipes and hence the spatial/structural digitization of the problem. We also arbitrarily assume that the number of time-periods contained in the scheduling time-horizon is fifteen (15) time-periods of duration 1.0 time-unit which defines the temporal or chronological digitization of the problem. It should be noted that if a longer time-horizon is used with a smaller time-period duration and the pipe-size or flow per time-period is smaller than the minimum or lower batch-size then a lower up-time or minimum run-length should be applied to the supply or inbound-side of the pipeline. The mathematics to model these types of constraints can be found in Kelly and Zyngier (2007) and Zyngier and Kelly (2009). This will allow the spatial/structural discretization of the pipeline to be smaller than its typical minimum batch or slug-size yet respect this minimum when the pipeline is scheduled. Another salient feature of this type of FIFO pipeline modeling is its ability to make both sizing and sequencing/scheduling decisions. Usually pure scheduling only deals with what we call selecting (assignment), sequencing (precedence) and slotting (timing) although this representation enables sizing decisions (usually referred to as planning decisions) to be made simultaneously with the sequencing and other scheduling decisions i.e., we are performing simultaneous planning and scheduling. This is especially useful for integrated operating companies who operate their own pipelines as well as production/processing plants and require the planning and scheduling decision-making to not only determine when (sequencing/slotting) and where (selecting) to move or transport materials via pipelines (typically known as nominations) but also to determine how much product to transfer and these are the sizing decisions afforded by this formulation.
  3. 3. Finally, if there is product or material sequence-dependent restrictions that need to be adhered to such as when we move naphtha (N), kerosene (K) and diesel (D) within the same non- fungible pipeline then we can include a continuous-process object upstream of the pipeline which includes the sequence-dependent changeover mathematics found in Kelly and Zyngier (2007). This will enforce the sequence-dependent constriction that naphtha must always be the interface material or medium between kerosene and diesel i.e., N, K, N, D, N, K, N, D, etc. Industrial Modeling Framework (IMF), IMPL and SIIMPLE To implement the mathematical formulation of this and other systems, IAL offers a unique approach and is incorporated into our Industrial Modeling Programming Language we call IMPL. IMPL 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#, VBA 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, KNITRO and WORHP 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. In addition and specific to DRR problems, we also have a special solver called SECQPE standing for Sequential Equality-Constrained QP Engine which computes the least-squares solution and a post-solver called SORVE standing for Supplemental Observability, Redundancy and Variability Estimator to estimate the usual DRR statistics found in Kelly (1998 and 2004b) and Kelly and Zyngier (2008a). SECQPE also includes a Levenberg-Marquardt regularization method for nonlinear data regression problems and can be presolved using SLPQPE i.e., SLPQPE warm-starts SECQPE. SORVE is run after the SECQPE solver and also computes the well-known "maximum-power" gross-error statistics (measurement and nodal/constraint tests) to help locate outliers, defects and/or faults i.e., mal-functions in the measurement system and mis-specifications in the logging system. The underlying system architecture of IMPL is called SIIMPLE (we hope literally) which is short for Server, Interfacer (IML), Interacter (IPL), Modeler, Presolver Libraries and Executable. The Server, Presolver and Executable are primarily model or problem-independent whereas the Interfacer, Interacter 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, IMPL's standard Interfacer, Interacter 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 IMPL 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 *.ILP 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
  4. 4. 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, NOT, EQ, NE, LE, LT, GE, GT and CIP, LIP, SIP and KIP (constant, linear and monotonic spline interpolations) as well as user-written extrinsic functions (XFCN). It is also possible to import another type of foreign file called the *.INL file where both linear and nonlinear constraints can be added easily using new or existing IMPL variables. 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 IMPL to formulate and optimize complex industrial manufacturing systems in either off-line or on-line environments. Using IMPL 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 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 IMPL 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. Pipeline Scheduling Optimization Problem Synopsis At this point we explore further the application of pipeline scheduling optimization to this small but representative three-product, five-pipe and fifteen-period model as found in the Gantt chart of Figure 2 below.
  5. 5. Figure 2. Pipeline Scheduling Optimization Problem Gantt Chart. In this scenario, situation or sample, we force the pipeline to have zero (0) flow for time-periods five (5) and ten (10) by setting the supply flows (S-A, S-B and S-C) to zero within these time- periods as shown in Appendix B’s IML file using our concept of commands, orders or transactions. It is technically incorrect to suggest that we are shutting down the pipeline explicitly given our first assumption that the pipeline is always filled hence the reason for shutting down the supply-side flows in to (or the demand-side flows out of) the pipeline. For this problem instance we are assuming that material C is the most profitable to move, material B is the second profitable and material A is the least profitable. This is why starting in time-period one (1), only product C is supplied to the pipeline over the scheduling horizon and why after the initial contents have been discharged from time-periods two (2) to six (6), only C is demanded or lifted from the pipeline starting in time-period seven (7). The most interesting feature of the Gantt chart is that in time-period five (5) when the supply- side is shutdown with zero (0) flow, the discharge of the two batches, packs or pipes of material A are interrupted until the flow is allowed to resume in time-period six (6). After time-period six (6) then only material C is seen leaving the pipeline except for time-period ten (10) when the supply-side flow is again set to zero (0). References Rejowski, R., Pinto, J.M., “Scheduling of a multiproduct pipeline system”, Computers and Chemical Engineering, 27, (2003). Kelly, J.D., "Production modeling for multimodal operations", Chemical Engineering Progress, February, 44, (2004).
  6. 6. 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., Zyngier, D., "An improved MILP modeling of sequence-dependent switchovers for discrete-time scheduling problems", Industrial & Engineering Chemistry Research, 46, 4964, (2007). Zyngier, D., Kelly, J.D., "Multi-product inventory logistics modeling in the process industries", In: W. Chaovalitwonse, K.C. Furman and P.M. Pardalos, Eds., Optimization and Logistics Challenges in the Enterprise", Springer, 61-95, (2009). Zyngier, D., Kelly, J.D., "UOPSS: a new paradigm for modeling production planning and scheduling systems", ESCAPE 22, June, (2012). Appendix A - PPSOP-IMF.UPS (UOPSS) File Appendix B - PPSOP-IMF.IML File