You are on page 1of 39

Sunil Pillai

EPS-EOL-Vadinar
May 24, 2010

Product Optimization
Agenda

 The LP Model
 Objective Function, Decision Variables &
Constraints.
 Excel Implementation

 Other Solvers
 LP Solve, GIPALS, SixPap

 Way Ahead
 Solver Foundation Service
Sunil Pillai Product Optimisation 2
Objective Function

 Objective:: To Maximize Revenue

 Currently Max Z= Rev_HSD +


Rev_FO +
Rev_Naptha +
Rev_IFO +
Rev_HSD_Strg +
Rev_FO_Strg

Sunil Pillai Product Optimisation 3


Decision Variables
Possible Options

Stream DHDS Blending Storage Naptha FO IFO


LK
HK
LGO
HGO
VD
HN
LCO
HG
VBVR
Slurry
Sunil Pillai Product Optimisation 4
Decision Variables
Model Variables

Symbol Stream DHDS Blending Storage Naptha FO IFO


S1 LK S11 S12 S13 S15
S2 HK S21 S22 S23 S25
S3 LGO S31 S33
S4 HGO S41 S43
S5 VD S51 S53
S6 HN S62 S64
S7 LCO S71 S73 S75
S8 HG S81 S82 S83
S9 VBVR S95 S96
S10 Slurry S103 S105 S106

Sunil Pillai Product Optimisation 5


Decision Variables
Excel Variables ::27

Stream DHDS Blending Storage Naptha FO IFO


LK LK_DHDS LK_Blending LK_Storage LK_FO  
HK HK_DHDS HK_Blending HK_Storage   HK_FO  
LGO LGO_DHDS   LGO_Storage      
HGO_DHD
HGO S   HGO_Storage      
VD VD_DHDS   VD_Storage      
HN   HN_Blending   HN_Naptha    
LCO LCO_DHDS   LCO_Storage   HN_FO  
HG HG_DHDS HG_Blending HG_Storage      
VBVR         VBVR_FO VBVR_IFO

Slurry     Slurry_Storage   Slurry_FO Slurry_IFO

Sunil Pillai Product Optimisation 6


Constraints:: 25
 Availability  Density (FO)

 Sulphur(HSD)  DHDS Flow

 KV (HSD, FO,  IFO Flow


IFO)
 Non_Negativity
 Flash(HSD, FO)

Sunil Pillai Product Optimisation 7


Objective Function in terms of Decision
Variables

 

Sunil Pillai Product Optimisation 8


Processing Road Blocks

 Volumetric Calculations
 Divide-by-Zero Error

 Index Value Comparisons


 Non-Linear Constraint Error

Sunil Pillai Product Optimisation 9


Divide-by-Zero Error

 Solver
  starts with zero values for all variables.

 At this point the sum of the variables is also


Zero.

 Any Calculation involving a Division by the Sum


of Volumes will result in a Divide-by-Zero Error.

 For Example:

Sunil Pillai Product Optimisation 10


Solution

  Convert all Division into


Multiplication

 Instead of
 ≤ Spec_Sulphur_HSDMax

 We Use

Sunil Pillai Product Optimisation 11


Implementation
 HSD Sulphur  FO Flash
 HSD KV  FO Density
 HSD Flash  IFO KV
 FO KV  IFO Flash

Output
Diesel
  Diesel KV Diesel Flash FO KV FO Flash FO Density IFO KV IFO Flash
Sulphur
Output 330 2.199997 50.28787 180.0009 75.7336 0.991 40800.8 113.1402
Comparision 293008.4 50505.02 52.86698 6096.814 5.323215 254.36209 579.916549 1.12942
Min 17758.08 50505.02 87.97638   7.96854   579.916549  
Max 293008.4   6.735442 6096.814   254.36209    

Sunil Pillai Product Optimisation 12


Non-Linearity Error

 The Functions used to convert KV &


Flash to their Index Values are Non-
Linear.

 This makes the KV & Flash


Constraints unacceptable to the LP
Solver.

Sunil Pillai Product Optimisation 13


Solution

 Linearising:: Comparisions to be made


in SAME domain (Index values) only.

 Spec value to be converted into Index


Value.

 This Index value of Spec Compared


with the Index value of output in the
Constraint.
Sunil Pillai Product Optimisation 14
Implementation

 HSD Flash  FO Flash


 HSD KV  IFO KV
 FO KV
Diesel Diesel
Specs Diesel KV FO KV FO Flash FO Density IFO KV
Sulphur Flash

Min 20.00 38.00 2.20   66.00    


Max 330.00 100.00   180.00   0.99  
Equal to             40800.00
IndexMin 0.099083 56.88 0.031046 8.528185
Index Max 0.007586 23.75

Sunil Pillai Product Optimisation 15


Input Variables

 100% Dynamic In Nature.

 No static values in any formulas in


Model.

 All values are Referenced to by Variables.

 In all 71 variables can be assigned


values to model different scenarios.
Sunil Pillai Product Optimisation 16
Interface

Output Input
Values Values

Single Screen View, All Values & Colour Coded, Input & Output
Compact Layout , No Results Grouped Green Cells can be Displayed Side By Side
scrolling Required
Sunil Pillai for Optimisation
Product clarity. changed for ease of Comparison
17
Model Diagnosis
Diagnosis Sheet

 Model Diagnosis
   

  Objective Function     761787.43


 Separate
  Variable Count     27
Diagnosis Sheet
1 Density_FO_CmpOp<=Density_FO_CmpMax       TRUE

 Automatically 2 Flash_FO_CmpOp<=Flash_FO_CmpMin TRUE


Displays the
status of 81 3 Flash_HSD_CmpOp<=Flash_HSD_CmpMin TRUE
Parameters of
the Problem 78 VD_Strg>=0     TRUE
79 VD_Used=VD_Availability TRUE
{32767,32767,0.000001,0.01,TRUE,FALSE,FALSE,1,1
80 32767
,1,0.0001,TRUE}
81 {0,0,1,100,0,FALSE,TRUE,0.075,0,0,TRUE,50} 0
Sunil Pillai Product Optimisation 18
Documentation Documentation
Sheet

 All 27 Variables
documented with their
Names & Cell References

 All 25 Constraints
properly categorized &
grouped for clear
understanding of the
Problem & ease of
Troubleshooting
Sunil Pillai Product Optimisation 19
Macro Enabled

 One Click Solution.

 Loads the Solver &


Generates Sensitivity &
Limits Reports
Automatically

Sunil Pillai Product Optimisation 20


Summary

 Maximization Problem
 27 Decision Variables
 25 Constraints
 54 Variable Bounds (Upper & Lower)
 71 Input Variables
 Completely Linear Problem
Sunil Pillai Product Optimisation 21
Other Solvers Considered
 LP Solve  Kinsol

 GIPALS  Tron

 Project SixPap  Open Office Add-


ins
 Kestral & NEOS
Server

Sunil Pillai Product Optimisation 22


LP Solve IDE

 Advantages

 Fastest Linear solver

 Greater Control on Solver Behaviour.

 Large number of Options available

 Unlimited Variables & Constraints

 O/p can be Transported to several other

Formats including Excel


Sunil Pillai Product Optimisation 23
LP Solve IDE

Sunil Pillai Product Optimisation 24


LP Solve IDE

 Disadvantages

 Interface Not suitable for Dynamic Data.

 Variable values are written in program

Sunil Pillai Product Optimisation 25


GIPALS

 General Interior-Point Algorithm Linear


Solver

 Adjustable Preprocessor

 Flexible Debug Options

 Constraint Editor with Error trracking

Sunil Pillai Product Optimisation 26


GIPALS

Sunil Pillai Product Optimisation 27


GIPALS

 Disadvantage

 Not Free Copy

 30-Day trial Version has limitation of


15000 Variables & 15000Constraints.

 Only a linear Solver

Sunil Pillai Product Optimisation 28


Six Pap
 VB Based LP Solver

 Detailed Analysis & Diagnosis Possible

 Has two Algorithms:: Push-Pull & Std


Simplex.

 Simultaneous Computation using both Alg.

 Provides Comparision between the results


from both the Algorithms.
Sunil Pillai Product Optimisation 29
Six Pap

Sunil Pillai Product Optimisation 30


Six Pap

 Results cannot be Exported.

 Constraints to be entered in the


Matrix.

 Input variables are not allowed, Direct


Data to be entered into the model.

Sunil Pillai Product Optimisation 31


Kinsol, Tron & Kestrol- Neos

 Kinsol & Tron work Exclusively on


Linux Platforms, not supported on
Windows.

 Neos is a Server of MIT that allows


users to log in remotely & submit
their LP problems using Kestrol Client
program. Not Recommended due to
Data transfer & Security Issues.
Sunil Pillai Product Optimisation 32
Conclusion

 So Far, EXCEL Add-in stands as the


best candidate as per the Input &
Interface requirement of the problem.

 But its nonlinear Capacity does not


provide a reliable global optimum.

Sunil Pillai Product Optimisation 33


Way Ahead

Interfacing
Expanding Exploring
Excel & 3rd Party
Incorporating All Shortlisting Other
Solvers via Solver
Products to build a Solvers to
Foundation
Comprehensive Augment Excel’s
Services
Model Capacity
Improved
One Stop Solution Emphasis on NLP
Diagnostics

Sunil Pillai Product Optimisation 34


Interfacing

 Best way to go forward lies in


continuing with Excel Interface
(Front-End) while trying to find Non-
Linear Solvers that can be integrated
into Excel.

 Solver Foundation Services is believed


to have the capabilities to do so with
some restrictions
Sunil Pillai Product Optimisation 35
Solver Foundation In Excel

Provides Facility to Design


the Entire Model. It can also
be exported to other
Applications

Sunil Pillai Product Optimisation 36


Modeling pane
Sunil Pillai Product Optmisation 37

• Modeling pane of Solver


Click icon to add picture
Foundation

• Introduces the Concept of


Goals.

• Detailed Solution Report is


available.

• Provides Better Scope for


Diagnosis
List of Non Linear Solvers
 APOPT - large-scale nonlinear programming  MOSEK - linear programming and convex
 CO - nonlinear programming in the GAUSS nonlinear optimization.
language.  NLPJOB - Mulicriteria optimization.
 CONOPT - nonlinear programming.  NLPQL - nonlinear programming.
 DONLP2 - nonlinear programming.  NLPQLB - nonlinear programming with
 DOT - Design Optimization Tools. constraints.
 Excel and Quattro Pro Solvers - spreadsheet-  NLPSPR - nonlinear programming.
based linear, integer and nonlinear  NPSOL - nonlinear programming.
programming.  NOVA - nonlinear programming.
 FSQP - nonlinear and minmax constrained  OPTIMA Library - optimization and
optimization, with feasible iterates. sensitivity analysis.
 GINO - nonlinear programming.  PROC NLP - various nonlinear optimization
 GRG2 - nonlinear programming. capabilities.
 HARWELL Library - linear and nonlinear  OPTPACK - constrained and unconstrained
programming, nonlinear equations, data optimization.
fitting.  SNOPT - large-scale quadratic and nonlinear
 ILOG - constraint-based programming and programming problems.
nonlinear optimization.  SQP - nonlinear programming.
 IPOPT - interior point, large-scale  SPRNLP - sparse and dense nonlinear
 KNITRO -nonlinear programming.. programming.
 LANCELOT - large-scale problems.  SYNAPS Pointer - multidiscplinary design
 LINGO - linear, integer, nonlinear optimization software.
programming with modeling language.  What's Best - Excel add-in for linear, integer,
 LOQO - Linear programming, unconstrained nonlinear programming.
and constrained nonlinear optimization.  NLopt - a variety of nonlinear-constrained
 LSGRG2 - nonlinear programming. nonlinear optimization algorithms, including
 Sunil Pillai
MINOS Product Optimisation
- linear programming and nonlinear algorithms for large-scale problems 38
Suggestions…

Sunil Pillai Product Optimisation 39

You might also like