Applied Optimization in the Petroleum Industry 3031241657, 9783031241659

The book addresses optimization in the petroleum industry from a practical, large-scale-application-oriented point of vi

274 59 8MB

English Pages 291 [292] Year 2023

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Preface
Intended Audience
The Book’s Contents
Chapter 1: Introduction to Petroleum and Petrochemical Industries
Chapter 2: Introduction to Optimization Models and Techniques
Chapter 3: Optimum Locations of Multiple Drilling Platforms
Chapter 4: Simulation-Based Optimization of Refinery Valve Inspection Frequency
Chapter 5: Operations and Workforce Scheduling for Refinery Turnaround Maintenance
Chapter 6: Simulation-Based Scheduling of Pipeline Maintenance Crews
Chapter 7: Optimum Gasoline Blending in Petroleum Refining
Chapter 8: Employee Scheduling in Remote Oil Industry Work Sites
Chapter 9: Optimum Planning of a Distribution Supply Chain for Refined Oil Products
Chapter 10: Berth Allocation for Loading Tankers at an Oil Export Terminal
Acknowledgments
Contents
About the Author
1 Introduction to Petroleum and Petrochemical Industries
1.1 Historical Background
1.1.1 History of the Petroleum Industry
1.1.2 History of the Petrochemical Industry
1.2 Main Processes of the Petroleum Industry
1.2.1 Exploration
1.2.2 Production
1.2.3 Upstream
1.2.4 Midstream
1.2.5 Refining (Downstream)
1.3 Main Processes of the Petrochemical Industry
1.3.1 Feedstock Preparation
1.3.2 Upstream Petrochemical Industry
1.3.3 Intermediate Petrochemical Industry
1.3.4 Downstream Petrochemical Industry
1.4 Main Oil Products and Their Uses
1.4.1 Crude Oil Types
1.4.2 Types of Natural Gas
1.4.3 Types of Refined Oil Products
1.5 Types of Petrochemical Products
1.5.1 Olefin Products
1.5.2 Aromatics Products
1.5.3 SynGas Products
1.6 Integrated Petroleum and Petrochemical Industrial System
1.7 Literature on Optimization in the Petroleum Industry
1.7.1 Optimization in the Petroleum Industry at Large
1.7.2 Optimization in the Exploration and Production Stage
1.7.3 Optimization in the Refining Stage
1.7.4 Optimization in the Transportation Stage
1.7.5 Future Trends in the Petroleum Industry
1.8 Summary and Conclusions
References
2 Introduction to Optimization Models and Techniques
2.1 Introduction to Optimization
2.2 Unconstrained Optimization
2.3 Linear Programming
2.3.1 LP Graphical Solution
2.3.2 The Simplex Method
2.4 Other Mathematical Programming Techniques
2.4.1 Integer Programming
2.4.2 Goal Programming
2.4.3 Network Models
2.4.4 Dynamic Programming (DP)
2.4.5 Stochastic Programming
2.4.6 Nonlinear Programming
2.5 Meta-heuristic Algorithms
2.5.1 Genetic Algorithms (GA)
2.5.2 Simulated Annealing (SA)
2.5.3 Tabu Search (TS)
2.5.4 Particle Swarm Optimization (PSO)
2.6 Simulation-Based Optimization
2.7 Summary and Conclusions
References
3 Optimum Locations of Multiple Drilling Platforms
3.1 Introduction
3.2 Relevant Literature
3.3 The Offshore Drilling Problem
3.3.1 Problem Description
3.3.2 Model Costs and Parameters
3.4 Case 1: Fixed Rig Locations
3.4.1 Case 1a. Equal Number of Wells Per Platform
3.4.2 Case 1b. Unrestricted Number of Wells Per Platform
3.5 Case 2: Optimum Platform Locations
3.5.1 Case 2 Optimum Solution Model
3.5.2 Case 2a. Solution with Equal Number of Wells Per Rig
3.5.3 Case 2b. Solution with Unrestricted Number of Wells Per Rig
3.6 Case 2 Heuristic Solution
3.6.1 Case 2 Heuristic Solution: Stage 1
3.6.2 Case 2 Heuristic Solution: Stage 2
3.6.3 Case 2a. Heuristic Solution with Equal Number of Wells Per Rig
3.6.4 Case 2b. Heuristic Solution with Unrestricted Number of Wells Per Rig
3.6.5 Evaluation of the Heuristic Solution
3.7 Summary and Conclusions
References
4 Simulation-Based Optimization of Refinery Valve Inspection Frequency
4.1 Introduction
4.2 Review of Related Work
4.2.1 Analytical Inspection Interval Models
4.2.2 Simulation Inspection Interval Models
4.2.3 Reasons for Using a Simulation Approach
4.3 Data Collection and Analysis
4.3.1 Data Collection
4.3.2 Factors Affecting Valve Failure Rates
4.3.3 Determining Probability Distributions
4.4 Modeling and Simulation
4.5 Output Analysis
4.6 Summary and Conclusions
References
5 Operations and Workforce Scheduling for Refinery Turnaround Maintenance
5.1 Introduction
5.2 Relevant Literature
5.3 Model Formulation
5.3.1 Assumptions
5.3.2 Input Values
5.3.3 Decision Variables
5.3.4 The Integer Linear Programming Model
5.3.5 Values of G and T and Bounds on N and Z
5.3.6 Size of the Optimum ILP Model
5.4 Heuristic Solution Method
5.4.1 Heuristic Stage 1
5.4.2 Heuristic Stage 2
5.4.3 Size of the Heuristic ILP Model
5.5 Case Study
5.5.1 Optimum Solution of the Case Study
5.5.2 Heuristic Solution of the Case Study
5.6 Evaluation of the Heuristic Method
5.7 Summary and Conclusions
References
6 Simulation-Based Scheduling of Pipeline Maintenance Crews
6.1 Introduction
6.2 Literature Review
6.3 Problem Description
6.4 Data Collection and Analysis
6.5 The Simulation Model
6.5.1 Model Assumptions
6.5.2 Model Definitions
6.5.3 Model Design
6.5.4 Duration of the Simulation Runs
6.5.5 Model Verification
6.5.6 Model Validation
6.5.7 Number of Replications
6.6 Optimizing Days-Off Schedules
6.6.1 Performance of Current Schedules
6.6.2 Optimum Machinist Schedules
6.6.3 Optimum Schedules of the Other Specializations
6.7 Summary and Conclusions
References
7 Optimum Gasoline Blending in Petroleum Refining
7.1 Introduction
7.2 Literature Review
7.3 The Gasoline Blending Problem
7.3.1 Refining and Blending Processes
7.3.2 Blending Process Inputs and Outputs
7.3.3 Gasoline Specifications
7.4 Calculating Blend Properties from Component Properties
7.4.1 Calculating the E70 of the Blend
7.4.2 Calculating the RVP of the Blend
7.4.3 Calculating the VLI of the Blend
7.4.4 Calculating the RON of the Blend
7.5 Gasoline Blending Case Study
7.6 Nonlinear Programming Optimization Model
7.6.1 Notation
7.6.2 Objective Function
7.6.3 Production Constraints
7.6.4 Specification Constraints
7.7 Solution Process and Results
7.7.1 Stage 1: LP Solution of Linearized Approximation
7.7.2 Stage 2: NLP Solution Using LP Solution as the Initial Point
7.7.3 Case Study Solution Results
7.8 Summary and Conclusions
References
8 Employee Scheduling in Remote Oil Industry Work Sites
8.1 Introduction
8.2 Literature Review
8.3 Problem Definition and Formulation
8.3.1 Problem Description
8.3.2 Model Assumptions
8.3.3 Model Notation
8.3.4 Model Formulation
8.4 Determining the Workforce Size
8.4.1 Minimum W for the Simplified Model
8.4.2 Minimum W for the Full Model
8.5 Determining the Days-Off Assignments
8.5.1 Four Active Days-Off Patterns
8.5.2 Seven Active Days-Off Patterns
8.5.3 Eight Active Days-Off Patterns
8.5.4 Ten Active Days-Off Patterns
8.5.5 Eleven Active Days-Off Patterns
8.5.6 The Days-Off Scheduling Procedure
8.6 Summary and Conclusions
References
9 Optimum Planning of a Distribution Supply Chain for Refined Oil Products
9.1 Introduction
9.2 Literature Review
9.3 Problem Description
9.4 Model Formulation
9.4.1 Model Assumptions
9.4.2 Model Indices
9.4.3 Given Parameters
9.4.4 Decision Variables
9.4.5 Objective Function
9.4.6 Supply, Demand, and Material Balance Constraints
9.4.7 DC Capacity Constraints
9.4.8 SC to DC Transportation Link Constraints
9.4.9 DC to DM Transportation Link Constraints
9.4.10 DC to DC Transportation Link Constraints
9.5 Given Data
9.6 Model Solution
9.7 Summary and Conclusions
References
10 Berth Allocation for Loading Tankers at an Oil Export Terminal
10.1 Introduction
10.2 Review of Relevant Literature
10.3 Problem Description
10.4 Berth Allocation Optimization Model
10.4.1 Model Assumptions
10.4.2 Model Indices
10.4.3 Given Parameters
10.4.4 Decision Variables
10.4.5 Objective Function
10.4.6 Constraints
10.4.7 Calculating the Value of S
10.5 Berth Allocation Case Study
10.6 Summary and Conclusions
References
Appendix A Bibliography: Optimization in the Petroleum Industry
A.1 Exploration
A.2 Production
A.3 Refining
A.4 Transportation
Index
Recommend Papers

Applied Optimization in the Petroleum Industry
 3031241657, 9783031241659

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Hesham K. Alfares

Applied Optimization in the Petroleum Industry

Applied Optimization in the Petroleum Industry

Hesham K. Alfares

Applied Optimization in the Petroleum Industry

Hesham K. Alfares Department of Systems Engineering King Fahd University of Petroleum and Minerals Dhahran, Saudi Arabia

ISBN 978-3-031-24165-9 ISBN 978-3-031-24166-6 (eBook) https://doi.org/10.1007/978-3-031-24166-6 © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland AG 2023 This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

To my dear parents, my father Kamal Alfares and my mother Batool Alawwami, with utmost respect and gratitude for their love, guidance, support, and prayers.

Preface

This book addresses a topic that is highly significant from both a theoretical and a practical point of view. The petroleum industry is of vital importance to the world’s energy, economy, and technology. It is a large and critical business sector, which is the main source of the world’s energy and the raw materials for a wide variety of industrial and consumer products. The petroleum industry is an international, multibillion-dollar businesses, which is among the biggest and most influential industries in the world today. Natural oil has been the main source of the world’s energy for the last 70 years, making the petroleum industry a key factor in international affairs. The enormous importance of the petroleum industry is not due only to its economic scale and geopolitical influence. It is also due to its numerous products and petrochemical derivatives that interact with all industries and all economic sectors and touch our daily lives in countless ways. Currently, the petroleum industry is facing growing challenges. These challenges include depleting natural resources, restraining environmental regulations, emerging renewable energy alternatives, and increasing international competition. In order to effectively deal with these challenges, it is necessary to maximize the utilization of the industry’s limited production resources. Maximizing the benefits obtained from the available resources requires solving complex decision problems with many interacting variables. Operations research optimization techniques provide a proven scientific approach to find the best alternatives in such complex decision situations. The book provides a broad coverage of optimization models and techniques used to solve large-scale problems in the petroleum industry. Optimization refers to mathematical and computer models and techniques that are used to find the best possible solutions for many types of real-life problems. In order to apply optimization techniques, the first step is to identify the specific type of optimization model required for the given problem. Optimization models can be either constrained or unconstrained, stochastic or deterministic, and linear or nonlinear. After identifying the optimization model type, the problem needs to be formulated and then solved. The book provides the background on optimization model types, solution method categories, as well as real-life illustrative examples.

vii

viii

Preface

This book approaches optimization in the petroleum industry from a practical, application-oriented point of view. The book presents several actual large-scale applications of optimization models in the petroleum industry. All of these applications are based on the author’s own experience with real-life case studies and applied projects for the local petroleum industry. For each application, alternative heuristic solution techniques are provided when optimum solutions are difficult to obtain. Different chapters cover a wide spectrum of relevant petroleum industry activities, including drilling, producing, production planning, maintenance, and distribution. This book has two main objectives. The first objective is to demonstrate the advantages of using optimization techniques to solve complex problems in the petroleum industry. These advantages include reducing the cost, time, and emissions and increasing the quality, safety, productivity, and profitability. The second objective is to help both the industry’s decision-makers and academic researchers to solve real optimization problems. The knowledge gained from the book will help the readers to formulate and solve their own relevant optimization problems. This will allow them to maximize economic benefits, ensure operational safety, and reduce environmental impact.

Intended Audience Prior knowledge of either the petroleum industry or optimization techniques is not necessary to benefit from the book. The book is intended for readers from both the academia and the petroleum and petrochemical industries. In the academic domain, this book is relevant to senior undergraduate students, graduate students, and instructors and researchers in industrial, petroleum, and chemical engineering departments, as well as in computer science departments. In the industrial domain, the book is relevant to industrial, systems, petroleum, and chemical engineers working on industrial optimization problems. Moreover, the book should also be useful for process and production planners and plant engineers working in the petroleum industry’s various facilities.

The Book’s Contents The chapters of the book introduce the readers to three related topics: the petroleum industry, optimization concepts and models, and optimization applications in the petroleum industry. First, the readers are provided with essential knowledge of the history, classifications, and main functions and processes of the petroleum and petrochemical industries. Second, they are introduced to the main concepts and types of optimization models and solution techniques. Third, the readers are exposed to a

Preface

ix

variety of real-life optimization applications in the petroleum industry. In each application area, the readers will become aware of the current problem categories, model formulation approaches, alternative solution techniques, and future research trends. One important aspect that is emphasized throughout the book is the model formulation process of the petroleum industry optimization problems. This process involves translating the verbal description of the given real-life optimization problem into a set of mathematical expressions. Therefore, the components of mathematical optimization models, i.e., the decision variables, objective function, and constraints, are explicitly defined for each real-life problem considered in the book. Moreover, several modeling techniques are used in the different chapters of the book, including linear programming, integer programming, nonlinear programming, and simulation-based optimization. The chapters are arranged in the order of the petroleum industry’s value-chain sequence, starting from upstream activities (drilling) and ending with downstream activities (export of refined products). The contents of individual chapters are described in more detail below.

Chapter 1: Introduction to Petroleum and Petrochemical Industries This chapter provides a historical background of both the petroleum industry and its extension, i.e., the petrochemical industry. The chapter also presents the main stages, processes, and products of the two interrelated industries. Particular attention is given to the petroleum industry’s five main processes: exploration, production, upstream, midstream, and refining (downstream). Moreover, an overview of previous relevant literature reviews is given, highlighting the different problem categories, solution approaches, and future trends.

Chapter 2: Introduction to Optimization Models and Techniques In this chapter, optimization concepts, models, and techniques are introduced and classified. The different optimization categories are presented and described. These categories include unconstrained optimization, mathematical programming, metaheuristic algorithms, and simulation-based optimization. Several types of mathematical programming methods are discussed, including linear programming, integer programming, goal programming, dynamic programming, stochastic programming, and nonlinear programming. Due to its special significance, particular emphasis is given to linear programming.

x

Preface

Chapter 3: Optimum Locations of Multiple Drilling Platforms This chapter describes the optimization of multiple platform (rig) locations and wellplatform assignments for drilling multiple offshore oil and gas wells. The objective is to minimize the total cost of drilling all wells in a given offshore field. The drilling cost of each well is assumed to be a function of both the distance to the drilling platform and the platform’s individual cost. Integer programming-based exact methods and heuristic algorithms are developed for solving two alternative problem versions.

Chapter 4: Simulation-Based Optimization of Refinery Valve Inspection Frequency This chapter presents a simulation-based optimization approach to determine the best dynamic inspection policy of relief valves in a large petroleum refinery. A simulation model is used to minimize the total inspection, repair, and failure risk cost. The model is used to determine the optimum inspection frequency for each valve, i.e., the intervals between successive inspections, depending on the valve’s individual characteristics and previous inspection results. Simulation is used because this optimization problem involves uncertainty and multiple interacting factors such as valve pressure, temperature, medium, age, and size.

Chapter 5: Operations and Workforce Scheduling for Refinery Turnaround Maintenance This chapter considers workforce assignment and job scheduling for turnaround (shutdown) maintenance in a large oil refinery. The maintenance workforce must be divided into several teams that work in parallel on different sets of maintenance tasks. The objective is to minimize the total shutdown period, assuming the duration of each task is a function of the size of the assigned team. Optimization models and solution algorithms are developed for this scheduling problem. The model determines the number of maintenance teams, the size of each team, and the set and sequence of tasks assigned to each team.

Chapter 6: Simulation-Based Scheduling of Pipeline Maintenance Crews This chapter presents a simulation-based optimization methodology for scheduling multi-specialization pipeline maintenance crews. The simulation model considers

Preface

xi

stochastic daily labor demands of each specialization for the oil and gas pipeline maintenance crews. The model determines the optimum days-off scheduling assignments of the employees belonging to each maintenance specialization. The objective is to minimize the average throughput time, i.e., order completion time, for each maintenance specialization. The simulation model succeeds in reducing throughput times for all maintenance specializations without increasing the number or the cost of the employees.

Chapter 7: Optimum Gasoline Blending in Petroleum Refining This chapter addresses the optimum gasoline blending for an oil refinery. The objective is to maximize the profits while satisfying the constraints on demands, supplies, specifications, costs, capacities, and other applicable restrictions. A nonlinear programming (NLP) model is formulated to represent the problem, and a two-stage heuristic solution procedure is developed to solve it based on linear approximation. Given a set of raw materials (components) and their availabilities and specifications, and a set of gasoline products (blends) and their demands and specifications, the model determines amount of each component used to make each product, in order to satisfy the demands and meet the specifications with the minimum total cost.

Chapter 8: Employee Scheduling in Remote Oil Industry Work Sites This chapter considers the days-off scheduling of oil company employees working in remote locations. During their day-off breaks, the employees are transported by company aircraft to and from their work sites. The company has two objectives: minimizing the number of employees to reduce the labor cost and minimizing the number of assigned days-off breaks to reduce the transportation cost. A bi-objective integer programming model is formulated to represent the problem, and an optimum analytical procedure is developed to obtain the optimum solution.

Chapter 9: Optimum Planning of a Distribution Supply Chain for Refined Oil Products In this chapter, the objective is to design and plan a minimum-cost distribution network for refined oil products that consists of supply centers (refineries), distribution centers (bulk plants), and demand centers (cities). A multi-period mixed-integer

xii

Preface

programming model is used to develop the optimal long-range plan for the distribution system’s configuration and operations. The model is used to determine the best annual product distribution plan, as well as the best long-term network configuration plan. The network configuration plan involves annual decisions on possible establishments or expansions of new or existing network facilities.

Chapter 10: Berth Allocation for Loading Tankers at an Oil Export Terminal In this chapter, an optimization model is used for berth allocation and tanker sequencing at an oil products export terminal. Each incoming tanker ship must be assigned to either one or two berths in order to load one or more products. The objective is to minimize the total demurrage (delay) cost incurred by the terminal for keeping the tankers waiting for berths to be assigned. A mixed-integer linear programming (MILP) model is formulated and used to optimally solve this problem. The model determines the assignment of each tanker to the berths, the products to load for each tanker from each berth, and the tanker loading sequence at each berth. Dhahran, Saudi Arabia

Hesham K. Alfares

Acknowledgments

The author duly acknowledges the research support and facilities provided by King Fahd University of Petroleum and Minerals (KFUPM), especially the Systems Engineering (SE) Department. The author gratefully thanks Saudi Aramco for its permission to use photos from its archives as figures in the book. In particular, thanks are due to Mr. Fayez Al-Bishi, Head of Domestic Media Relations in Saudi Aramco, for the kind cooperation. Moreover, the author sincerely appreciates and acknowledges the partial contribution in Chap. 9 by the following colleagues from the Systems Engineering Department at KFUPM: Dr. Hany Osman, Prof. Shokri Selim, and Prof. Salih Duffuaa. Finally, the author appreciates the assistance in data collection for individual chapters provided by the following former KFUPM students: Mr. Wail Abu Al-Khair, Mr. Salman Al-Dawood, Mr. Khalid Al-Khodhairi, Mr. Ahmad Al-Saati, Mr. Mushaileh Al-Shammari, Mr. Abdullatif Ba-Isa, and Mr. Mohamed Osman.

xiii

Contents

1

Introduction to Petroleum and Petrochemical Industries . . . . . . . . . . 1.1 Historical Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 History of the Petroleum Industry . . . . . . . . . . . . . . . . . . . 1.1.2 History of the Petrochemical Industry . . . . . . . . . . . . . . . . 1.2 Main Processes of the Petroleum Industry . . . . . . . . . . . . . . . . . . . . 1.2.1 Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2 Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.3 Upstream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.4 Midstream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.5 Refining (Downstream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Main Processes of the Petrochemical Industry . . . . . . . . . . . . . . . . 1.3.1 Feedstock Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2 Upstream Petrochemical Industry . . . . . . . . . . . . . . . . . . . 1.3.3 Intermediate Petrochemical Industry . . . . . . . . . . . . . . . . . 1.3.4 Downstream Petrochemical Industry . . . . . . . . . . . . . . . . . 1.4 Main Oil Products and Their Uses . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 Crude Oil Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 Types of Natural Gas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 Types of Refined Oil Products . . . . . . . . . . . . . . . . . . . . . . 1.5 Types of Petrochemical Products . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5.1 Olefin Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5.2 Aromatics Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5.3 SynGas Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Integrated Petroleum and Petrochemical Industrial System . . . . . 1.7 Literature on Optimization in the Petroleum Industry . . . . . . . . . . 1.7.1 Optimization in the Petroleum Industry at Large . . . . . . . 1.7.2 Optimization in the Exploration and Production Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7.3 Optimization in the Refining Stage . . . . . . . . . . . . . . . . . . 1.7.4 Optimization in the Transportation Stage . . . . . . . . . . . . . 1.7.5 Future Trends in the Petroleum Industry . . . . . . . . . . . . . .

1 1 1 2 5 5 5 6 6 7 7 8 8 8 9 9 9 11 11 12 13 13 14 15 16 16 17 18 19 19 xv

xvi

Contents

1.8 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21 21

2

Introduction to Optimization Models and Techniques . . . . . . . . . . . . . 2.1 Introduction to Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Unconstrained Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Linear Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 LP Graphical Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 The Simplex Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Other Mathematical Programming Techniques . . . . . . . . . . . . . . . . 2.4.1 Integer Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.2 Goal Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.3 Network Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.4 Dynamic Programming (DP) . . . . . . . . . . . . . . . . . . . . . . . 2.4.5 Stochastic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.6 Nonlinear Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Meta-heuristic Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 Genetic Algorithms (GA) . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.2 Simulated Annealing (SA) . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.3 Tabu Search (TS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.4 Particle Swarm Optimization (PSO) . . . . . . . . . . . . . . . . . 2.6 Simulation-Based Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25 25 27 29 30 31 36 36 38 40 42 44 45 47 49 49 49 50 50 52 52

3

Optimum Locations of Multiple Drilling Platforms . . . . . . . . . . . . . . . 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Relevant Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 The Offshore Drilling Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Model Costs and Parameters . . . . . . . . . . . . . . . . . . . . . . . 3.4 Case 1: Fixed Rig Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 Case 1a. Equal Number of Wells Per Platform . . . . . . . . 3.4.2 Case 1b. Unrestricted Number of Wells Per Platform . . . 3.5 Case 2: Optimum Platform Locations . . . . . . . . . . . . . . . . . . . . . . . 3.5.1 Case 2 Optimum Solution Model . . . . . . . . . . . . . . . . . . . . 3.5.2 Case 2a. Solution with Equal Number of Wells Per Rig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.3 Case 2b. Solution with Unrestricted Number of Wells Per Rig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6 Case 2 Heuristic Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.1 Case 2 Heuristic Solution: Stage 1 . . . . . . . . . . . . . . . . . . . 3.6.2 Case 2 Heuristic Solution: Stage 2 . . . . . . . . . . . . . . . . . . . 3.6.3 Case 2a. Heuristic Solution with Equal Number of Wells Per Rig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55 55 57 59 59 61 63 65 65 67 68 73 73 74 75 76 77

Contents

xvii

3.6.4

Case 2b. Heuristic Solution with Unrestricted Number of Wells Per Rig . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.5 Evaluation of the Heuristic Solution . . . . . . . . . . . . . . . . . 3.7 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77 78 79 81

4

Simulation-Based Optimization of Refinery Valve Inspection Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.2 Review of Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 4.2.1 Analytical Inspection Interval Models . . . . . . . . . . . . . . . 85 4.2.2 Simulation Inspection Interval Models . . . . . . . . . . . . . . . 86 4.2.3 Reasons for Using a Simulation Approach . . . . . . . . . . . . 87 4.3 Data Collection and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.3.1 Data Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.3.2 Factors Affecting Valve Failure Rates . . . . . . . . . . . . . . . . 90 4.3.3 Determining Probability Distributions . . . . . . . . . . . . . . . 91 4.4 Modeling and Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 4.5 Output Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.6 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

5

Operations and Workforce Scheduling for Refinery Turnaround Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Relevant Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Model Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.1 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.2 Input Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.3 Decision Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.4 The Integer Linear Programming Model . . . . . . . . . . . . . 5.3.5 Values of G and T and Bounds on N and Z . . . . . . . . . . . 5.3.6 Size of the Optimum ILP Model . . . . . . . . . . . . . . . . . . . . 5.4 Heuristic Solution Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.1 Heuristic Stage 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.2 Heuristic Stage 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.3 Size of the Heuristic ILP Model . . . . . . . . . . . . . . . . . . . . . 5.5 Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.1 Optimum Solution of the Case Study . . . . . . . . . . . . . . . . 5.5.2 Heuristic Solution of the Case Study . . . . . . . . . . . . . . . . . 5.6 Evaluation of the Heuristic Method . . . . . . . . . . . . . . . . . . . . . . . . . 5.7 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105 105 108 110 111 111 111 112 113 114 116 116 118 118 119 121 122 123 129 131

xviii

Contents

6

Simulation-Based Scheduling of Pipeline Maintenance Crews . . . . . 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 Data Collection and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5 The Simulation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.1 Model Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.2 Model Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.3 Model Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.4 Duration of the Simulation Runs . . . . . . . . . . . . . . . . . . . . 6.5.5 Model Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.6 Model Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.7 Number of Replications . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.6 Optimizing Days-Off Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.6.1 Performance of Current Schedules . . . . . . . . . . . . . . . . . . 6.6.2 Optimum Machinist Schedules . . . . . . . . . . . . . . . . . . . . . 6.6.3 Optimum Schedules of the Other Specializations . . . . . . 6.7 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

133 133 136 138 141 142 143 144 144 146 147 147 147 148 148 148 150 151 151

7

Optimum Gasoline Blending in Petroleum Refining . . . . . . . . . . . . . . 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 The Gasoline Blending Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.1 Refining and Blending Processes . . . . . . . . . . . . . . . . . . . . 7.3.2 Blending Process Inputs and Outputs . . . . . . . . . . . . . . . . 7.3.3 Gasoline Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Calculating Blend Properties from Component Properties . . . . . . 7.4.1 Calculating the E70 of the Blend . . . . . . . . . . . . . . . . . . . . 7.4.2 Calculating the RVP of the Blend . . . . . . . . . . . . . . . . . . . 7.4.3 Calculating the VLI of the Blend . . . . . . . . . . . . . . . . . . . . 7.4.4 Calculating the RON of the Blend . . . . . . . . . . . . . . . . . . . 7.5 Gasoline Blending Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6 Nonlinear Programming Optimization Model . . . . . . . . . . . . . . . . . 7.6.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6.2 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6.3 Production Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6.4 Specification Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7 Solution Process and Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7.1 Stage 1: LP Solution of Linearized Approximation . . . . 7.7.2 Stage 2: NLP Solution Using LP Solution as the Initial Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7.3 Case Study Solution Results . . . . . . . . . . . . . . . . . . . . . . . . 7.8 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

153 153 154 156 156 157 158 160 160 161 161 162 163 166 166 168 168 169 171 171 173 174 176 176

Contents

xix

8

Employee Scheduling in Remote Oil Industry Work Sites . . . . . . . . . 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3 Problem Definition and Formulation . . . . . . . . . . . . . . . . . . . . . . . . 8.3.1 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.2 Model Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.3 Model Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.4 Model Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4 Determining the Workforce Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.1 Minimum W for the Simplified Model . . . . . . . . . . . . . . . 8.4.2 Minimum W for the Full Model . . . . . . . . . . . . . . . . . . . . . 8.5 Determining the Days-Off Assignments . . . . . . . . . . . . . . . . . . . . . 8.5.1 Four Active Days-Off Patterns . . . . . . . . . . . . . . . . . . . . . . 8.5.2 Seven Active Days-Off Patterns . . . . . . . . . . . . . . . . . . . . . 8.5.3 Eight Active Days-Off Patterns . . . . . . . . . . . . . . . . . . . . . 8.5.4 Ten Active Days-Off Patterns . . . . . . . . . . . . . . . . . . . . . . . 8.5.5 Eleven Active Days-Off Patterns . . . . . . . . . . . . . . . . . . . . 8.5.6 The Days-Off Scheduling Procedure . . . . . . . . . . . . . . . . . 8.6 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

179 179 182 184 184 186 186 188 190 190 192 193 194 197 199 201 204 206 207 208

9

Optimum Planning of a Distribution Supply Chain for Refined Oil Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4 Model Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.1 Model Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.2 Model Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.3 Given Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.4 Decision Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.5 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.6 Supply, Demand, and Material Balance Constraints . . . . 9.4.7 DC Capacity Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.8 SC to DC Transportation Link Constraints . . . . . . . . . . . . 9.4.9 DC to DM Transportation Link Constraints . . . . . . . . . . . 9.4.10 DC to DC Transportation Link Constraints . . . . . . . . . . . 9.5 Given Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.6 Model Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.7 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

209 209 211 214 216 216 217 217 219 220 221 222 222 223 224 226 230 232 234

xx

Contents

10 Berth Allocation for Loading Tankers at an Oil Export Terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Review of Relevant Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4 Berth Allocation Optimization Model . . . . . . . . . . . . . . . . . . . . . . . 10.4.1 Model Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.2 Model Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.3 Given Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.4 Decision Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.5 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.6 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.7 Calculating the Value of S . . . . . . . . . . . . . . . . . . . . . . . . . . 10.5 Berth Allocation Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.6 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

237 237 241 244 246 246 247 247 248 248 248 253 253 257 258

Appendix A: Bibliography: Optimization in the Petroleum Industry . . . . 261 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

About the Author

Hesham K. Alfares has been a member of the Shura Council (Consultative Parliament) of Saudi Arabia since October 2020. Until January 2021, he was the chairman in the Systems Engineering (SE) Department at King Fahd University of Petroleum & Minerals (KFUPM), Dhahran, Saudi Arabia. Dr. Alfares joined the SE Department at KFUPM as a lecturer in 1984, became a full professor in 2004, and the chairman in 2015. Dr. Alfares obtained a B.S. in Electrical and Computer Engineering from the University of California, Santa Barbara, in 1982. He obtained an M.S. in Industrial Engineering from the University of Pittsburgh in 1984. He obtained a Ph.D. in Industrial Engineering from Arizona State University in 1991. Dr. Alfares spent a full-year sabbatical leave in 1999–2000, in addition to five summer terms, working in Saudi Aramco, the national oil company of Saudi Arabia. He spent the summer 2010 term as a visiting Fulbright scholar at the University of North Carolina, Charlotte. He spent the spring 2012 term as a visiting scholar at Massachusetts Institute of Technology. He spent four summer terms as a visiting British Council scholar at four UK universities: Warwick in 1993, Nottingham in 1998, Loughborough in 2003, and East Anglia in 2013. Dr. Alfares research interests are in the areas of production and inventory control, scheduling, maintenance, simulation, and applied optimization, with a focus on modeling and optimization of petrochemical systems. At the time of printing this book, he has more than 130 publications, including 61 journal papers and 4 book chapters, in addition to 3 US patents and more than 3300 Google Scholar citations. Dr. Alfares has been a member of the editorial boards of the Arabian Journal for Science and Engineering, the Journal of Industrial Engineering, and the International Journal of Applied Industrial Engineering. He served in the guest editorial board of a special issue of the European Journal of Operational Research. He has been a member of the scientific and organizing committees of 35 scientific conferences. Dr. Alfares won grants for 12 funded research projects and 6 industrial consulting projects. He won an out-of-state graduate student tuition-waiver scholarship from Arizona State University for the 1986–1987 academic year. He won KFUPM Excellence in Research Award three times, in the years 2003, 2008, and 2020. He won xxi

xxii

About the Author

Almarai Prize for Scientific Innovation in Industrial Engineering in 2014. He has been a fellow of the Industrial Engineering and Operations Management Society International since 2020.

Chapter 1

Introduction to Petroleum and Petrochemical Industries

1.1 Historical Background The petroleum and petrochemical industries are international multi-billion-dollar businesses, which are among the biggest and most important industries in the world today (IBIS World, 2020). Natural oil has been the main source of the world’s energy for the last 70 years (Deutsche Bank, 2013). Therefore, the enormous importance of the petroleum and petrochemical industries is due to their economic scale and geopolitical influence. It is also due to their numerous products and derivatives that interact with all industries and all economic sectors and touch our daily lives in so many ways. The two industries are interdependent and closely related. The petroleum industry is the starting point of the value chain, and it has a longer history than the petrochemical industry.

1.1.1 History of the Petroleum Industry Crude oil has been known and used by people for thousands of years. Natural oil flowed out of the Earth in several places around the world, forming fountains and tar pools (Devold, 2013). Prehistoric people used natural oil as a source of fire for cooking, lighting, and heating purposes. Prophet Noah is reported to have used oil to waterproof the insides and outsides of his Ark in preparation for the Flood. Around 4000 B.C. the ancient civilizations of Mesopotamia (modern-day Iraq) found several uses for oil. They used oil varieties, especially asphalt, as a medical treatment and also as an adhesive in making tools and constructing buildings (Nawwab et al., 1995). The ancient Egyptians used oil in preserving mummies, while the early Chinse and Indians used it for medical purposes (Deutsche Bank, 2013). Later, the Greeks used oil for military purposes, especially to burn enemy ships in naval battles. Besides the simple use of oil that made its way out of the Earth, there were several historical efforts at the drilling and distillation of crude oil. According to Ali (2019), © The Author(s), under exclusive license to Springer Nature Switzerland AG 2023 H. K. Alfares, Applied Optimization in the Petroleum Industry, https://doi.org/10.1007/978-3-031-24166-6_1

1

2

1 Introduction to Petroleum and Petrochemical Industries

the first oil wells were drilled in China around 347 A.D. Also, around 2500 years ago, the Chinese drilled for natural gas, which they burned and used to dry rock salt (Clark & Tahlawi, 2006). In the ninth century, the Muslim scientist Abu Bakr Al-Razi developed a process for oil distillation. Arab scholars at that time proposed theories on the origin of Naft, the Arabic word for crude oil, from which the word Naphtha is derived (Nawwab et al., 1995). The industrial revolution in the nineteenth century led to a huge increase in the demand for oil for fueling, lighting, and lubrication. Simple drilling for oil started in Azerbaijan in 1846, and by 1884 there were almost 200 small refineries around Baku. In the 1850s, basic oil distillation facilities were constructed in Europe and North America, sowing the seed for the modern-day oil refineries (Nawwab et al., 1995). In 1848, Scottish chemist James Young invented a process to distill kerosene from oil. In 1850, Young teamed up with geologist Edward Binney to establish the first commercial oil refinery in the world, manufacturing oil and paraffin wax from locally mined coal (Ali, 2019). Subsequently, Samuel Kier built the first oil refinery in the USA in Pittsburgh in 1853. In 1859, Edwin Drake drilled the first modern American oil well in Pennsylvania, which produced 15 barrels a day (Deutsche Bank, 2013). This was followed by a big rush for the “black gold” that led to the digging of many commercial oil wells in Pennsylvania, starting the petroleum industry that we know today. The first pipeline was built in Pennsylvania in 1965, transporting 2000 barrels of oil per day for a distance of five miles. In 1865 John Rockefeller established Standard Oil, the world’s first major oil company, which dominated oil production and refining in the US for decades. The invention of the gasoline-powered automobile in Germany in 1886 started a new era for the petroleum industry and signaled the start of the automobile industry (Nawwab et al., 1995). The soaring demand for both the car industry and the oil industry transformed petroleum refineries from simple manual distilleries to highly sophisticated facilities based on scientific and engineering principles. Figure 1.1 shows a typical section of a large modern oil refinery. The first oil tanker was built in Sweden and used in Azerbaijan in 1878, which made it possible to transport crude oil overseas. Figure 1.2 shows two modern large oil tankers. The discovery of thermal cracking in 1913 doubled the amount of gasoline produced from each barrel of oil and launched a new era for the petroleum industry (Clark & Tahlawi, 2006). In 1937, the first offshore oil well was drilled by Pure Oil Company one mile away from the shore in Louisiana. The two world wars tremendously increased the demand for petroleum and gas products and led to huge advancements in oil exploration, drilling, storage, refining, shipping, and distribution.

1.1.2 History of the Petrochemical Industry The petrochemical industry applies chemical processes on petroleum and natural gas to derive a variety of industrial products called petrochemicals. It is a relatively young

1.1 Historical Background

3

Fig. 1.1 A modern oil refinery. Courtesy of Saudi Aramco, copyright owner

Fig. 1.2 Two large oil tankers. Courtesy of Saudi Aramco, copyright owner

industry, although some basic petrochemicals have been known since antiquity. The ancient Egyptians produced ethylene and polyethylene from gas and plants. They also used bitumen (tar, or natural asphalt) as a construction material for building the pyramids (Syntor Fine Chemicals, 2019). In the eighth century, Muslim alchemist Jabir

4

1 Introduction to Petroleum and Petrochemical Industries

Ibn Hayyan used a chemical process to derive sal ammoniac (ammonium chloride) from organic materials (Wikipedia, 2020). The industrial revolution in the nineteenth century created a large demand for synthetic materials and led to the invention of many new petrochemicals. For example, polyvinyl chloride was discovered in 1835, polystyrene in 1839, and the first synthetic dye in 1856. Production of petrochemicals from natural gas started in 1872 with the production of carbon black which was used to make synthetic rubber (Syntor Fine Chemicals, 2019). The modern-day petrochemical industry was born in the USA in 1920, when Standard Oil opened the first petrochemical plant in New Jersey to produce isopropyl alcohol from propylene. Also in 1920, Union Carbide opened another petrochemical plant in West Virginia, using thermal cracking of natural gas to produce olefins. Another Union Carbide plant in West Virginia started to produce ethyl glycol in 1924 (Aftalion, 2001). This was followed by several important developments. For example, polyethylene was invented in 1935, nylon in 1937, polyester in 1946, and polypropylene in the early 1950s. Figure 1.3 shows a large, modern petrochemical plant in Saudi Arabia. The petrochemical industry developed quickly during World War II and became a major industrial and economic sector. As natural raw materials became scarce, synthetic materials were used as a substitute. Therefore, the war caused a big surge in demand for synthetic materials for both military and civilian applications. Subsequently, the industry was transformed from trial-and-error approaches to scientifically based efficient practices. New catalysts were discovered, and several types of catalytic cracking and catalytic reforming were invented, allowing new and improved petrochemical processes. Consequently, a large variety of petrochemical products

Fig. 1.3 A modern petrochemical plant. Courtesy of Saudi Aramco, copyright owner

1.2 Main Processes of the Petroleum Industry

5

started to appear to serve the needs of the manufacturing and service sectors, such as synthetic rubber, plastic, and chemical solvents. Later, additional products were developed for individual consumers, such as textiles, kitchen appliances, sports shoes, and personal hygiene items (Devold, 2013).

1.2 Main Processes of the Petroleum Industry The main function of the petroleum industry is to produce crude oil, natural gas, and refined oil products. This requires several activities before, during, and after production. According to Devold (2013), the petroleum and gas industry processes are broadly classified into the following categories: 1. 2. 3. 4. 5.

Exploration. Production. Upstream. Midstream. Refining (downstream).

1.2.1 Exploration The objective of exploration is to find, evaluate, and prepare sites where oil and gas is located. Exploration is done both on land and offshore, and it includes seismic tests, exploratory drilling, and field development. As shown in Fig. 1.4, seismic tests use the reflection of sound waves by different underground layers to create an image of those subsurface layers (Deutsche Bank, 2013). If an image points to the existence of oil beneath the surface, then this particular area is considered a “prospect.” Drilling oil wells is very costly, especially offshore. Therefore, exploratory drilling is done only in high-probability prospect areas. If oil is found, then additional information is collected on the well’s capacity and quality in order to make the right decisions on the field’s development (Devold, 2013).

1.2.2 Production Oil and gas production is done onshore on offshore, at different depths, reservoir capacities, and geological structures. However, it typically involves several common features and facilities (Devold, 2013). Outputs from the production wellheads feed into the gathering system, and then into the gas-oil separation plant (GOSP). Typically, the wellheads’ output contains a mix of crude oil, natural gas, and other undesirable components such as water, carbon dioxide, sulfur, and sand. The function of

6

1 Introduction to Petroleum and Petrochemical Industries

Fig. 1.4 A seismic testing truck used for oil exploration. Courtesy of Saudi Aramco, copyright owner

the GOSP is to separate and clean the useful desirable components, namely oil and natural gas.

1.2.3 Upstream Upstream activities include well completion, gathering, separation, storage and exporting, and utilities (Devold, 2013). Well completion activities include casing to strengthen the well hole and installing the wellhead to control the flow of oil or gas. Gathering is done by a network of manifolds and pipelines to feed oil and gas into the production facilities. Separation is done when the well produces a mix of oil and gas, where gravity is usually used to allow gas to bubble up on top and oil to settle at the bottom. Crude oil is usually stored in large tank farms, and exported via tankers and pipelines, while metering systems are used to transfer ownership. Utilities are support systems for upstream facilities and personnel, and they include electricity, water, firefighting, and HVAC.

1.2.4 Midstream Midstream activities include gathering, transportation, and storage of crude oil and natural gas. The gathering stage involves the use of short, local pipeline networks to connect oil and gas producing wells to the long, main pipeline grid or to the processing facilities. The transportation process involves transporting oil and gas

1.3 Main Processes of the Petrochemical Industry

7

from wells to processing facilities, and from there to end users. This can be done by several means, such as pipelines, tankers, trucks, and railways. Midstream storage involves providing oil and gas storage facilities at terminals at various stages of the distribution system, for example near refineries, LNG plants, and export terminals. Crude oil is kept in storage tanks, while natural gas is usually stored in underground facilities. Midstream facilities include gas plants, liquefied natural gas (LNG) plants, and pipeline transportation systems. Gas plants separate natural gas (mostly methane) from crude oil and other gas components, such ethane, propane, and butane. Separated natural gas is then compressed in order to be transported though gas pipelines and then finally loaded on export tankers. When pipelines are not available or economical for long-distance transportation, cooling systems transform natural gas to the liquid state as LNG, to be transported by specialized insulated LNG tankers.

1.2.5 Refining (Downstream) Refineries basically heat crude oil to the evaporation point, and then use distillation columns to condense the vapors and separate them into different refined products demanded in the market, such as gasoline, kerosene, and diesel fuel. The quantity and the quality of refined products depend on the mix of feedstock crude types and quantities. The refinery’s products and their costs also depend on the refining processes used, which include cracking, reforming, and blending. Many refineries also include tank farms and distribution terminals for storing refined products and transporting them to customers. In addition to refining, downstream processes include the marketing and distribution of refined oil and gas products. The refining stage of the petroleum industry has pioneered the large-scale industrial use of optimization models and software. Refinery optimization models have been applied in all phases of the refinery processes and the associated supply chain in order to maximize profits. For example, these models are used in determining and procuring the best mix of input crude oils, in operations planning and scheduling, in gasoline blending, and in determining and distributing the best mix of refined products. For short-term process planning, optimization models are used to determine refinery unit throughputs, distillation cut points, and rates of the conversion units.

1.3 Main Processes of the Petrochemical Industry Petrochemicals are non-fuel chemical products whose main raw materials (feedstock) are obtained from crude oil and natural gas. All petrochemicals are hydrocarbons, i.e., organic compounds whose molecules are composed of hydrogen and carbon atoms. The four classes of hydrocarbons, namely paraffins, olefins, naphthenes, and aromatics, differ in the ratio of hydrogen atoms to carbon atoms and also in their

8

1 Introduction to Petroleum and Petrochemical Industries

molecular bonding structure. According to Leingchan (2017), the petrochemical industry processes can be divided into the following main stages: 1. 2. 3. 4.

Feedstock preparation. Upstream petrochemical industry. Intermediate petrochemical industry. Downstream petrochemical industry.

1.3.1 Feedstock Preparation This is an in-between stage, which can be considered either as the last stage for the petroleum industry or the first stage for the petrochemical industry. The feedstocks, i.e., raw material inputs for the petrochemical industry, are the outputs produced by the petroleum industry. The main raw materials are natural gas, naphtha, and condensates. Natural gas is obtained directly from gas wells and also from crude oil after separating it in GOSP facilities. Natural gas is mostly composed of methane, but it can also include other hydrocarbon gases such as ethane, propane, and butane. Naphtha is obtained from crude oil in refineries, while condensates are obtained from natural gas in separation plants.

1.3.2 Upstream Petrochemical Industry The upstream petrochemical sector uses the raw feedstocks (natural gas, naphtha, and condensates) to make primary (base) petrochemical products. These products are used as raw materials for producing the intermediate and downstream products. Base products are produced in high quantities and in big plants. Base petrochemical products are usually divided based on their molecular structure into three categories: 1. Olefins. Their molecules have a chain of carbon atoms, and they include ethylene, propylene, and butadiene. 2. Aromatics. Their molecules have a ring of carbon atoms, and they include benzene, toluene, and xylene (Deutsche Bank, 2013). 3. Synthesis gas (SynGas). It is a mixture of carbon monoxide and hydrogen, and it is used to make ammonia and methanol (Devold, 2013).

1.3.3 Intermediate Petrochemical Industry The intermediate sector of the petrochemical industry uses upstream products, i.e., base products Olefins, Aromatics, and SynGas, as raw materials for producing intermediate petrochemical products. These intermediates are either further processed to make downstream products or converted into goods that can be directly used

1.4 Main Oil Products and Their Uses

9

by customers. Intermediate products can be classified according to their upstream feedstock categories into Olefin intermediaries, Aromatics intermediaries, and SynGas intermediaries. For example, Olefin intermediates include ethylene dichloride (EDC) and oxo alcohol, Aromatic intermediates include ethyl benzene (EB) and styrene monomer (SM), while SynGas intermediates include methyl alcohol and formaldehyde.

1.3.4 Downstream Petrochemical Industry The downstream sector of the petrochemical industry uses the outputs of the upstream and intermediate sectors as raw materials to make end products for sale to consumers and other industries. Nowadays, more than 200 main downstream petrochemical products are manufactured by companies across the globe (Devold, 2013). Each product can be made by several alternative processes that are mostly based on polymerization, which is the process of binding hydrocarbon molecules together to form larger molecules. Downstream end products of the petrochemical industry are classified into the four following groups (Leingchan, 2017): 1. Plastic resins. Plastics have numerous uses for industries and consumers. The most important plastic products are polyethylene, polypropylene, polyvinyl chloride (PVC), ABS, PET, and polystyrene. 2. Synthetic fibers. Uses of these items include textiles and packaging. The most important synthetic fibers are polyester and nylon fiber. 3. Synthetic rubbers. These items are used in making car tires and parts and many consumer goods. They include styrene–butadiene rubber (SBR) and polybutadiene. 4. Synthetic coating and adhesive materials. These items are used in construction and in many industrial and consumer products. They include polycarbonate and polyvinyl acetate.

1.4 Main Oil Products and Their Uses The main products of the petroleum industry are crude oil and natural gas, in addition to refined oil products. These products come in several types and varieties, as described below.

1.4.1 Crude Oil Types Natural crude oil comes in several varieties with different physical and chemical characteristics, and hence different economic values. Unrefined crude oil can be

10

1 Introduction to Petroleum and Petrochemical Industries

very thin with a light color or very thick with a black color. Lower-density crude oil is more valuable because it has a higher gasoline content and a lower sulfur content. Crude oil is classified into several types according to several factors, the most important of which are viscosity or density, volatility, and toxicity. Based on these factors, crude oil is classified into the following types: 1. Light crude. Light crude oil has lower viscosity and thus a higher ability to flow. Therefore, it is easier and cheaper to produce, transport, and refine. The majority of refined products in the global market are produced from light crude. 2. Heavy crude. This type of crude is characterized by high viscosity and low ability to flow. This is due to the higher concentrations of sulfur and heavy metals. Heavy crudes usually need to be diluted to be transported through pipelines, and they are generally more difficult and expensive to produce, transport, and refine. 3. Sweet crude. This type of crude contains a low percentage of sulfur, and therefore it is less corrosive and toxic. Lower corrosion means longer lives and lower maintenance costs for the production and transportation facilities. Sweet crude also contains a higher proportion of the more desirable refined products such as gasoline. 4. Sour crude. Sour crude has a sulfur content higher than 0.5%, which is undesirable for both processing cost and end-product quality. Sulfur must be removed before refining, and toxic hydrogen sulfide must be removed before tanker transportation. Therefore, sour crude is less valuable and less desirable than sweet crude. Another classification of crude oils according to market benchmarks and geographical locations is used for oil trading purposes. Currently, more than 280 distinct types of crude oil are traded on the international market. Well-known crude oil varieties include Arab Light from Saudi Arabia, West Texas from the USA, Brent from the North Sea, OPEC Basket from several OPEC countries, Bonny Light from Nigeria, and Urals from Russia. To make it easier to keep track of the different crude varieties, several market benchmarks have been established as pricing references for both buyers and sellers. The three main benchmarks are West Texas Intermediate, Brent Blend, and OPEC Basket, whose characteristics are described below (OPEC, 2020): 1. West Texas International (WTI) crude. This crude is produced and refined in the USA, and therefore it is sometimes referred to as US crude. It is both light and sweet, and hence considered the best quality benchmark crude. Therefore, WTI Crude has a higher price than both Brent crude and OPEC Basket crude. It is primarily used for making gasoline, because it produces more and better gasoline per barrel than other benchmark crudes. 2. Brent crude. This is a blend of crudes produced from 15 fields in the North Sea, and it is refined mostly in Northwest Europe. However, Brent blend serves as the main benchmark for crude oils produced in Europe and Africa. Brent is a light and sweet crude, but to a lesser degree than the West Texas crude. It is used for making gasoline and middle distillates, such as jet fuel, kerosene, and diesel.

1.4 Main Oil Products and Their Uses

11

3. OPEC Basket crude. OPEC is the Organization of Petroleum-Exporting Countries, which was established in 1960 to coordinate the policies of member states on the production levels and sale prices of crude oil. OPEC Basket benchmark is a mix of various crudes produced by OPEC member states. Currently, the Basket contains 13 crudes produced in the Middle East, Africa, and South America. OPEC Basket crude is less light and sweet than West Texas crude and Brent crude, and therefore it is slightly cheaper.

1.4.2 Types of Natural Gas Natural gas is primarily composed of methane. It is classified into two main categories: associated (wet) gas and non-associated (dry) gas. Non-associated gas is produced from pure gas fields and also from coal beds. Associated gas is extracted from oil fields, where it is separated from crude oil in GOSP plants. In addition to methane, associated gas usually contains natural gas liquids, including ethane, butane, propane, and pentane. Due to the economic value of these gas liquid contents, associated gas is commercially more valuable than non-associated gas. However, these liquids and non-hydrocarbon contents must be removed before natural gas is transported, sold to customers, or used as a feedstock. The increasing demand and improving technology are allowing the gas industry to produce more gas from unconventional sources, adding newer gas types such as sour gas, tight gas, biogas, and shale gas.

1.4.3 Types of Refined Oil Products In oil refineries, distillation columns are used to separate crude oil into several refined products. Lighter-weight products rise up to the higher levels of the columns, while heavier ones descend to the lower levels. The refined oil products, ordered from lightest to heaviest, are listed below (Devold, 2013). For these products, the given percentage yields are typical Western Europe values provided by Deutsche Bank (2013): 1. Petroleum gas. On average, this product is 3% of the crude oil weight. It is a gas product made up of methane, ethane, propane, and butane, which can be converted to liquefied petroleum gas (LPG). It is either directly used for heating and cooking, or as a major feedstock for the petrochemical industry. 2. Naphtha. This product is on average 6% of the crude oil weight. It is a light clear liquid which is easily vaporized. It can be used either directly as a solvent and diluent or further processed to make gasoline. However, it is most commonly used as a petrochemical feedstock, especially for making olefins. 3. Gasoline. On average, gasoline constitutes 21% of the crude oil weight. It is a volatile liquid fuel that evaporates quickly at room temperature. Gasoline is

12

4.

5.

6.

7.

8.

1 Introduction to Petroleum and Petrochemical Industries

mainly used as a fuel for internal combustion engines that run most passenger cars. Gasoline is rated by its octane number, which indicates its ability to burn evenly without “knocking” under high pressures and temperatures. To run modern car engines, aromatics and other additives are added to gasoline to improve its octane rating and volatility. Kerosene. This product is on average 6% of the crude oil weight. It is a liquid fuel mainly used in aviation for jet engines. Kerosene is also used for lighting and heating purposes, and also as a raw material for making other products. Diesel oil. This product is on average 36% of the crude oil weight. It is a liquid product, which is also called gasoil, diesel fuel, and petro-diesel. It is mainly used for diesel engines in cars, trucks, ships, trains, and large machinery. It is also used for home heating, and as a raw material for making other products. Fuel oil. Fuel oil is on average 19% of the crude oil weight. It is a liquid product, which is also called heavy gas, and it has six different grades. Lighter grades (1–3) are used in industrial heating and power generation. Heavier grades (4–6), called bunker oil, are highly polluting, and therefore they are used as fuel for ships in international waters. Lubricating oil. Lubricating oil combined with residuals constitute on average 9% of the crude oil weight. Lubricating oil, also called mineral base lubricating oil, is a liquid that has different degrees of thickness, which does not evaporate at room temperature. It is used to make motor oil, gear oils, grease, Vaseline, and other lubricants. Additives are used to modify lubricant properties, such as viscosity, color, and smell. Residuals. These are heavy solid products that include coke, asphalt, tar, bitumen, and waxes. These are generally low value as end items, but they can be used as raw materials for making other products. After processing, coke can be used to make electric anodes in the metal industry. Asphalt and bitumen are used for sealing roofs and paving roads.

1.5 Types of Petrochemical Products By further processing the petroleum products, the petrochemical industry can be considered as a continuation of the petroleum industry. As stated in Sect. 1.3, the primary raw materials for the petrochemical industry are natural gas, naphtha, and condensates. These raw materials are used to successively manufacture three levels of petrochemical products, namely upstream (basic), midstream (intermediary), and downstream (end) products. The product varieties within these three product levels are described below, classified according to the three categories of upstream basic petrochemical products: olefins, aromatics, and synthesis gas.

1.5 Types of Petrochemical Products

13

1.5.1 Olefin Products Olefins are mainly used to produce plastics and industrial solvents and as raw materials for making midstream and downstream products. Key olefin products are ethylene, propylene, and butadiene, whose derivatives are described below: 1. Ethylene (C2 ) products. Ethylene is the most significant basic petrochemical, as it is used as a raw material for approximately 60% of other petrochemicals (Deutsche Bank, 2013). The most important ethylene derivatives are: . Ethanol (ethyl alcohol, EtOH). . Ethanolamines: monoethanolamine (MEA), diethanolamine (DEA), and triethanolamine (TEA). . Polyethylene (PE). . Polyvinyl chloride (PVC). 2. Propylene (C3 ) products. Propylene is generally not usable as an end consumer product. It is primarily used as a petrochemical feedstock for making fibers, textiles, plastics, paints, and other products. The main derivatives of propylene are: . . . . . .

Polypropylene (PP). Polyurethanes. Acrylonitrile–butadiene–styrene (ABS). Polyacrylonitrile (PAN). Cumene. Methyl methacrylate (MMA).

3. Butadiene (C4 ) products. Butadiene is primarily used as a raw material for manufacturing various forms of rubber, latex, and plastics. The main derivatives of butadiene are: . . . . . . .

Pyrolysis gasoline (Pygas). Styrene–butadiene rubber (SBR). Methyl methacrylate (MMA). Polybutadiene. Polyisobutylene (PIB). Polybutylene (PB-1). Methyl-tert-butyl-ether (MTBE).

1.5.2 Aromatics Products Aromatics are hydrocarbon substances that are characterized by distinctive perfumed smells. Aromatics are extensively extracted from crude oil, but small quantities are made from coal. Aromatics are raw materials for a wide range of products in medicine,

14

1 Introduction to Petroleum and Petrochemical Industries

transport, telecommunications, fashion, and sports. The main aromatic products are benzene, toluene, and xylene, whose derivatives are described below: 1. Benzene (C6 ) products. Benzene is the most common aromatic. It is primarily used as raw material to make polystyrene used in insulation, molding, and packaging. It is also used to make nylon, resins, acrylics, furniture, and auto components. The main derivatives of benzene are: . Styrene-acrylonitrile (SAN). . Acrylonitrile–butadiene–styrene (ABS). . Styrene–butadiene rubber (SBR). 2. Toluene (C6 ) products. Toluene is a colorless aromatic liquid that is also called methylbenzene. Toluene is mostly used as an industrial feedstock and also as a solvent in paint thinners, permanent markers, contact adhesives, and some types of glue. The main derivatives of toluene are: . . . . . .

Toluene diisocyanate (TDI). Nylon. Phenol. Phenolic resins. Epoxy resin. Polycarbonates.

3. Xylene products. Xylenes are colorless liquid aromatics that are also called dimethylbenzene. Xylenes consist of three isomers: ortho-xylene, meta-xylene, and para-xylene. They are used as raw materials to make other products, and they have wide industrial and laboratory applications as solvents and cleaning agents. The main derivatives of xylene are: . . . .

Polyethylene terephthalate (PET). Glass reinforced plastics (GRP). Polyvinyl chloride (PVC). Alkyd resins.

1.5.3 SynGas Products Synthetic gas (SynGas) is mainly used as a fuel in electricity generation. It is a mixture of hydrogen, carbon monoxide, and usually some carbon dioxide. In the petrochemical industry, SynGas is used to produce methanol or ammonia and to make synthetic diesel and gasoline fuels. The main SynGas products are methanol and ammonia, whose derivatives are described below: 1. Methanol products. Methanol is a colorless liquid, which is also called methyl alcohol. It can be used directly as fuel and solvent, or as raw material for making many products. The main derivatives of methanol are:

1.6 Integrated Petroleum and Petrochemical Industrial System

. . . . . . .

15

Melamine resin. Urea–formaldehyde. Phenol formaldehyde. Polyoxymethylene (POM). Methyl-tert-butyl-ether (MTBE). Methyl methacrylate. Dimethyl terephthalate (DMT).

2. Ammonia products. Ammonia (NH3 ) is a colorless, alkaline gas which is mainly used for the production of fertilizers. It is also an important raw material for making many pharmaceuticals, explosives, and cleaning products. The main derivatives of ammonia are: . Urea. . Ammonium nitrate. . Methylamine.

1.6 Integrated Petroleum and Petrochemical Industrial System The petroleum industry and the petrochemical industry can be viewed as two stages in one larger value-chain system, which is the integrated petroleum and petrochemical industrial system. As shown in Fig. 1.5, the petroleum industry is the first (upstream) stage in this system, while the petrochemical industry is the second (downstream) stage. Essentially, several outputs from the petroleum industry (natural gas, naphtha, and condensates) are used as inputs (feedstock) for the petrochemical industry. Petrochemical plants add value to these petroleum industry’s outputs by processing them into a large variety of more valuable petrochemical products.

Fig. 1.5 The integrated petroleum and petrochemical industrial system

16

1 Introduction to Petroleum and Petrochemical Industries

In many real-life cases, the close relationship between the petroleum industry and the petrochemical industry has resulted in both a physical and an organizational integration of the two industries. Many petrochemical plants are built near crude oil refineries or even integrated within large petroleum–petrochemical industrial complexes. The addition of petrochemical products to their business activities provides oil companies with wide opportunities for additional profitability and growth. Therefore, many oil companies have either launched their own petrochemical branches or acquired other petrochemical companies. This is the case for several major international petroleum companies such as Exon Mobil, Shell, and Saudi Aramco.

1.7 Literature on Optimization in the Petroleum Industry Due to the complexity and significance of the relevant decisions, optimization is especially useful in all segments of the petroleum industry. Therefore, there is a long and active history of applying optimization models in the petroleum industry. This massive amount of literature cannot be covered in detail in any single review. However, there is a large number of literature reviews that cover several specific applications of optimization within this area. This section presents an overview of the most relevant of these literature reviews, focusing on the most recent ones. The aim is to highlight the most active, important, and recent topics of research in this area, and to identify relevant trends and future directions. Previous reviews of literature on optimization applications in the petroleum industry are broadly classified into five categories that are presented below: (1) the industry at large, (2) exploration and production stage, (3) refining stage, (4) transportation stage, and (5) future trends.

1.7.1 Optimization in the Petroleum Industry at Large Bodington and Baker (1990) review the diverse history of applying different mathematical programming optimization techniques in the petroleum industry from the 1940s to the 1990s. The use of linear programming (LP) models in operations planning is the earliest and most well-known application of optimization in the petroleum industry. The review shows, however, that a variety of other optimization techniques have been successfully applied in all aspects of the petroleum industry, ranging from strategic planning through process control. Shakhsi-Niaei et al. (2013) survey the literature on optimization applications in oil-and-gas upstream and midstream sectors. The optimization techniques are classified according to application area into three types: exploration and development, production, and transportation. The techniques are also classified according to timeframe as either strategic, tactical, or operational. DiCarlo et al. (2019) provide a

1.7 Literature on Optimization in the Petroleum Industry

17

comprehensive review of operations research (OR) applications in the petroleum industry. The focus is on linear, nonlinear, integer, and mixed-integer optimization methods. The review is used to identify and discuss the difficulties in applying OR in the petroleum industry, such as nonlinearity and uncertainty. Rahmanifard and Plaksina (2019) review the use of artificial intelligence (AI) algorithms for solving optimization problems in the oil and gas industry. Four main types of AI algorithms are considered, namely evolutionary algorithms, swarm intelligence, fuzzy logic, and artificial neural networks. All four types demonstrate superior performance in solving a variety of important petroleum industry problems, such as minimum miscibility pressures, oil production rate, well placement, and reservoir characterization.

1.7.2 Optimization in the Exploration and Production Stage Durrer and Slater (1977) present an early review of literature on the use of optimization approaches in the production of petroleum and natural gas. Their review covers the problems of drilling, reservoir simulation, production planning, and enhanced recovery. The main challenges in applying optimization models for petroleum and natural gas production are identified as nonlinearity, dimensionality, and uncertainty. Velez-Langs (2005) reviews the applications of one optimization approach, namely genetic algorithms (GA), in the oil industry’s exploration and production stages. The review is focused on GA applications in reservoir characterization, but it also includes GA models for gas storage, seismic inversion, engine oil development, oil field development, and production scheduling. Nasrabadi et al. (2012) review well placement optimization techniques, which are used to determine the optimum number, type, trajectory, and location of wells in oil and gas fields. The reviewed models are classified into several categories, including optimization algorithms, reservoir response models, uncertainty handling methods, and well placement optimization techniques in gas fields. Khor et al. (2017) survey optimization models in petroleum production systems. These models are applied in production systems design and operations, lift gas allocation, field development, facility location–allocation, and production planning and scheduling. The models are used for continuous and discrete optimization, and they include nonlinear programming, mixed-integer programming, stochastic programming, and meta-heuristic algorithms. Islam et al. (2020) review different optimization techniques used in well placement in oil and gas fields for maximizing the economic return. Classical gradientbased methods are compared with nature-inspired gradient-free optimization metaheuristics such as particle swarm optimization, genetic algorithms, evolution strategy, and differential evolution. Nature-inspired meta-heuristic techniques are shown to outperform classical techniques, and hybrid techniques integrating two or more metaheuristic algorithms perform even better than stand-alone algorithms. Kumar et al.

18

1 Introduction to Petroleum and Petrochemical Industries

(2021) survey conventional and nature-inspired (meta-heuristic) optimization algorithms for petroleum engineering, focusing on the problems of reservoir and field development, planning, and management. These algorithms are used to increase reservoir productivity and resource recovery, and ultimately to maximize the net profits.

1.7.3 Optimization in the Refining Stage Bengtsson and Nonås (2010) review refinery planning and scheduling literature under three problem categories: planning and scheduling of crude oil unloading and blending, production planning and process scheduling, and product blending and recipe optimization. Optimization models for solving these problems are based on either mixed-integer linear programming (MILP) or mixed-integer nonlinear programming (MINLP). However, nonlinear relations are approximated by linear ones in order to simplify the models and facilitate the solution of large real-world problems. Shah et al. (2011) review optimization models for scheduling, planning, and supply chain management of oil refinery operations. The reviewed topics are classified into three categories: petroleum supply chain management, refinery planning, and refinery scheduling. The two main challenges are identified as improving the models for refinery operations and developing models to integrate refinery planning with supply chain management. Opportunities for improving refinery profitability and performance include simultaneous refinery operations and product distribution scheduling, incorporating nonlinear process and real-time control parameters, and coordinated multiple-site production decision making. Based on the review, a trend of shifting from simulation-based refinery optimization models to mathematical programming-based models is observed, and it is expected to continue in the future. Khor and Varvarezos (2017) provide a multi-dimensional review and analysis of petroleum refinery optimization models. Multiple perspectives are addressed, including academia versus industry, optimization versus heuristics, short-term versus long-term, and linear versus nonlinear. Various solution approaches are covered, including mathematical programming, constraint programming, simulated annealing, and genetic algorithms. In addition, different time scales are considered, i.e., years in strategic planning, months in tactical planning, weeks in operational planning, and days and hours in scheduling. Al-Jamimi et al. (2021) review multi-objective optimization (MOO) methods for petroleum refinery catalytic processes, namely hydrotreating, desulfurization, and cracking. When several conflicting objectives are simultaneously pursued, MOO methods are used to identify the set of undominated Pareto-optimal solutions. These methods include MOO versions of genetic algorithms, particle swarm optimization, differential evolution, and simulated annealing.

1.7 Literature on Optimization in the Petroleum Industry

19

1.7.4 Optimization in the Transportation Stage Huang and Seireg (1985) survey the literature on optimization techniques for oil and gas pipeline engineering. The relevant papers are classified into optimal design, optimal expansion, optimal operation, and optimal control of pipeline systems, as well as offshore pipeline optimization. Out of the three types of gas pipeline systems, gathering, transmission, and distribution, Ríos-Mercado and Borraz-Sánchez (2015) provide a focused review of optimization models for natural gas transmission lines. Problem categories include the line-packing, pooling, and fuel cost minimization problems. Solution techniques include dynamic programming, gradient search, geometric programming, linearization, and mixed-integer nonlinear programming. An et al. (2011) review and compare the literature on biofuel and petroleum-based fuel, as well as generic supply-chain models. The papers are classified according to both the decision level (strategic, tactical, operational, and integrated) and the process stage (upstream, midstream, and downstream). The following future trends in generic supply chain management are identified: international facility location, increase in IT use, enhanced sustainability, and control of product perishability. For biofuels supply chains, the expected transition from small-scale pilot plants to large-scale commercial production will call for additional and more sophisticated optimization models to maximize the economic returns. Sahebi et al. (2014) review mathematical programming models for crude oil strategic and tactical supply chain management. The models are classified according to the following characteristics: supply chain structure, decision level, modeling approach, purpose, shared information, solution technique, uncertainty features, environmental impacts, and global issues. Arya et al. (2022) review optimization tools used by the oil and gas industry to reduce pipeline costs at all stages, from pipeline design to operations. The relevant issues in optimizing pipeline operations are identified by reviewing three key applications of optimization in the pipeline industry: (1) minimizing fuel consumption and maximizing throughput in compressors, (2) maximizing the benefit objective function, and (3) minimizing the risk of gas supply shortage and the power consumption in compressors.

1.7.5 Future Trends in the Petroleum Industry At the time of authoring this book, several trends are taking place that are expected to significantly influence the future of optimization in the petroleum industry. These trends, which are highlighted in very recent review papers, are related to information technology and supply chain sustainability. The future trends in the area of optimization in the petroleum industry are big data analytics, digital twin technology, artificial intelligence, and green petroleum supply chains.

20

1 Introduction to Petroleum and Petrochemical Industries

Mohammadpoor and Torabi (2020) identify big data analytics as a major force that will contribute to shaping the future of the oil and gas industry. Big data is the new software and hardware technology used to collect and analyze large datasets that have six main attributes: volume, variety, velocity, veracity, value, and complexity. Data recording sensors used in all stages of the industry, such as exploration, drilling, and production, produce massive amounts of useful data. Proper analysis of this data will improve optimization models used to make all the important decisions in the oil and gas industry. Wanasinghe et al. (2020) review the literature to determine the trends of applying digital twin (DT) technology in the oil and gas (O&G) industry. DT technology is part of the fourth industrial revolution, which is known as Industry 4.0, and it is used to improve performance and minimize costs. DT refers to the construction of digital twins, i.e., computer/virtual models, to accurately represent the physical industrial assets. The review identifies integrity monitoring, project planning, and life cycle management as the main DT application areas in the O&G industry. On the other hand, security, lack of standardization, and uncertainty are identified as the main challenges against the effective use of DT in the O&G industry. Koroteev and Tekic (2021) review artificial intelligence (AI) applications in the oil and gas industry to identify trends, challenges, and future scenarios. The review is focused on the upstream stage because it has the highest amount of capital expenditure and also the highest level of uncertainty and risk. AI upstream applications are increasing because they are producing significant benefits in many real-life situations in O&G exploration, field development, and production. Kuang et al. (2021) also describe the current and future applications of artificial intelligence (AI) in the petroleum industry’s upstream stage. Specific types of AI activities used in this stage include machine learning, computer vision, deep learning, optimization, and data mining. Future AI applications in petroleum exploration and development include intelligent production equipment, automatic processing, and professional software platforms. Li et al. (2021) perform a more focused review of AI applications in oil and gas field development. Within this scope, specific problems include dynamic prediction of production, optimization of the field development plan, identification of residual oil, identification of fractures, and enhanced recovery of oil. The future transition from the traditional oil field to the AI oil field is expected to extend the field’s life cycle, improve efficiency and quality, reduce cost, and maximize economic value. Abdussalam et al. (2021) discuss the increasing importance of sustainable supply chain management (SSCM) optimization models to petroleum companies. A classification of SSCM models is proposed based on all relevant factors, including the three fundamental aspects of sustainability: economic, environmental, and social. Optimization models that consider all three aspects are rare, and the social aspect in particular has received the least amount of attention in the published models. Future research directions are suggested, in order to cover this gap and other gaps in literature, and to incorporate the latest technological and economic developments in this area.

References

21

1.8 Summary and Conclusions The petroleum industry has an enormous global economic and political importance due to two reasons. First, this industry is the biggest supplier of energy to the world and the main source of income for several countries on different continents. Moreover, the petroleum industry and its natural extension, i.e., the petrochemical industry, provide the raw materials for a countless number of essential industrial and consumer products. The petroleum industry involves several stages that involve substantial financial investments, high risks, and complicated decisions. This makes the use of optimization models both necessary and highly beneficial for the petroleum industry. There is a long and active history of successfully applying optimization tools in the petroleum industry. This history illustrates the advantage of using optimization techniques in every stage of the industry, including exploration, production, refining, and transportation. There are still numerous opportunities for applying new and improved optimization models and techniques to solve new and previously considered problems in the petroleum industry. Subsequent chapters of this book present a diverse sample of real-life, large-scale, and unique applications of optimization in the petroleum industry. These applications cover various stages in the industry such as exploration, refining, and transportation; different optimization techniques such as simulation and integer programming; and different functional areas such as maintenance, scheduling, and production planning.

References Abdussalam, O., Trochu, J., Fello, N., & Chaabane, A. (2021). Recent advances and opportunities in planning green petroleum supply chains: A model-oriented review. International Journal of Sustainable Development & World Ecology, 28(6), 524–539. Aftalion, F. (2001). A History of the International Chemical Industry: From The “Early Days” to 2000, (2nd ed.) Chemical Heritage Press, Philadelphia. Ali, U. (2019). The history of the oil and gas industry from 347 AD to today. Offshore Technology, 7 March 2019. Al-Jamimi, H. A., BinMakhashen, G. M., Deb, K., & Saleh, T. A. (2021). Multiobjective optimization and analysis of petroleum refinery catalytic processes: A review. Fuel, 288, 119678. An, H., Wilhelm, W. E., & Searcy, S. W. (2011). Biofuel and petroleum-based fuel supply chain research: A literature review. Biomass and Bioenergy, 35(9), 3763–3774. Arya, A. K., Jain, R., Yadav, S., Bisht, S., & Gautam, S. (2022). Recent trends in gas pipeline optimization. Materials Today: Proceedings, 57(4), 1455–1461. Bank, D. (2013). Oil & gas for beginners. Deutsche Bank AG. Bengtsson, J., & Nonås, S. L. (2010). Refinery planning and scheduling: An overview. In: E. Bjørndal, M. Bjørndal, P. Pardalos, & M. Rönnqvist (Eds.), Energy, natural resources and environmental economics. Energy systems (pp. 115–130). Springer, Berlin, Heidelberg. Bodington, C. E., & Baker, T. E. (1990). A history of mathematical programming in the petroleum industry. Interfaces, 20(4), 117–127. Clark, A. P., Tahlawi, M. A., Facey, W., Lunde. P., McKinnon. M., & Pledge, T. A. (2006). A Land Transformed: The Arabian Peninsula, Saudi Arabia, and Saudi Aramco. Saudi Aramco Services Company, Houston.

22

1 Introduction to Petroleum and Petrochemical Industries

Devold, H. (2013). Oil and gas production handbook: An introduction to oil and gas production, transport, refining and petrochemical industry (3rd ed.). ABB Oil and Gas. DiCarlo, J., Eustes, A., & Steeger, G. (2019, September). A history of operations research optimization in the petroleum industry. In SPE annual technical conference and exhibition. Calgary, Alberta, Canada, September 30–October 2, 2019. Durrer, E. J., & Slater, G. E. (1977). Optimization of petroleum and natural gas production—A survey. Management Science, 24(1), 35–43. Huang, Z., & Seireg, A. (1985). Optimization in oil and gas pipeline engineering. Journal of Energy Resources Technology, 107, 264–267. IBIS World. (2020). Global biggest industries by revenue in 2020. https://www.ibisworld.com/glo bal/industry-trends/biggest-industries-by-revenue/. Accessed June 2020. Islam, J., Vasant, P. M., Negash, B. M., Laruccia, M. B., Myint, M., & Watada, J. (2020). A holistic review on artificial intelligence techniques for well placement optimization problem. Advances in Engineering Software, 141, 102767. Khor, C. S., & Varvarezos, D. (2017). Petroleum refinery optimization. Optimization and Engineering, 18(4), 943–989. Khor, C. S., Elkamel, A., & Shah, N. (2017). Optimization methods for petroleum fields development and production systems: A review. Optimization and Engineering, 18(4), 907–941. Koroteev, D., & Tekic, Z. (2021). Artificial intelligence in oil and gas upstream: Trends, challenges, and scenarios for the future. Energy and AI, 3, 100041. Kuang, L., He, L. I. U., Yili, R. E. N., Kai, L. U. O., Mingyu, S. H. I., Jian, S. U., & Xin, L. I. (2021). Application and development trend of artificial intelligence in petroleum exploration and development. Petroleum Exploration and Development, 48(1), 1–14. Kumar, A., Vohra, M., Pant, S., & Singh, S. K. (2021). Optimization techniques for petroleum engineering: A brief review. International Journal of Modelling and Simulation, 41(5), 326–334. Leingchan, R. (2017). Thailand industry outlook 2017–2019: Petrochemical industry, April 2017. Li, H., Yu, H., Cao, N., Tian, H., & Cheng, S. (2021). Applications of artificial intelligence in oil and gas development. Archives of Computational Methods in Engineering, 28(3), 937–949. Mohammadpoor, M., & Torabi, F. (2020). Big Data analytics in oil and gas industry: An emerging trend. Petroleum, 6(4), 321–328. Nasrabadi, H., Morales, A., & Zhu, D. (2012). Well placement optimization: A survey with special focus on application for gas/gas-condensate reservoirs. Journal of Natural Gas Science and Engineering, 5, 6–16. Nawwab, I. I., Speers, P. C., & Hoye, P. F. (Eds.). (1995). Saudi Aramco and its World: Arabia and the Middle East. Saudi Arabian Oil Company (Saudi Aramco). OPEC (2020), OPEC Basket. https://www.opec.org/opec_web/en/data_graphs/40.htm. Accessed June 2020. Rahmanifard, H., & Plaksina, T. (2019). Application of artificial intelligence techniques in the petroleum industry: A review. Artificial Intelligence Review, 52(4), 2295–2318. Ríos-Mercado, R. Z., & Borraz-Sánchez, C. (2015). Optimization problems in natural gas transportation systems: A state-of-the-art review. Applied Energy, 147, 536–555. Sahebi, H., Nickel, S., & Ashayeri, J. (2014). Strategic and tactical mathematical programming models within the crude oil supply chain context—A review. Computers & Chemical Engineering, 68, 56–77. Shah, N. K., Li, Z., & Ierapetritou, M. G. (2011). Petroleum refining operations: Key issues, advances, and opportunities. Industrial & Engineering Chemistry Research, 50(3), 1161–1170. Shakhsi-Niaei, M., Iranmanesh, S. H., & Torabi, S. A. (2013). A review of mathematical optimization applications in oil-and-gas upstream & midstream management. International Journal of Energy and Statistics, 1(02), 143–154. Syntor Fine Chemicals. (2019). The history of petrochemicals. https://www.syntor.co.uk/petrochem ical-history/. Accessed June 2020. Velez-Langs, O. (2005). Genetic algorithms in oil industry: An overview. Journal of Petroleum Science and Engineering, 47(1–2), 15–22.

References

23

Wanasinghe, T. R., Wroblewski, L., Petersen, B. K., Gosine, R. G., James, L. A., De Silva, O., & Warrian, P. J. (2020). Digital twin for the oil and gas industry: Overview, research trends, opportunities, and challenges. IEEE Access, 8, 104175–104197. Wikipedia. (2020). Ammonia. https://en.wikipedia.org/wiki/Ammonia. Accessed June 2020.

Chapter 2

Introduction to Optimization Models and Techniques

2.1 Introduction to Optimization Optimization refers to mathematical and computer models and techniques that are used to find the best possible solution for many types of real-life problems. The concept of finding the best solution implies that multiple solutions are possible. This is indeed the case for almost all practical problems, in which we can decide or control the values of one or several variables. In such cases, each possible set of values for these variables is an alternative solution. Typically, most decision problems in industry involve an infinite number of solutions. This is possible because real-life problems are characterized by inequality constraints that usually represent resource limitations. For example, the equality constraint (x + 2 = 5) has only one solution (x = 3). However, the inequality constraint (x + 2 ≤ 5) has an infinite number of solutions (x ≤ 3). Quite often, optimization problems in the petroleum industry have uncertain aspects, and hence they must be analyzed and solved by stochastic optimization techniques. When the problem is characterized by multiple, interacting, and dynamically changing random variables, simulation-based optimization models are used. Figure 2.1 shows the graphical output of a simulation model, displaying real-time 3D behavior of an oil field’s reservoir layers. The following definitions are used to describe and classify optimization models and solutions: Decision variables These are the variables we can control, i.e., decide their values within some limits. In the petroleum industry, examples of the decision variables might be the drilling locations, or the refinery feedstock quantities. Objective function This is a function of the decision variables that we aim to optimize (minimize or maximize) by finding the best values of the decision variables. The usual objectives © The Author(s), under exclusive license to Springer Nature Switzerland AG 2023 H. K. Alfares, Applied Optimization in the Petroleum Industry, https://doi.org/10.1007/978-3-031-24166-6_2

25

26

2 Introduction to Optimization Models and Techniques

Fig. 2.1 Simulation model representation of an oil field’s reservoir layers. Courtesy of Saudi Aramco, copyright owner

are minimizing the total cost and maximizing the net profit. Many other objectives are sought, however, such as maximizing the yield of a given reservoir. Constraints This is the set of restrictions expressed as functions of the decision variables. Resource limitations (e.g., feedstock availability) are usually expressed as less-than constraints, while many performance specifications (e.g., purity level) are expressed as greater-than constraints. Feasible solution This is any solution (set of specific values of decision variables) that satisfies all the constraints. If a solution is feasible, then it is achievable and acceptable, as it satisfies all the required conditions. However, a feasible solution may or may not give the best value for the objective function. Usually, there is an infinite number of feasible solutions for any given optimization problem. Optimum solution This is the set of values of the decision variables that gives the best (optimum) value of the objective function. An optimum solution must also be feasible, i.e., it is the best among all feasible solutions. Heuristic solution This is a very good feasible solution, but not necessarily the best solution. Heuristic solution methods are used when optimum solutions are too difficult or too timeconsuming to obtain. These methods use approximations and logical rules of thumb

2.2 Unconstrained Optimization

27

to quickly produce high-quality feasible solutions (that are not guaranteed to be optimum). Optimization approaches can be classified according to the characteristics of both the given problem and the solution method into the following general types: 1. 2. 3. 4. 5.

Unconstrained optimization. Linear programming. Other mathematical programming techniques. Heuristic algorithms. Simulation-based optimization.

2.2 Unconstrained Optimization Unconstrained optimization is applicable to problems that have no constraints. These problems are rare in practice, because it is very uncommon to have real-life decisions that are not bounded by restrictions, limitations, or regulations. In reality, constraints always exist, but their range can be so wide as to render them practically irrelevant. In general, the objective is to optimize (minimize or maximize) a single nonlinear function f (x), where x may either denote a single decision variable or a vector of multiple variables. When the objective function has no constraints, we can simply use differential calculus. As an example, we can use simple calculus to optimize the single-variable objective function f (x) shown in Fig. 2.2. Since the slope (derivative) is equal to zero at the optimum (minimum or maximum) point, we simply need to solve the following equation: f ' (x) = 0.

(2.1)

The solutions to the above equation are not all necessarily optimum. A given function may have several points (called stationary points) in which the slope is equal to zero. However, only the best of these is the optimum point. To ensure optimality for a stationary point x * , the following conditions must hold: Fig. 2.2 A single-variable function with several stationary points

120

70

20

-30

-80

0

5

10

15

20

28

2 Introduction to Optimization Models and Techniques

( ) f '' x ∗ > 0, x ∗ is the global minimum point

(2.2)

( ) f '' x ∗ < 0, x ∗ is the global maximum point.

(2.3)

For some stationary points, it may happen that both derivatives are equal to zero, i.e., f ' (x ∗ ) = f '' (x ∗ ) = 0. In this case, we need to take higher-order derivatives until we have a nonzero derivative at x * . Let us assume that n is the order of the first nonzero derivative. If n is an odd number, then x * is an inflection point, i.e., a point is which the function is temporarily flat as the slope changes sign from negative to positive or vice versa. On the other hand, if n is an even number, then: ( ) f (n) x ∗ > 0, x ∗ is the global minimum point

(2.4)

( ) f (n) x ∗ < 0, x ∗ is the global maximum point.

(2.5)

To optimize an unconstrained function of several variables f (x1 , x2 , . . . , xn ), we need to find the gradient ∇ f (x1 , x2 , . . . , xn ). The gradient ∇ f is a column vector consisting of the partial derivatives of f (x1 , x2 , . . . , xn ) with respect to all the variables. The element of the gradient in row i is defined by: ∇ f i = ∂∂xfi . The gradient can be considered as the multi-dimensional slope of the function f (x1 , x2 , . . . , xn ). Setting the gradient equal to zero, we need to solve the following system of equations to determine all the stationary points: ∂ f (x1 , x2 , . . . , xn ) = 0 i = 1, . . . , n. ∂ xi

(2.6)

As with the single-variable case, not all stationary points are optimal. To determine the optimal point, we need to evaluate the Hessian matrix H (x1 , x2 , . . . , xn ) at each stationary point. The Hessian matrix H = ∇ 2 f (x1 , x2 , . . . , xn ) can be considered as the multi-variable equivalent of the second derivative. The Hessian matrix H is a squared n × n matrix, in which the element in row i and column j is defined as follows: Hi j =

∂2 f ∂ xi ∂ x j

i = 1, . . . , n, j = 1, . . . , n.

(2.7)

( ) At each stationary point x1∗ , x2∗ , . . . , xn∗ , we need to evaluate the leading principal determinants of the Hessian matrix H. The kth leading principal determinant (LPDk ) of a squared n × n matrix is the determinant of the first k rows ( and the first)k columns of matrix H, where k = 1,…, n. For each stationary point x1∗ , x2∗ , . . . , xn∗ , there are three possibilities: ( ) 1. If all LPDk > 0, k = 1, …, n, then H is positive definite, and x1∗ , x2∗ , . . . , xn∗ is a minimum point.

2.3 Linear Programming

29

k 2. If ( ∗the ∗sign of ∗LPD ) k is (−1) , k = 1, …, n, then H is negative definite, and x1 , x2 , . . . , xn is a maximum point. 3. If signs of LPD ( the ) k do not follow the two patterns above, then H is indefinite, and x1∗ , x2∗ , . . . , xn∗ is a saddle point. A saddle point is a point of temporary flatness in which the gradient changes signs, i.e., it is a multi-dimensional inflection point.

In addition to the above exact analytical methods, numerical approximate solutions are used for unconstrained optimization. These solutions are especially useful in many practical applications in which the objective functions are too complicated or discontinuous and hence cannot be differentiated. In such cases, many numerical solution methods exist for unconstrained optimization. These methods start with rough initial estimates of the optimum point and then continually increase the accuracy in successive iterations. In general, these methods are classified into two main types: 1. Direct search methods. These methods are used for single-variable functions that have no local optimum points. These methods start with a given interval that contains the optimum point, and iteratively reduce the width of the interval until an acceptable accuracy is reached. These methods include the bisection method and the golden-section method. 2. Gradient-based methods. These methods are used for multi-variable functions that are twice differentiable. These methods iteratively search for the optimum point in the direction of the slope, which is the gradient ∇ f . These methods include the Newton–Raphson method and the steepest-ascent method.

2.3 Linear Programming Linear programming (LP) is the cornerstone of operations research (OR) and the foundation of mathematical programming. Linear programming is by far the most important and the most frequently used technique of mathematical programming in particular and of operations research (OR) in general. LP involves minimizing or maximizing a linear objective function of the decision variables, subject to a set of linear constraints (linear equations or inequalities). Other mathematical programming techniques can be considered as variations of LP that are applicable to certain special cases. Because of the fundamental role of LP in mathematical programming, it is covered in more detail in this chapter. In general, any linear programming (LP) model can be represented in the following form: Maximize Z =

n ∑ j=1

Subject to:

cjxj.

(2.8)

30

2 Introduction to Optimization Models and Techniques n ∑

ai j x j ≤ bi i = 1, . . . , m

(2.9)

j=1

x j ≥ 0 j = 1, . . . , n.

(2.10)

In above LP model, the decision variables are x 1 , …, x n , the objective function is Z, and the constraints are the inequalities (2.9) and (2.10). To determine the optimum solutions of LP models, two methods are generally used. The first method is the graphical solution, which is used for problems with only two decision variables. The second method is the simplex algorithm, which was developed by George Dantzig in 1947.

2.3.1 LP Graphical Solution Although the graphical solution is limited in capability and application, it is particularly useful for illustrating many fundamental concepts of linear programming. Basically, two-dimensinal space (a flat surface such as a sheet of paper) is used to represent and solve 2-variable LP problems, by assigning one dimension to each variable. The first variable, x 1 , is represented by the horizontal x-axis, while the second variable, x 2 , is represented by the vertical y-axis. While the two variables are represented by the two axes, constraints are represented by straight lines that indicate the boundaries of the feasible region. The objective function Z is represented by parallel straight lines corresponding to different values of Z, out of which one feasible line gives the best value for Z and intersects with at least one feasible point. This point of intersection is the optimum point, and its coordinates (x 1 , x 2 ) are the optimum values of the two decision variables. Example 2.1 To illustrate the graphical solution method, the following two-variable LP model is used as an example: Maximize Z = 2x 1 + 3x 2 Subject to x1 + x2 ≤ 8 x 1 + 2x 2 ≤ 12 x 1 , x 2 ≥ 0. The above model is illustrated and solved in Fig. 2.3. The constraints are indicated by the solid lines, the objective function is indicated by the dotted line, and the feasible region is indicated by the shaded area. Moving the objective function line in the increasing direction, we stop at the last point in the feasible region. This is the optimum point C, at which the optimum solution is x 1 = 4, x 2 = 4. The above graphical illustration and solution of Example 2.1 is helpful to make two important observations about the properties of LP models and their solutions. First, the feasible region is always a convex set, in which the corner points are also extreme points of the feasible region. Second, as a consequence, the optimum solution

2.3 Linear Programming

31

Fig. 2.3 Graphical illustration and solution for Example 2.1

is always a feasible corner point. These properties are utilized in the simplex method, which is presented in the following section.

2.3.2 The Simplex Method The simplex method is a mathematical technique that can be used to solve LP problems with two or more variables. Similar to the graphical solution, simplex considers only feasible corner points. Simplex calculations are performed in a sequence of iterations, where each iteration corresponds to a new and better feasible corner point. Starting from a default feasible corner point, which is usually the origin, the method moves from each point to the next (adjacent) corner point if such a move improves the objective function. If moving to another point cannot improve the objective, then the current point is declared the optimum point. The simplex method uses tableau or matrix calculations, where each tableau represents one iteration, i.e., one feasible corner point. The simplex method allows for sensitivity analysis and economic interpretation of the optimum solution.

2.3.2.1

LP Standard Form

In order to solve an LP problem by the simplex method, it must be put in the LP standard form, which is specified by the following conditions: 1. Decision variables. All the decision variables must be non-negative. If any variable x j is unrestricted in sign, i.e., it can take ) values, then it must be ( negative replaced by the difference of two variables x +j − x −j . In the optimum solution,

at least one of these two variables will be equal to zero. If x +j > 0 then x −j = 0 and x j is positive, and if x −j > 0 then x +j = 0 and x j is negative.

32

2 Introduction to Optimization Models and Techniques

2. The objective function. The objective function Z is written with all the variables on the left-hand side (LHS) and the constant—usually zero—on the right-hand side (RHS). For example, the objective function (maximize Z = 2x 1 + 3x 2 ) is rewritten as (Z − 2x 1 − 3x 2 = 0). 3. Constraints. All the constraints are converted to equations with variables on the LHS and non-negative constants on the RHS. If the RHS is negative, then the whole constraint is first multiplied by −1. Each less-than inequality constraint is converted to an equation by adding a slack variable to the LHS. For example, the constraint (x 1 + 2x 2 ≤ 12) is rewritten as (x 1 + 2x 2 + s1 = 12). Similarly, each greater-than inequality constraint is converted to an equation by subtracting an excess (surplus) variable from the LHS. For example, the constraint (2x 1 + 5x 2 ≥ 20) is rewritten as (2x 1 + 5x 2 − e1 = 20). 2.3.2.2

Basic Solutions

After putting the LP model in the standard form, it will have n variables (including the slack and excess variables), and m equations (equality constraints). Because either a slack or an excess variable is added to each constraint, the number of variables is greater than the number of constraints (n > m). Since the number of variables is greater than the number of equations, there is no unique solution to the system of linear equations. A basic solution is obtained by setting n − m variables equal to 0 and solving for the remaining m variables. The m variables that are kept are called the basic variables, while the n − m variables that are set equal to 0 are called the non-basic variables. To obtain a solution, the coefficient columns of the basic variables must be linearly independent. If the solution obtained this way has no negative basic variables, then it is called a feasible basic solution. Each basic solution corresponds to a corner point, and a feasible basic solution corresponds to a feasible corner point. If we replace only one basic variable by a non-basic variable, the resulting basic solution corresponds to an adjacent (neighboring) corner point. The basic variable that became non-basic is called the leaving variable, while the non-basic variable that became basic is called the entering variable.

2.3.2.3

Simplex Algorithm Steps

In each iteration, the simplex method moves from one feasible corner point to the next, stopping if the current point is optimal, as described below. 1. Convert the given model to the LP standard form. 2. Determine the initial feasible basic solution from the LP standard form. The usual initial point is the origin, at which all the original variables are non-basic, i.e., equal to zero. With less-than constraints, the starting basic variables are the slacks that have been added to all constraints.

2.3 Linear Programming

33

3. Determine whether or not the current point is optimal, i.e., whether or not there is an entering variable. a. For maximization problems, the entering variable is the non-basic variable with the most negative Z coefficient. b. For minimization problems, the entering variable is the non-basic variable with the most positive Z coefficient. c. If no entering variable is found, stop; the solution is optimal. 4. Determine the leaving variable, i.e., the basic variable to become non-basic. Suppose the entering variable will enter in column k. Define RHSi = right-hand side of row i, and aik = entering variable k coefficient in row i. The leaving variable is the basic variable with the minimum ratio Ri , which is calculated as follows only when the denominator aik is positive: Ri =

RHSi . +aik

5. Suppose that the leaving variable is in row p. Interchange the entering variable in column k with the leaving variable in row p to find a new solution using the following Gauss–Jordan row operations. To use these operations, we need to define two terms. The pivot equation is the leaving variable row p, while the pivot element apk is the coefficient at the intersection of the leaving variable row p (pivot equation) and the entering variable column k. The new pivot equation p is calculated by: EQnew p =

EQold p a pk

.

New equations for basic variables in each row i (i /= p), and the new Z equation, are calculated as follows: EQinew = EQiold −aik ∗ EQnew p , i = 1, . . . , m(i / = p) Z new = Z old −z k ∗ EQnew p . 6. Go back to Step 3. When simplex calculations are performed manually, they are usually done using tableaus (calculation tables). Simplex calculations can also be performed using matrix operations, which is how they are performed in computer software packages. When matrices are used instead of tableaus, the method is called the revised simplex method. No matter which approach is used, the same calculations are performed. Each tableau and each matrix represent one iteration, i.e., one feasible basic solution (a feasible corner point). A typical starting simplex tableau is shown in Fig. 2.4, in which the pivot equation (leaving variable row p) and the entering variable column k are highlighted.

34

2 Introduction to Optimization Models and Techniques

Fig. 2.4 Starting simplex tableau for LP models with (≤) constraints

Example 2.2 To illustrate the simplex method calculations, Example 2.1, previously solved graphically, is solved again using the simplex method. The solution steps are presented below. Standard LP form The LP model is converted to the standard LP form by moving all variables to the LHS of the objective function and by adding slacks to the two constraints. Z − 2x 1 − 3x 2 = 0 Subject to x 1 + x 2 + s1 = 8 x 1 + 2x 2 + s2 = 12 x 1 , x 2 ≥ 0. Iteration 1



Basic Z s1 s2

x1 –2 1 1

↓ x2 –3 1 2

s1 0 1 0

s2 0 0 1

RHS 0 8 12

Ratio 8/1 = 8 12/2 = 6

At this point, x 1 = 0, x 2 = 0. The entering variable is x 2 , as it has the most negative Z coefficient (−3). The leaving variable is s2 , as it has the minimum ratio (6).

2.3 Linear Programming

35

Iteration 2

Basic Z s1 x2



↓ x1 -0.5 0.5 0.5

x2 0 0 1

s1 0 1 0

s2 1.5 -0.5 0.5

RHS 18 2 6

Ratio 2/0.5 = 4 6/0.5 = 12

At this point, x 1 = 0, x 2 = 6. The entering variable is x 1 , as it has the only negative Z coefficient (−0.5). The leaving variable is s1 , as it has the minimum ratio (4). Iteration 3 Basic Z x1 x2

x1 0 1 0

x2 0 0 1

s1 1 2 -1

s2 1 -1 1

RHS 20 4 4

At this point, x 1 = 4, x 2 = 4. Since there are no negative Z coefficients, this is the optimum solution. The corresponding value of the objective function is Z = 20. It is important to note that the three above iterations correspond in sequence to points A, B, and C in Fig. 2.3. This illustrates that the simplex method moves in each iteration from one feasible corner point to an adjacent one. These moves are made as long as they improve the objective function, and they are stopped at the optimum point when no further improvement is possible.

2.3.2.4

Advanced LP Topics

The aim of this section is only to give a preliminary introduction to the main concepts of LP models and the simplex method. For most practitioners interested in applied optimization, it is sufficient to have a basic understanding of what optimization means and some familiarity with how it is done. In real-life applications, the solution of LP models is obtained by specialized optimization software. Therefore, the coverage of the simplex method is intentionally brief, simplified, and limited. There are many additional topics in LP theory and the simplex method that are covered is specialized operations research books. These topics include LP models with greater-than and equality constraints, sensitivity analysis, duality theory, optimality conditions, the dual simplex method, and the revised simplex method. The interested reader may refer to the books of (Bazaraa et al., 2011, 2013; Taha, 2017; Winston & Goldberg, 2004). It is also worth noting that, besides simplex, there are other LP solution methods such as the ellipsoid algorithm and the Karmarkar interior-point algorithm.

36

2 Introduction to Optimization Models and Techniques

2.4 Other Mathematical Programming Techniques Mathematical programming refers to a large family of constrained optimization techniques. It should be noted that this term was coined in the 1940s before the word programming became associated with computer programming. This term actually refers to the mathematical modeling and solution of optimization problems. Of course, computer programs nowadays play a big part in mathematical programming, as many optimization software packages are used to solve large-scale, real-life optimization problems. All mathematical programming models use mathematical expressions to accurately represent constrained optimization problems, and mathematical procedures to optimally solve these problems. A mathematical programming model consists of three basic components, namely the decision variables, the objective function, and the constraints. Mathematical programming techniques are classified according to the characteristics of the given problem and the solution method used. In addition to linear programming (LP), the main types of mathematical programming techniques are: 1. 2. 3. 4. 5. 6.

Integer programming. Goal programming. Network models. Dynamic programming. Stochastic programming. Nonlinear programming.

Linear programming has been covered in the previous section. The above techniques are presented in the following sections.

2.4.1 Integer Programming An integer programming (IP) model is a mathematical programming model in which some or all of the decision variables must take integer values only. Integer programming models can be classified according to the type of variables into the following categories: 1. Pure integer programming model: an IP model in which all variables are required to be integers. 2. Mixed-integer programming (MIP) model: an IP model in which some of the variables are required to be integers. 3. Binary (0–1) programming model: an IP model in which all the variables must be equal to either 0 or 1. Many applied optimization problems are formulated as integer programs. Obviously, this is often the case because some variables must be integer by nature (e.g.,

2.4 Other Mathematical Programming Techniques

37

the number of employees). Moreover, there is another important reason for formulating binary integer programs, which is their use to express many practical logical conditions. Binary (0–1) variables are used to represent various logical conditions such as yes–no, either–or, and if–then decisions. The solution of integer programming models depends on whether they are linear or nonlinear. Integer nonlinear programming models are solved by nonlinear programming (NLP) search methods, which are discussed in Sect. 2.4.6. Methods for solving integer linear programming (ILP) models are briefly described in this section. The first step in the solution of ILP models is to solve them as continuous LP models using the simplex method, initially ignoring integrality constraints. The presence of integer variables in either linear or nonlinear optimization models adds a significant degree of difficulty, as the solution techniques become more complex, and the computation times become longer. All the techniques for solving integer linear programming (ILP) models start by relaxing the integrality constraints and finding the optimum continuous LP solution. If the relaxed LP solution is integer, then the solution process ends. If the solution is not integer, then additional steps are required to obtain integer solutions. In general, techniques for solving all ILP models are classified into the three main types: 1. Branching search methods. These methods enumerate a specific, relatively small subset of all integer solutions. These methods include the branch-andbound technique and the additive algorithm for 0–1 implicit enumeration. 2. Cutting plane methods. These techniques add extra constraints to ensure integrality, thus cutting from the feasible region. These methods include the fractional (pure integer) cut algorithm and the mixed (mixed-integer) cut algorithm. 3. Hybrid methods. These techniques combine features from branching and cutting solution approaches. These include the branch-and-cut algorithm that combines branch-and-bound with cutting planes, and the branch-and-price algorithm that combines branch-and-bound with column generation. The branch-and-bound (B&B) algorithm is the most successful and frequently used algorithm for solving both pure and mixed-integer linear programs. Thus, this algorithm is briefly described here. By branching and bounding to consider a small subset of integer solutions, the B&B method implicitly enumerates all feasible integer solutions. Branching means solving two branches (subproblems) for a given integer variable that currently has a non-integer value. The two branches are created by rounding the current non-integer value up and down to the nearest integers. For example, if x 1 = 4.7, then the constraint x 1 ≤ 4 is added to one subproblem, and the constraint x 1 ≥ 5 is added to the other subproblem.

38

2 Introduction to Optimization Models and Techniques

Fig. 2.5 Branch-and-bound tree for solving Example 2.3

Bounding means using the best integer solution (best value of the objective function Z that has been obtained so far) as a limit to eliminate any branch that cannot lead to a better value of Z. Example 2.3 The branch-and-bound algorithm is used for solving the integer programming model below. Maximize Z = x 1 + 2x 2 Subject to – x 1 + x 2 ≤ 10 15x 1 + 16x 2 ≤ 240 x 1 , x 2 ≥ 0 and integer. First, ignoring integrality constraints, the model is solved as a continuous linear program using simplex. The optimum continuous solution is: x 1 = 2.58, x 2 = 12.58, and Z = 27.58. Since this solution is not integer, the branch-and-bound method is applied using the branching tree shown in Fig. 2.5. The optimum integer solution is: x 1 = 3, x 2 = 12, and Z = 27. The bound Z = 27 is used to exclude the (x 1 ≥ 4) branch from consideration. Since the non-integer Z value before branching is 27.2, the best possible integer Z value is 27. As this value is already achieved, this is the optimal solution, and there is no need to consider other branches.

2.4.2 Goal Programming Goal programming (GP) can be considered as an extension of linear programming (LP) to allow multiple objectives. While LP models have a single objective function, GP models have multiple, often conflicting, objective functions. In almost all real-life decisions, multiple criteria and multiple objectives are taken into consideration. In business, the objectives usually include profitability, growth,

2.4 Other Mathematical Programming Techniques

39

technological leadership, customer satisfaction, and social/environmental responsibility. With conflicting maximization and minimization objectives, it is impossible to simultaneously optimize all the objectives. In order to deal with multiple objectives, they are first converted into flexible constraints. Minimization objectives Z i are converted to less-than constraints (Z i ≤ T i ), while maximization objectives Z i are converted to greater-than constraints (Z i ≥ T i ). Goal programming models may also include other flexible constraints that are not derived from minimization and maximization objectives but are specified directly by the decision makers. In such cases, it is possible to have equality flexible constraints (Z i = T i ) expressing the desire for a certain performance measure to be equal to a specific value. The right-hand side values of these flexible constraints (T i ) are called target values or aspiration-levels, and they represent the limits on the acceptable values of the given objectives. Next, two deviational variables are introduced in each flexible constraint i: a slack variable si is added, and an excess variable ei is subtracted. This is done for both inequality and equality constraints, and it is used to convert inequality constraints into equations. In the LP standard form described in Sect. 2.3, only slack variables are added to less-than constraints and only excess variables are subtracted from greater-than constraints. However, since GP constraints are flexible, both deviational variables are added to each constraint, to allow the actual value of each Z i to be either above or below the target value T i . It must be noted that one of the two deviational variables (either si or ei ) must be equal to zero in the final solution, because Z i cannot be above and below T i at the same time. For the three types of constraints, the two deviational variables have different implications: • For a less-than (≤) constraint, the slack variable is natural, and the amount of violation is equal to the value of the excess variable ei . • For a greater-than (≥) constraint, the excess variable is natural, and the amount of violation is equal to the value of the slack variable si . • For an equality (=) constraint, the amount of violation is equal to the sum of values of the slack variable and the excess variable (ei + si ). The goal now becomes the minimization of the constraint violations, i.e., the deviational variables that cause violation. For example, suppose we have the three flexible constraints below. Their transformation to three goals is done as follows: Z 1 ≤ T1 → Z 1 + s1 − e1 = T1 → Minimize G 1 = e1 Z 2 ≥ T2 → Z 2 + s2 − e2 = T2 → Minimize G 2 = s2 Z 3 = T3 → Z 3 + s3 − e3 = T3 → Minimize G 3 = s3 + e3 . After formulating the goal programming model, it can be solved using one of the two methods that are described below.

40

2.4.2.1

2 Introduction to Optimization Models and Techniques

The Weighted Sum Method

First, each goal Gi is given a weight coefficient wi that reflects its relative importance, where wi > 0 and higher wi values indicate higher goal priority. Next, all multiple goals are combined into a single objective function, which is to minimize the weighted sum of individual goals (violations) Minimize W =

n ∑

wi G i .

(2.11)

i=1

Since the model now has a single objective function, it is solved as a linear program using the simplex method. The weighting method has several disadvantages and therefore it is not recommended for practical applications. First, the weights are not determined systematically, but they are somewhat arbitrary. Second, the goals have different units, and therefore the objective function W is a weighted sum of apples and oranges. However, several methods exist for normalizing the different goals to make them unit-free, so they can be properly combined.

2.4.2.2

The Pre-emptive Method

Instead of weights, goals are ranked in the order of priority, such that goal G1 has the highest priority and goal Gn has the lowest priority. The problem is then solved in n steps of LP, where the objective in step i is goal Gi , i = 1, …, n. Higher goals must not be affected by the solution of lower goals. Therefore, before proceeding with step i, the results obtained for the previous steps (1, …, i − 1) must be fixed. There are three different approaches to guarantee that higher-priority results are not affected by subsequent lower-priority solutions. The first approach is to add constraints to fix the optimum values obtained in each step before proceeding to the next (lower priority) step. The second approach, which is better, is to substitute the variables determined in each step by their optimum constant values. The third approach is the column-dropping rule, which is an implementation of the pre-emptive method on a multi-objective simplex tableau.

2.4.3 Network Models Several optimization problems can be represented and solved using network graphs. Such problems can be formulated and solved by conventional techniques, such as integer programming, but their special structure makes them easier to solve graphically. All of these problems are considered as minimum-cost network flow problems that can be solved by the network simplex method. As shown in Fig. 2.6, a network is

2.4 Other Mathematical Programming Techniques

41

Fig. 2.6 A simple project network showing task sequences and durations

defined by two types of symbols: nodes (circles) and arcs (arrows). Network models are used for the following optimization problems: 1. CPM project-scheduling model. The critical-path method (CPM) is used to determine the minimum duration of a given project, which is the length of the critical (longest) path in the network. Any activity in the critical path is critical, i.e., its delay will lead to delaying the project’s completion time. 2. PERT project-scheduling model. The Project Evaluation and Review Technique (PERT) is similar to CPM, but it considers uncertainty in job and project durations. The time needed to complete each job is given by three estimates based on the triangular probability distribution. 3. The minimum-spanning tree problem. In this problem, the objective is to select the set of arcs with minimum total length that connects all nodes in the network. 4. The shortest-path problem. The objective is to find the shortest path from the first node to the last node in the network. Each arc in the network directly connects two nodes, and its length represents the distance between these two nodes. 5. Maximum-flow problem. The objective is to determine the flow in each individual arc, in order to maximize the total amount of flow in the network from the first node (source) to the last node (sink). 6. The assignment problem. The assignment problem aims to find the minimumcost pairing (one-to-one assignment) of n sources to n destinations. 7. The transportation problem. The transportation problem aims to minimize the total cost of transporting a given quantity of an item from m supply points (sources) to n demand points (destinations). The unit shipping cost is different for each source–destination pair. Source capacities cannot be exceeded, and destination demands must be satisfied. 8. The transshipment problem. The transshipment problem is similar to the transportation problem. However, unlike the transportation problem, indirect routes are considered by allowing shipments through intermediate (transit) points.

42

2 Introduction to Optimization Models and Techniques

2.4.4 Dynamic Programming (DP) Dynamic programming (DP) divides a large, complicated optimization problem into a sequence of smaller, simpler subproblems (called stages). Although the name dynamic programming implies change over time, the smaller subproblems do not necessarily correspond to consecutive time periods. While the different subproblems are optimized one at a time, the stages are recursively linked to each other to ensure an optimum solution for the original, overall problem. Dynamic programming models have several distinguishing features that are described below.

2.4.4.1

DP Stages

The stages represent the subproblems that the larger problem is broken into, and each stage can be solved as a single optimization problem. Frequently, the stages represent time periods, as in the problem of multi-period inventory control. However, it is quite possible to have stages with no time association, such as different steps in a petrochemical process.

2.4.4.2

DP States

Each stage has a number of associated states. States convey the possible conditions of the current stage, i.e., possible values of the decision variable(s). For the inventory control problem, as an example, the states could be the possible number of units in inventory at the start of the current time period. The definition of the states is the most challenging part in DP, as it requires some creativity and a degree of art plus science. In order to properly define the DP states for a given problem, we need to focus on two questions: (1) how are the stages linked together? and (2) how can we ensure feasibility of the current stage without having to check the previous stages?

2.4.4.3

Recursive Relationships

These relationships link the current stage to the previously considered stage. Based on these relationships, the local optimal solutions obtained in each stage are guaranteed to produce a global optimum solution for the full original problem. Recursive relationships can be based on forward computations, where the recursive process starts from the first stage and moves forward to the last stage. More frequently, especially for time-based stages, backward computations are used, where the process starts from the last stage (i.e., time period), and moves backward to the first stage. Either way, the recursive process adds one stage at a time, until all stages (subproblems) are included, and the complete problem is optimally solved.

2.4 Other Mathematical Programming Techniques

2.4.4.4

43

The Principle of Optimality

This principle is also called the Markovian property. It can be stated as follows: given the current state, an optimal policy for the remaining stages is independent of the policy chosen in the previous stages. Drawing an analogy from the shortest-route problem, which is a classical DP problem, this principle can be stated as follows: given my current location, the best remaining route to my destination is independent of the route I took to reach my current location. This condition must be applicable to the given problem in order for the recursive equations to properly work and produce globally optimal results.

2.4.4.5

Network Representation

As long as the number of states is finite, any DP model can be represented as a network. In the network model, the states are represented by nodes and the allowed recursive links are represented by arcs, while the stages are distinct sections of the network containing their respective states. Many well-known network optimization problems, such as the shortest-route problem and the critical-path method (CPM), are actually simple DP problems.

2.4.4.6

Problem of Dimensionality

This problem means that DP computation time and memory significantly increase with moderate increases in the problem size. This is a common phenomenon in many areas of optimization and computation. Despite this problem, DP is a particularly useful tool for reducing the solution time and effort for many large optimization problems. This is not only due to dividing the problem into smaller subproblems, but also due to the use of information about previously considered combinations to eliminate infeasible and inferior alternatives.

2.4.4.7

DP Limitations

Although dynamic programming is a powerful approach for solving large, multistage optimization problems, it has two major limitations. The first limitation of DP is the problem of dimensionality, which has been discussed in the previous section. The second limitation of DP is the lack of a standard way to formulate and solve DP models. Therefore, DP models come in a large variety of unique structures involving the stages, states, and recursive relations. Among other varieties, DP models can be either linear or nonlinear, integer or continuous, and deterministic or stochastic. DP solution techniques depend on the characteristics of the given model, namely the definitions of the states and recursive relations. Therefore, there is no standard solution technique. Except for the common use of recursive relations,

44

2 Introduction to Optimization Models and Techniques

specific solution procedures should be uniquely tailored to efficiently solve each DP problem.

2.4.5 Stochastic Programming Stochastic programming is a mathematical programming modeling and solution framework for optimization problems that involve uncertainty. In deterministic mathematical programming approaches, all the given parameters are assumed to be known with certainty. However, there is always some degree of randomness and uncertainty in real-world problems. To deal with such issues, stochastic programming models incorporate data uncertainty into the objective function or the constraints. Usually, data uncertainty is specified by probability distributions of the given input parameters. While stochastic programming refers to randomness in the given problem, stochastic optimization refers to randomness in either the given problem or the solution method itself. Stochastic programming is closely related to decision analysis, discrete-event simulation, Markov decision processes, and dynamic programming.

2.4.5.1

Stochastic Programming Models

Stochastic programming modeling approaches to deal with uncertainty include the following (Philpott, 2020): 1. Robust optimization. This approach is generally used when probability distributions are not known, but the bounds on the values of the parameters are known. The aim in such distribution-free cases is to find a solution that is feasible for all possible data values and also optimal under the worst-case scenario. 2. Expected-value models. This approach is used when the probability distributions of the parameters are known. The aim is to find a solution that is expected to be feasible (i.e., satisfies constraints on average, or with a high probability) and optimal (i.e., minimizes/maximizes the objective function on average, or with a high probability). 3. Chance-constrained models. This approach is used when the probability distributions of the parameters are known. In general, the aim is to find a solution that minimizes the expected cost while ensuring that a certain set of random constraints is satisfied with a given minimum probability. 4. Multi-stage recourse models. These models consider multiple decisions over multiple stages (time periods), where each decision is followed by a random event. The purpose of these models is to determine the optimal decision for the first stage and the best recourse (corrective action) to take in reaction to each random event in the subsequent stages. The two-stage recourse model is the most frequently used and analyzed stochastic programming problem.

2.4 Other Mathematical Programming Techniques

2.4.5.2

45

Stochastic Programming Solutions

Stochastic programming solution techniques include the following (Philpott, 2020): 1. Scenario optimization. This technique is used when the probability distributions of the parameters are discrete. Hence, it is possible to define a limited number of scenarios for the different random outcomes (scenarios) with associated probabilities. These scenarios can be combined in a large LP model, which is called the deterministic equivalent model. 2. Bounding Techniques. When the probability distributions of the problem parameters are continuous, or the number of discrete random parameters is large, the number of scenarios is infinite or too large. In this case, this technique focuses on the two extreme scenarios that represent the upper and the lower bounds on the solution space and on the value of the objective function. 3. Monte Carlo sampling techniques. These techniques are also used when scenario optimization is not possible. The random variables, which may be continuous or too many, are replaced by randomly generated values from their respective probability distributions. The stochastic programming problem is then solved as a deterministic mathematical programming model, similar to the scenario optimization approach. It is possible to take one sample (one set of random variable values) or several samples to increase the accuracy of the results. 4. Other techniques. There are many other stochastic programming techniques, including stochastic approximation, stochastic gradient descent, and finitedifference stochastic approximation.

2.4.6 Nonlinear Programming Nonlinear programming (NLP) is a wide class of modeling and solution methods that apply to optimization problems in which the objective function, the constraints, or both are nonlinear. NLP models differ from LP models in terms of the feasible region and the optimal solution. For NLP models, the feasible region is not necessarily a convex set, and the optimal solution is not necessarily a corner or even a boundary point. Therefore, the simplex method, which searches for feasible corner points, is not useful for solving NLP problems. NLP problems are much harder to optimize than LP problems. While the LP simplex method iterations are based on exact analytical solutions, NLP solution methods are usually based on numerical and heuristic search approximations.

2.4.6.1

Karush–Kuhn–Tucker Conditions

Due to the general non-convexity of NLP models, it is possible for an NLP search algorithm to converge to a local optimum point. In order for a given point to be

46

2 Introduction to Optimization Models and Techniques

considered a global optimum point, it must satisfy certain optimality conditions called the Karush–Kuhn–Tucker (KKT) conditions. These conditions are based on the first partial derivatives of the NLP objective function in addition to the Lagrange multipliers. The KKT conditions are necessary conditions for a point to be optimum, but they are not sufficient to guarantee optimality. In other words, any optimal point is a KKT point, but a KKT point is not necessarily an optimal point. Any point satisfying the KKT conditions is an optimal solution to the NLP model only if the constraints are convex and the objective function is concave for maximization (convex for minimization).

2.4.6.2

NLP Model Types

NLP models include several types of special cases (Bradley et al., 1977), and they can be classified into the following categories: 1. Unconstrained problems. Unconstrained optimization problems have nonlinear objective functions and no constraints. They are discussed in Sect. 2.2. 2. Quadratic programming. The objective function is quadratic, i.e., a seconddegree polynomial, and the constraints are linear. A popular solution technique is Wolfe’s method, which is a modification of the two-phase simplex method. Other solution techniques include the augmented Lagrangian method, the conjugate gradient method, and the gradient projection method. Special cases of quadratic programming include quadratic programming with equality constraints and quadratic programming with quadratic constraints. 3. Linear-constrained NLP. The objective function is general nonlinear, and the constraints are linear. Solution techniques include the Frank–Wolfe algorithm based on linear approximations. The algorithm uses several linear segments to approximate the nonlinear objective function. It also performs a search along each segment to make sure the optimum point is not missed due to the approximation. The feasible directions method is another method that can be used to solve NLPs with linear constraints. It is a modification of the steepest-ascent method used to solve unconstrained NLP problems. 4. Equality-constrained NLP. The objective function, the constraints, or both are nonlinear, and all the constraints are equations. The Lagrange multiplier method is commonly used to solve NLPs with equality constraints. In this method, a Lagrange multiplier λi , which is a penalty coefficient, is multiplied by the constraint violation of each constraint i, and the penalty is added to the objective function. To minimize the augmented objective function, all its partial derivatives are set equal to zero, and the equations are solved to determine the values of the decision variables and all Lagrange multipliers. 5. Separable programming. The objective function, the constraints, or both are nonlinear. Moreover, the objective function is a sum of one-variable terms, and each constraint is a function of only one variable. Therefore, the problem can be

2.5 Meta-heuristic Algorithms

47

separated into several NLP models, one for each decision variable. Usually, linear approximation is used to solve separable NLP problems. The objective function and all nonlinear constraints are approximated by piecewise-linear curves. The linearized problem is solved by a customized version of the simplex method, in which the entering variable criterion is modified to incorporate the linear approximations. 6. Convex programming. The objective function is nonlinear and convex (for minimization) or concave (for maximization). This means that any local optimum point must be a global optimum point. In general, convex NLP problems are considerably simpler and faster to solve than non-convex problems. Many solution algorithms are available, including the bundle, subgradient projection, interior-point, ellipsoid, and subgradient methods. 7. Generalized NLP. The objective function and the constraints are nonlinear, and they are not restricted by any of the conditions of the above special cases. One of the techniques used to solve generalized NLP models is the Method of Approximation Programming (MAP). It is an extension of the Frank–Wolfe algorithm in which the constraints as well as the objective function are approximated by linear segments. Many other methods are available for solving general NLP models, including interior-point methods, sequential quadratic programming, sequential convex programming, and the generalized reduced gradient algorithm.

2.5 Meta-heuristic Algorithms For many optimization problems, optimum solutions are too difficult to obtain. This is the usual case when the optimization models are too large, complicated, stochastic, highly nonlinear, non-convex, or have many integer variables. In such cases, the only alternative is to use heuristic approaches to obtain good feasible solutions that are not necessarily optimal. Heuristic solution algorithms use simplified rules and approximations that are based on the properties of the given problem. They are used to quickly produce very good, but usually suboptimal, solutions. Heuristic algorithms are usually evaluated based on two criteria. The first criterion is the optimality gap, which is the relative difference between the heuristic objective function and the optimal objective function. The second criterion is the computation time of the heuristic algorithm, especially as compared to that of the optimum solution algorithm. There are numerous specially designed individual heuristic algorithms for most types of optimization problems. Therefore, it is not possible or useful to try to cover all of these individual heuristics. Instead, this section will focus on large families or classes of heuristic structures, which are called meta-heuristics. A meta-heuristic is a higher-level heuristic, or a problem-independent framework, which is designed to generate specific heuristics that follow a given overall search strategy and structure.

48

2 Introduction to Optimization Models and Techniques

In other words, a meta-heuristic must be custom-tailored to generate a problemspecific heuristic algorithm that fits the needs and properties of a given optimization problem. Meta-heuristics have demonstrated excellent performance in solving many largescale optimization problems. They achieve near-optimal results in short computational times by using various randomized search techniques to avoid getting trapped in local optimal points. Meta-heuristic algorithms utilize different control mechanisms to balance two major search components: diversification and intensification (Yang, 2011). Diversification emphasizes global search and avoids falling into local optima by exploring new wide-spread areas in the overall search space. On the other hand, intensification emphasizes local search by exploring the nearby neighborhood of the current solution. Extensive numerical experiments have been performed to compare the distinct types of meta-heuristics, and they generally show mixed results for different optimization problems. Glover and Kenneth Sörensen (2015) classify meta-heuristics into the following main types: 1. Local search meta-heuristics. These meta-heuristic algorithms make small changes (local moves) to a single current solution, in order to explore adjacent (neighboring) solutions. Such meta-heuristics include simulated annealing, tabu search, iterated local search, guided local search, and variable neighborhood search. 2. Constructive meta-heuristics. These meta-heuristics add individual components one at a time to a partial solution, until a complete solution is obtained. Often the construction phase is followed by an improvement phase using local search. These meta-heuristics include the greedy randomized adaptive search procedure (GRASP), large neighborhood search (LNS), and ant colony optimization (ACO). 3. Population-based meta-heuristics. These meta-heuristics operate on a population (group) of solutions in each iteration, using combinations and modifications of current solutions (current population) to produce the next population of solutions. This type of meta-heuristics includes genetic algorithms (GA), particle swarm optimization, evolutionary programming, evolutionary computation, evolution strategies, scatter search, and path relinking. The number of meta-heuristics has been steadily increasing, and many new metaheuristics have been proposed in the last few years. However, there is a growing concern that most of the newer meta-heuristics are not sufficiently novel, not really different, and not even competitive with the original well-established meta-heuristics. Therefore, this section will focus only on the following popular and well-tested meta-heuristics: 1. 2. 3. 4. 5.

Genetic algorithms. Simulated annealing. Tabu search. Ant colony optimization. Particle swarm optimization.

2.5 Meta-heuristic Algorithms

49

2.5.1 Genetic Algorithms (GA) Genetic algorithms, proposed by Holland (1975), are the most popular type of metaheuristics (Yang, 2011). Genetic algorithms are also the most intuitive because they relate the gradual improvement of the solution to the natural biological evolution process. The GA process starts with an initial set (generation) of randomly generated initial solutions. In GA, each solution must be represented as a vector of numbers or characters (chromosomes). At each step, different random operations are applied to randomly selected current (“parent”) solutions to produce new (“children”) solutions that form the new generation. GA random operations include the selection operator that selects individuals as parents, the crossover operator that combines two parents to produce one child, and the mutation operator that creates a child as a slightly modified copy of the parent. The probability of selecting any solution to be a parent is based on its fitness (objective function). Therefore, better solutions are more likely to produce children (subsequent solutions). Consequently, after several generations, the solutions gradually evolve, and their improving objective functions approach the optimal value. At the end, the best solution obtained in the process is selected as the final solution of the optimization problem.

2.5.2 Simulated Annealing (SA) The SA algorithm was developed by Kirkpatrick et al. (1983). It is inspired by the annealing process in metallurgy, which involves heating a material and slowly cooling it down to reduce defects. At each iteration, a potential new point (solution) is randomly generated. The distance from the current point to the new point, and the probability of accepting the move, have probability distributions that are proportional to the temperature. Moves to worse points (solutions) can be accepted to diversify the search space and avoid getting trapped in local minima. As the temperature decreases, so does the probability of making long moves or accepting inferior solutions. Therefore, as the temperature cools down, the search becomes less global and more local.

2.5.3 Tabu Search (TS) Tabu search is an intelligent and improved local search procedure developed by Glover (1986). Compared to local search, TS has several significant advantages. First, TS avoids being stuck in local optima by allowing moves that lead to a worse solution. Second, to avoid going back to previously visited points, TS puts them in a tabu (forbidden) list to prevent them from being considered again. Third, TS allows

50

2 Introduction to Optimization Models and Techniques

the user to introduce logical rules to guide the search, by requiring all potential solutions that violate a given rule to be listed as tabu. Finally, TS has several types of memory structures to improve the search: short term for the tabu list, intermediate term for intensification (local search) rules, and long term for diversification (global search) rules. The success of TS is mainly attributed to the use of tabu lists, which have been shown to produce significant savings in computation time.

2.5.3.1

Ant Colony Optimization (ACO)

This meta-heuristic was developed by Dorigo (1992), and it utilizes the process that ants use to search for food in order to search for the optimum solution. In ACO, finding the optimum solution is equivalent to finding the optimum path on a graph, which is the shortest path to the best food source. Initially, ants search randomly for food in all directions. When an ant finds food, it marks the path by leaving biological scents (pheromones) on its way back to the colony. Other ants tend to follow the marked paths, leaving their own pheromones. With time, shorter routes leading to better food sources become more populated and gain stronger pheromone scents. Since the pheromones evaporate with time, longer routes, and routes leading to poor or depleted food sources become less populated and lose their scents. While wandering round the popular paths, ants may discover new and better paths. This is equivalent to performing a local search in order to improve the solution.

2.5.4 Particle Swarm Optimization (PSO) This is a group-based algorithm, proposed by Kennedy and Eberhart (1995), that mimics the movement of a flock of birds or a school of fish. The method uses moving particles whose positions represent changing solutions in the search space. The algorithm starts with a group (swarm) of randomly generated particles. Subsequently, each particle searches for better positions in the search space using stochastic rules based on the particle’s position and velocity. Particle movements are partly random, but each particle is attracted to move towards two points: its own best previous location, and the global best-known location for the whole swarm. After each movement (iteration), the individual best positions are updated as well as the global best position. Continuing this way gradually moves the whole swarm towards the best position, i.e., the optimum solution.

2.6 Simulation-Based Optimization Computer simulation is based on developing dynamic computer programs to mimic the long-term, stochastic, and time-varying behavior of real systems. It is used to

2.6 Simulation-Based Optimization

51

model and evaluate systems that are complex, stochastic, and dynamic. Those systems cannot be analyzed by analytical models such as mathematical programming. Simulation allows for experimentations to be performed in the computer model, which cannot be done on real systems, because experiments on the real system are timeconsuming, risky, impossible, or expensive. Simulation models are mainly classified into the following types: 1. Continuous simulation: system behavior is modeled over a continuous time variable. 2. Discrete-event simulation: system behavior is modeled over discrete-time steps. 3. Stochastic simulation: the model has random variables, and hence Monte Carlo techniques are used to take several random samples. 4. Deterministic simulation: the model has no random variables. Computer simulation models are defined by several concepts and components. Entities refer to the items that flow through and get processed within the system. Input variables refer to the given values, such as the flow rate. Performance measures are the long-term output statistics used to evaluate the system. Functional relationships define the interrelationships among the various parts of the model. Probability distributions are used to represent the random behavior of stochastic variables. An event is a certain occurrence within the system, such as the arrival of a new entity. Finally, a scenario refers to a certain feasible set of values for the decision variables. Therefore, each scenario represents a possible system condition. There are several steps in developing and applying simulation models, including collecting the data, developing the model, running the model, and analyzing the results. In addition, there are some simulation-specific steps. For example, analyzing the data usually involves hypothesis testing to identify the probability distributions. Developing the model means defining the logic and the structure involving the flows among different processes. Coding the model means inputting it according to the specific requirements of the simulation software used. Testing the model is done by both verification and validation. Verification means comparing the model’s output to logically expected outputs. Validation means comparing the model’s output to the actual historical data. During and after the simulation runs, a graphical interface with animation is usually used to visualize the run and to display the sequence of results. Simulation is primarily used for analyzing and predicting the long-term performance of a given system or process. If used for these usual purposes, simulation is not considered to be an optimization method. Optimization is by definition prescriptive, i.e., it is used to improve a given system and to transform it to the best possible condition. On the other hand, simulation is mostly considered descriptive, i.e., it is usually used to describe an actual system and evaluate its as-is performance under the current condition. However, simulation is highly effective for stochastic optimization when the number of possible system conditions (scenarios) is limited. In those cases, the different conditions (scenarios) represent the alternative solutions. The simulation model is run under each scenario, and the scenario that gives the best long-term expected performance is chosen as the optimum solution.

52

2 Introduction to Optimization Models and Techniques

If the number of possible solutions (scenarios) is too large, other simulation-based optimization methods are used, including the following: 1. 2. 3. 4. 5. 6.

Statistical ranking and selection methods. Response surface methodology. Heuristic methods. Ordinal optimization. Stochastic approximation. Sample path optimization.

2.7 Summary and Conclusions A variety of optimization models and solution methods are available, which can be classified into two main categories: constrained optimization and unconstrained optimization. Constrained optimization approaches, which are the most relevant for the petroleum industry, include mathematical programming, meta-heuristic algorithms, and simulation-based optimization. Mathematical programming techniques, especially linear programming, are the most important optimization methods for the petroleum industry. Selecting a particular method to use in any petroleum industry application depends on the characteristics of the given optimization problem. For example, integer programming is used to represent integer variables and logical conditions, goal programming is used to represent multiple objectives, while stochastic programming is used to represent uncertainty. Moreover, meta-heuristic algorithms are used to deal with large, nonlinear, and non-convex problems that cannot be optimally solved. Finally, simulation-based optimization models are used to optimize highly complex stochastic systems with multiple interacting components.

References Bazaraa, M. S., Jarvis, J. J., & Sherali, H. D. (2011). Linear programming and network flows. Wiley. Bazaraa, M. S., Sherali, H. D., & Shetty, C. M. (2013). Nonlinear programming: Theory and algorithms. Wiley. Bradley, S. P., Hax, A. C., & Magnanti, T. L. (1977). Applied mathematical programming. AddisonWesley. Dorigo, M. (1992). Optimization, learning and natural algorithms. Ph.D. thesis, Politecnico di Milano, Italy. Dorigo, M. (2007). Ant colony optimization. Scholarpedia, 2(3), 1461. http://www.scholarpedia. org/article/Ant_colony_optimization. Accessed July 2020. Encyclopaedia Britannica. Mathematical optimization, https://www.britannica.com/science/optimi zation Glover, F. (1986). Future paths for integer programming and links to artificial intelligence. Computers and Operations Research, 13(5), 533–549.

References

53

Glover, F., & Sörensen, K. (2015). Metaheuristics. Scholarpedia, 10(4), 6532. http://www.schola rpedia.org/article/Metaheuristics. Accessed July 2020. Holland, J. H. (1975). Adaptation in natural and artificial systems. University of Michigan Press. Kennedy, J., & Eberhart, R. (1995). Particle swarm optimization. In Proceedings of IEEE international conference on neural networks (Vol. IV, pp. 1942–1948). Kirkpatrick, S., Gelatt, C. D., Jr., & Vecchi, M. P. (1983). Optimization by simulated annealing. Science, 220(4598), 671–680. Philpott, A. (2020). Introduction to stochastic optimization, https://www.stoprog.org/what-stocha stic-programming? Accessed July 2020. Taha, H. A. (2011). Operations research: An introduction (9th ed.). Pearson/Prentice Hall. Winston, W. L., & Goldberg, J. B. (2004). Operations research: Applications and algorithms. Thomson/Brooks/Cole, Belmonte, California. Yang, X. S. (2011). Metaheuristic optimization. Scholarpedia, 6(8), 11472. http://www.scholarpe dia.org/article/Metaheuristic_Optimization

Chapter 3

Optimum Locations of Multiple Drilling Platforms

3.1 Introduction Drilling is an important part of the exploration stage in the petroleum industry, and its objective is to find, test, and prepare sites where oil and gas are located. Drilling is done both for exploratory purposes and for long-term oil and gas production. Typically, many wells have to be drilled for the exploration and production of each inland or offshore oil field. Because oil and gas fields exist inland as well as underwater, drilling for oil and gas wells is done both onshore and offshore. However, the cost of drilling offshore is significantly higher than the cost of drilling on land. As shown in Fig. 3.1, multiple offshore drilling platforms (rigs) are used to drill the wells for a given offshore field. Offshore drilling activities start by determining the locations of the wells to drill in the field and also the number of rigs to drill them, as each rig is usually used to drill several wells. This chapter presents an application of integer programming (IP) techniques to optimize the locations of multiple rigs in order to minimize the total cost of offshore drilling. Offshore drilling technologies have two main types: subsea templates placed on the seabed, and rigs (platforms) positioned above the sea level as shown in Fig. 3.1. Each subsea template is connected with flow lines to processing platforms and has several slots from which a well can be drilled. Modern drilling technology is not limited to vertical drilling, but it also allows horizontal drilling both onshore and offshore. Therefore, a fixed-location rig can be used to drill several wells around it within a given horizontal distance. For a typical subsea oil field with more than 100 wells to drill, a few rigs are used to horizontally drill different subset of these wells. For each offshore well, the drilling time typically ranges from 20 to 150 days, with an average cost of roughly $100 million if the drilling time is 100 days (Haugland & Tjøstheim, 2015). The cost of drilling each well depends on two factors. The first factor is the type and cost of the drilling rig. The second factor is the well’s drilling time, which is a function of the distance between the rig and the well. The total cost of drilling for an offshore field consists of the costs of drilling individual wells as well as the fixed costs associated with the drilling rigs. Therefore, determining the © The Author(s), under exclusive license to Springer Nature Switzerland AG 2023 H. K. Alfares, Applied Optimization in the Petroleum Industry, https://doi.org/10.1007/978-3-031-24166-6_3

55

56

3 Optimum Locations of Multiple Drilling Platforms

Fig. 3.1 Two offshore drilling rigs (platforms). Courtesy of Saudi Aramco, copyright owner

number of drilling rigs, their locations, and the set of wells assigned to each rig will establish the total cost of drilling for an offshore oil field. Minimizing this total cost is a challenging and important optimization problem in the petroleum industry. In this chapter, mathematical programming models and solution algorithms are presented to determine the optimum locations of the rigs and the assignment of wells to each rig. The unique feature of the problem under consideration is that each rig has a different drilling cost rate per mile. Therefore, the drilling cost of each well depends not only on its distance to the drilling rig, but also on which particular rig is assigned to drill this well. Two real-life cases of this problem are considered in this chapter. In the first case, the locations of the rigs are assumed to be predetermined and fixed. In the second case, rig locations are considered as unknown variables that need to be optimized. Integer programming (IP) models are constructed to represent the two cases. For the second case, the optimum solution by IP is difficult. Therefore, an efficient heuristic solution method is proposed for the second case, and computational experiments are performed to confirm the effectiveness of this heuristic solution method. The remaining sections of this chapter are organized in the following sequence. In Sect. 3.2, recent related literature is reviewed and classified. In Sect. 3.3, the offshore drilling location problem under study is defined, the background of the problem is presented, and the applicable costs and given parameters are described. In Sect. 3.4, the integer programming (IP) model and the optimum solution are presented for Case 1, in which rig locations are assumed to be known and fixed. In Sect. 3.5, the IP model and its optimum solution are described for Case 2, in which rig locations are assumed

3.2 Relevant Literature

57

to be unknown decisions variables. In Sect. 3.6, a heuristic solution procedure for solving larger-size Case 2 instances is presented and evaluated. Finally, relevant conclusions and suggestions are provided in Sect. 3.7.

3.2 Relevant Literature The main emphasis in this section is on previously published models for optimizing the locations of offshore drilling platforms and optimizing the assignment of wells to each platform. Related problems, such as well location and field development, are also discussed when they are integrated with the models developed for the platform location optimization problem. Platform location models have two possible well location assumptions: either well locations are assumed to be known and fixed, or well locations are assumed to be unknown decision variables. The conventional assumption in platform location models is that well locations are already predetermined. Aiming to minimize the total drilling cost, Devine and Lesso (1972) use a two-stage algorithm to locate drilling platforms and assign wells to each platform. The algorithm iterates between an assignment stage, in which wells are assigned to known-location platforms, and a location stage, in which platform locations are determined to minimize the distances to the assigned wells. Hansen et al. (1992) develop a model to optimally locate drilling platforms and assign wells to them for an offshore field in Brazil. Two solution methods are proposed to minimize the cost: an optimal mixed-integer programming (MIP) method and a heuristic tabu search method. Rosing (1994) evaluates the applicability of the assumptions on which the model of Hansen et al. (1992) is based. Kabadi et al. (1996) combine clustering, integer programming, and network-flow models in a two-stage procedure for offshore platform location and well assignment. Alfares et al. (2019) consider a different real-life offshore drilling problem in which the cost of drilling each well is a function of both its distance to the drilling platform and the platform’s individual cost. An integer programming model and a heuristic solution algorithm are developed to determine platform locations and the wells assigned to each platform. Zhang et al. (2022) develop a digital elevation model to optimize platform locations for multi-well shale gas drilling in mountainous areas. A genetic clustering algorithm is used to minimize the total cost. Other assumptions have been incorporated in the offshore drilling problem. Almedallah and Walsh (2019) consider drilling new wells using existing and new platforms in an offshore oil field that contains existing wells and platforms. To minimize the total cost, the model determines the optimum number, locations, and sizes of the new platforms. Rosa and Ferreira Filho (2012) determine the optimum locations of offshore drilling platforms to maximize the revenue and minimize the cost. Distances between the wells and the drilling platforms are assumed to affect the cost of drilling, the cost of pipelines, and the productivity of the wells. A more general version of the offshore drilling problem is one in which the locations of both the drilling platforms and the wells to be drilled are unknown

58

3 Optimum Locations of Multiple Drilling Platforms

decision variables. Dogru (1987) formulates a mixed-integer nonlinear programming (MINLP) model to determine the optimal selection of wells and platform locations. The objective is to maximize the total production while minimizing the total drilling cost. Graph theory and a location/allocation algorithm are used to sequentially solve this problem. Barnes and Kokossis (2007) formulate integer programming models for the design and operations of oil fields and propose a two-stage solution process. First, the locations of the wells and the drilling center are selected, and then a drilling schedule is determined to meet given time-varying demands. Cristancho et al. (2010) use 3D visualization to determine the optimal location of a new offshore platform. Well planning software is used to simultaneously determine well locations and well paths while considering geological hazards, obstacles, and uncertainties. García et al. (2012) optimize the locations of both the wells and platforms, as well as the pipeline network between the wells and the platforms. The problem is formulated as a dense causal bidirectional graph, and the solution starts by breaking the graph into several subgraphs and solving them individually. The overall optimum solution is obtained by combining two heuristic approaches: divide-andconquer and active design document. Rodrigues et al. (2016) use a binary linear programming (LP) model to minimize the overall cost of developing an offshore oil field. The binary LP model is used to determine the number, locations, and capacities of the platforms; the number and locations of wells; and the required links between the wells and the platforms. The most general version of the offshore drilling problem has a wider scope, involving not only well and platform locations, but also the optimal time-phased schedule of field development activities and operations. Frair and Devine (1975) develop an offshore field development model that determines the following: (1) number and locations of platforms, (2) assignment of wells to drill by each platform, (3) field development and drilling sequence, and (4) reservoir production schedule. A decomposition approach is used to solve the large nonlinear model whose objective is to maximize the discounted cash inflows. Haugland et al. (1991) use reservoir simulation and economic analysis to construct a mixed-integer programming model of offshore field development with moveable platforms. The model determines the time and location of platform moves, well assignments to drilling platforms, and the oil production schedule. Iyer et al. (1998) construct a multi-period mixed-integer linear programming (MILP) model to represent the field development problem. A sequential decomposition algorithm is developed to solve it based on aggregation of time periods and wells followed by successive disaggregation. Van Den Heever and Grossmann (2000) improve the model of Iyer et al. (1998) by replacing linear approximations by exact nonlinear functions of reservoir pressure, gas-to-oil ratio, and cumulative gas production. Carvalho and Pinto (2006) enhance the model of Iyer et al. (1998) by adding investment constraints and incorporating the effect of reservoir pressure on well production levels and revenues. Campozana et al. (2008) use reservoir simulation to optimize the locations of the production platforms and the diameters of the production pipelines in an offshore oil field. Sahebi and Nickel (2014) use an MIP model to optimize platform locations

3.3 The Offshore Drilling Problem

59

and well allocations, as well as the corresponding transportation and pipeline planning decisions. Rosa et al. (2018) formulate a mixed-integer LP (MILP) model to determine the optimum number, locations, and well assignments of the platforms, in addition to the pipeline network structure and pipeline diameters.

3.3 The Offshore Drilling Problem 3.3.1 Problem Description This section presents the details of a real-life platform location and well assignment optimization problem in offshore oil drilling. Figure 3.2 shows the drilling components of a typical offshore drilling rig. The unique feature of this real-life problem is that the cost of drilling each well depends on two factors: Fig. 3.2 Drilling components of a drilling rig. Courtesy of Saudi Aramco, copyright owner

60

3 Optimum Locations of Multiple Drilling Platforms

1. which platform is used for drilling the well, and 2. the distance from the well to the drilling platform. In this case study, the number and the locations of the wells to be drilled are given. In certain cases, the locations of the drilling platforms are also given and fixed. In such cases, the problem is to divide the wells into specific sets containing up to 25 wells and to assign each set to one of the drilling platforms. In other cases, the drilling platform locations are not already fixed, and hence we also need to determine their optimum locations. In both cases, the objective is to minimize the total cost of drilling all the wells in the offshore field. Due to the high cost of offshore drilling, this is a significant optimization problem with a huge financial impact. The cost of drilling each well depends mainly on the distance between the well and the drilling platform. The problem presented here is a case study for drilling wells an offshore oil field located 60 miles off the Eastern coast of Saudi Arabia. This particular offshore oil field has a total area of 15 × 8 miles and a total of 90 potential well locations to be drilled. Several stages have been planned for development and production operations in this field. At the time of the study, four jacked-up drilling platforms of different types were already assigned to this field. In the first stage, field development activities will be limited to the four assigned platforms and to an initial area of 5 × 5 miles around these four platforms shown in Fig. 3.3. This 5 × 5-mile area contains 36 wells to be drilled, numbered 1–36, whose locations are already fixed. All the 36 well locations are within drilling distance to at least one of the current positions of the four assigned platforms.

Fig. 3.3 5 × 5-mile initial area of interest in the offshore field

3.3 The Offshore Drilling Problem

61

3.3.2 Model Costs and Parameters Given 4 rigs (platforms) and 36 wells, the following parameters are defined for formulating the optimization model: i = well number, i = 1, …, 36; j = rig (platform) number, j = 1, …, 4; L ij = length (distance in miles) between well at location i and rig in position j; cij = cost ($) of drilling well number i by rig in position j; D = maximum possible distance between any well and its drilling rig = 5 miles; wj = maximum number of wells that platform j can drill; Rj = daily rate of rig j, i.e., rig cost ($ per day).

All the above parameter values are readily available, except the drilling cost cij , which is a function of the distance L ij between well i and drilling rig j. It is not easy to determine this cost as an exact function of the distance, and hence it is estimated from the historical data of previous drilling operations. The drilling cost cij is estimated only for feasible (i, j) pairs, which are the pairs in which the distance L ij does not exceed the maximum possible distance D. Based on the available data from past drilling operations, the drilling cost cij is composed of several cost components. Each of these cost components can be expressed as a linear function of the distance L ij . Using past drilling cost data from similar offshore fields, the average values of the drilling cost (cij ) components are listed below. 1. Daily rig rate cost. In the petroleum industry, drilling rigs are usually owned by drilling contractors. The daily rate is the amount that an oil company pays to a drilling contractor for operating a given rig per day. In offshore drilling, rig daily rates vary according to the rig capacity, operating conditions, and market supply/demand factors at the time of making the agreement with the drilling rig contractor. The four rigs on location in the field under study are owned by four different contractor companies. The four rigs have similar capacities, but different daily rates, Rj , which are shown in Table 3.1. The number of days needed to drill each well is a function of the distance L ij . Using historical data, the average number of days required to drill a well at a distance of L ij miles is expressed by Eq. (3.1). Multiplying by the individual platform rate Rj , the drilling cost rate for each platform is given by Eq. (3.2): Number of days = 77.616L i j + 10.081

(3.1)

  Rig rate cost = R j 77.616L i j + 10.081 , j = 1, . . . , 4.

(3.2)

62

3 Optimum Locations of Multiple Drilling Platforms

Table 3.1 Daily cost rates of the 4 rigs ($/day). Reprinted from Alfares et al. (2019), by permission from KIIE(2)

Rig no. (j) Rate (Rj)

1 170,000

2 168,000

3 209,900

4 160,000

2. Cementing cost. Cement barriers are used to hold the casing in place and to prevent fluid migration between subsurface formations. The cost of well cementing varies according to the additives used in mixing, well depth, well geometry, and the field’s rock characteristics. Based on historical data, the average cost of cementing is a linear function of the distance L ij , which is given by: Cementing cost = 75,493L i j + 16,833.

(3.3)

3. Drilling fluid cost. Drilling fluids are also referred to as drilling mud, and they are added to the wellbore to ease the drilling process. These fluids help in drilling by controlling the pressure, stabilizing exposed rock, providing buoyancy, and by cooling and lubricating while drilling. The cost of these fluids depends on the type of fluids used, rock characteristics, and the length of the well. The average cost of drilling fluids is expressed below as a linear function of the distance L ij : Drilling fluid cost = 625,310L i j + 94,553.

(3.4)

4. Transportation, services, and overhead cost. There are other operating expenses associated with offshore drilling that can be divided into three parts. The first part is the cost of transportation of equipment, tools, and personnel to and from the platform. The second part is the cost of services such as the spare parts and the iron tubes used to run the completion. The third part is the company’s drilling overhead expenses such as office work, personnel, insurance, fuel, water, logistics, and third-party vendor services. The bigger the operation, the higher the overhead cost that is incurred and the more third-party vendors that are involved. Combining these three parts together, the average cost of transportation, services, and overhead is given by: Transportation, services, & overhead cost = 2,353,317L i j + 360,176. (3.5) The total drilling cost is obtained by summing up the four components: (i) rig rate cost, (ii) cementing cost, (iii) drilling fluid cost, and (iv) transportation, services, and overhead cost. Adding Eqs. (3.2)–(3.5), the total drilling cost for each well is approximated by the following equation:   ci j = R j 77.616L i j + 10.081 + 3,054,121L i j + 471,562.

(3.6)

As shown in Eq. (3.6), the total cost of drilling for well i is a function of two variables:

3.4 Case 1: Fixed Rig Locations

63

1. the distance L ij in miles between well i and platform j, and 2. the daily rate of the drilling platform Rj . In the following sections, two cases are presented for the optimal assignment of wells to the drilling platforms in the offshore oil field. In Case 1, the four platforms are assumed to be fixed in their initial locations. Therefore, the problem in Case 1 is simply to divide the wells into four sets and assign each set to one of the platforms. In Case 2, the platform locations are assumed to be not fixed, and hence we need to determine both the optimum platform locations and the optimum assignment of wells to the platforms.

3.4 Case 1: Fixed Rig Locations Case 1 deals with the problem of drilling wells in specific locations by platforms in their current and fixed locations. The objective is to determine the optimum assignment of wells to the four platforms in order to minimize the total cost. The individual drilling cost cij of well i depends on both the platform used j and the distance L ij to that platform. This cost is calculated by Eq. (3.6) only for feasible (i, j) pairs of wells and platforms, i.e., well-platform pairs whose in-between distances are within the maximum, L ij < D. Since there are 4 platforms and 36 wells to drill in this field, the set of feasible pairs is defined as follows:   F = (i, j ) is a feasible pair if L i j < D, i = 1 to 36, j = 1 to 4 .

(3.7)

For Case 1, the decision variables in the optimization model for are x ij , which are defined below only for (i, j) ∈ F as follows:  xi j =

1, if well i is drilled by rig j,(i, j)  F 0, otherwise

(3.8)

The individual drilling costs cij of feasible (i, j) pairs are calculated by Eq. (3.6). The objective function (3.9) for Case 1 is to minimize the sum of these costs: Minimize Z =

 (i, j )∈F

ci j xi j .

(3.9)

64

3 Optimum Locations of Multiple Drilling Platforms

The objective function (3.9) is optimized subject to constraints (3.10)–(3.12) below. Constraint (3.10) allocates each well to only one drilling platform. Constraint (3.11) ensures that the number of wells to be drilled by each rig j is no more than the specified limit wj . Finally, constraint (3.12) imposes binary value and feasibility restrictions on the decision variables: 4 

xi j = 1, i = 1, . . . , 36

(3.10)

xi j ≤ w j ,

(3.11)

j=1 36 

j = 1, . . . , 4

i=1

xi j ∈ (0, 1), ∀(i, j ) ∈ F.

(3.12)

The binary (0–1) integer programming model specified by expressions (3.7)– (3.12) includes 4 × 36 decision variables x ij . The model has the structure of a linear minimum-cost network-flow problem. Consequently, constraint (3.12) can be replaced by x ij ≥ 0 for all (i, j) ∈ F, and the resulting solution will be binary, i.e., the solution will have 0–1 values for all x ij variables. This means that the integer programming model can be optimally solved by any relevant software as a minimumcost network-flow problem or as a continuous linear programming (LP) problem. All the optimization problems presented in this chapter have been solved by a free optimization software called OpenSolver (Mason, 2012). Initially, platforms 1, 2, 3, and 4 are respectively located at well locations 21, 22, 11, and 2. The locations of the 36 wells and the current locations of the 4 platforms are shown in Fig. 3.4. Table 3.2 shows the distances in miles L ij between the 36 wells and the 4 platforms in their current locations, and the corresponding drilling costs C ij . All the distances L ij are within the feasibility threshold D = 5 miles. Therefore, all of the 36 wells can be drilled by any of the 4 platforms, and the set F includes all 4 × 36 x ij variables. Equation (3.6) is used to calculate the drilling costs C ij shown in Table 3.2 for all well–platform pairs. Constraint (3.11) ensures that the number of wells assigned to each platform does not exceed the platform’s drilling capacity (wj ). In reality, modern horizontal drilling allows offshore platforms to drill up to 50 wells. It is preferable to allocate an equal number of wells to the 4 platforms for better workload balance, but the ultimate objective is to minimize the total drilling cost. Hence, two alternative values of (wj ) are considered. First, in alternative a, the 36 wells are equally divided among the 4 platforms by setting wj = 9 for j = 1 to 4. Second, in alternative b, platform capacity limits are effectively removed by setting wj = 36 for j = 1 to 4.

3.4 Case 1: Fixed Rig Locations

65

Fig. 3.4 Well locations and the current locations of the four rigs. Reprinted from Alfares et al. (2019), by permission from KIIE(2)

3.4.1 Case 1a. Equal Number of Wells Per Platform This alternative is pursued for the sake of load balancing among the 4 platforms, and it is obtained by setting wj = 9 for j = 1 to 4 in constraint (3.11). The optimization model in this case is equivalent to a transportation problem with 36 sources (wells) and 4 destinations (platforms), where the capacity of each source is 1, and the demand of each destination is 9. Using OpenSolver (2018) Excel add-in to solve the problem, the optimal solution is shown in Table 3.3. Table 3.3 shows the well numbers assigned to each platforms and the total distance TDj from each platform j to all its assigned wells. For this alternative, the total drilling cost is $862,994,588, and the sum of distances between the platforms and their assigned wells is equal to 46.61 miles. The platform symbols shown in Table 3.3 indicate the well sites at which the platforms are currently located.

3.4.2 Case 1b. Unrestricted Number of Wells Per Platform This alternative is pursued to achieve the least possible total cost. This is done by either setting wj = 36 in constraint (3.11) or completely eliminating (3.11) from the model. The optimal solution for this alternative is shown in Table 3.4, and it has a total cost of $773,468,103 and a total distance of 42.76 miles between the platforms and their assigned wells. The number of wells assigned to each platform ranges from

66

3 Optimum Locations of Multiple Drilling Platforms

Table 3.2 Distances and drilling costs of wells from current platform locations. Adapted from Alfares et al. (2019), by permission from KIIE(1)

i 1 2

Li1 3.31 3.2

Li2 3.24 3.17

Li3 3 2.63

Li4 0.57 0

Ci1 55,968,996 54,181,623

Ci2 54,308,463 53,181,911

Ci3 60,624,722 53,466,806

Ci4 10,903,950 2,084,522

3 4 5 6 7 8 9 10

2.46 2.5 2.4 1.94 2.17 1.32 1.52 0.97

2.47 2.5 2.47 1.86 2.16 1.28 1.48 0.93

2.18 2.1 1.78 1.62 1.04 1.21 1.01 0.72

0.77 0.8 0.88 1.34 1.73 1.88 1.9 2.41

42,157,481 42,807,435 41,182,550 33,708,084 37,445,317 23,633,802 26,883,570 17,946,708

41,916,384 42,399,193 41,916,384 32,099,283 36,927,365 22,764,990 25,983,711 17,132,226

44,761,232 43,213,575 37,022,944 33,927,629 22,707,112 25,995,884 22,126,740 16,516,482

13,998,486 14,462,667 15,700,481 22,817,915 28,852,260 31,173,162 31,482,616 39,373,683

11 12 13 14 15 16 17 18 19 20 21 22

1.44 1.96 1.98 2.03 2.24 1.16 0.87 0.96 0.24 0.1 0 0.1

1.46 1.7 1.93 1.98 2.28 1.15 0.87 1.27 1.78 0.25 0.1 0

0 2.52 2.62 2.5 3 2.04 1.76 2.09 1.51 1.4 1.44 1.46

2.63 2.11 2.08 2 2.42 2.61 2.59 2.6 3.63 3.06 3.2 3.17

25,583,663 34,033,060 34,358,037 35,170,479 38,582,736 21,033,988 16,321,824 17,784,219 6,085,054 3,810,216 2,185,332 3,810,216

25,661,839 29,524,305 33,225,835 34,030,516 38,858,599 20,672,820 16,166,610 22,604,053 30,811,794 6,188,572 3,774,531 2,165,170

2,587,564 51,338,777 53,273,349 50,951,862 60,624,722 42,052,831 36,636,030 43,020,117 31,799,600 29,671,571 30,445,400 30,832,314

42,777,673 34,731,879 34,267,698 33,029,884 39,528,410 42,468,219 42,158,766 42,313,493 58,250,354 49,430,926 51,597,101 51,132,921

23 24 25 26 27 28 29 30 31 32 33 34 35 36

1.57 1.55 1.36 1.79 1.4 1.4 1.08 1.57 2.23 1.86 1.8 2 1.47 2.4

1.56 1.6 1.31 1.78 1.39 1.4 1.08 1.76 2.22 1.86 1.7 1.86 1.47 2.41

2.69 2.7 2.56 3.08 2.73 2.78 2.51 2.99 3.66 3.29 3.2 3.4 2.85 3.84

3.1 3.2 3.14 3.62 3.54 3.73 4.01 4.18 4.64 4.75 4.6 4.75 4.56 5

27,696,012 27,371,036 24,283,756 31,270,757 24,933,709 24,933,709 19,734,080 27,696,012 38,420,247 32,408,176 31,433,246 34,683,014 26,071,128 41,182,550

27,271,200 27,914,944 23,247,798 30,811,794 24,535,287 24,696,223 19,546,268 30,489,922 37,892,982 32,099,283 29,524,305 32,099,283 25,822,775 40,950,768

54,627,549 54,821,006 52,112,606 62,172,380 55,401,378 56,368,664 51,145,320 60,431,265 73,392,897 66,234,981 64,493,866 68,363,010 57,722,864 76,875,126

50,049,833 51,597,101 50,668,740 58,095,627 56,857,813 59,797,622 64,129,973 66,760,329 73,877,762 75,579,757 73,258,855 75,579,757 72,639,947 79,447,927

3.5 Case 2: Optimum Platform Locations

67

Table 3.3 Case 1a: well assignments and total distances for the 4 platforms. Adapted from Alfares et al. (2019), by permission from KIIE(1)

1 19 20 21 24 28 29 30 35 36 TD1 = 9.81

2 22 23 25 26 27 31 32 33 34 TD2 = 13.68

3 6 7 8 9 10 11 16 17 18 TD3 = 11.49

4 1 2 3 4 5 12 13 14 15 TD4 = 11.63

Table 3.4 Case 1b: well assignments and total distances for the 4 platforms. Adapted from Alfares et al. (2019), by permission from KIIE(1)

1 15 18 19 20 21 24 30

Σ=7 TD1 = 6.66

2 8 12 13 16 17 22 23 25 26

3 7 9 10 11

4 1 2 3 4 5 6 14

Σ=4 TD3 = 2.77

Σ=7 TD4 = 6.36

27 28 29 31 32 33 34 35 36 Σ = 18 TD2 = 26.97

4 to 18, leading to a highly uneven distribution of workload among the platforms. However, this alternative reduces the total drilling cost by $89,526,485, which is a savings of 10% relative to the equal-well-assignment alternative.

3.5 Case 2: Optimum Platform Locations Case 2 considers the same set of 4 platforms of different types and daily cost rates. However, the platforms are now assumed to be moveable to any well location within the field. Therefore, optimization in Case 2 is used to solve a location and allocation problem in order to minimize the total drilling cost. The optimization model

68

3 Optimum Locations of Multiple Drilling Platforms

now needs to simultaneously find the best locations of the 4 platforms and the best allocation of wells to each platform. As in Case 1, each platform will be located at one of the well positions to avoid unnecessary expenses. If the platform is placed at one of the well locations, then it will drill that well vertically, without any need for costly horizontal drilling. Therefore, the choice of possible locations for the platforms will be limited to the 36 locations of the wells to drill. Similar to Case 1, the index i, i = 1–36, is used to indicate the well number, while the index j, j = 1–36, is used to indicate the platform location number. If the numbers i and j are equal for a certain decision variable, then this indicates that the platform is located at the same position as the well number j.

3.5.1 Case 2 Optimum Solution Model A binary integer programming model is presented below to optimally solve Case 2 problem. The decision variables in the model for this case are listed below. The decision variable x ijk (for i = 1–36, j = 1–36, and k = 1–4) is defined only for feasible (i, j) pairs, i.e., (i, j) ∈ F, indicating the distance L ij between well site i and platform site j is