9th International Symposium on Advanced Control of Chemical Processes June 7-10, 2015. Whistler, British Columbia,Control Canadaof 9th Symposium on 9th International International Symposium on Advanced Advanced Control of Chemical Chemical Processes Processes 9th International Symposium on Advanced Control of Chemical Processes Available online at www.sciencedirect.com June 7-10, 2015. 2015. Whistler, Whistler, British Columbia, Canada June 7-10, British Columbia, Canada June 7-10, 2015. Whistler, British Columbia, Canada
ScienceDirect IFAC-PapersOnLine 48-8 (2015) 229–233 Inclusion of Long-term Production Planning/Scheduling into Real-time Inclusion of Long-term Planning/Scheduling Optimization Inclusion of Long-term Production Production Planning/Scheduling into into Real-time Real-time Optimization Optimization Divya Kumar *. Ye Chen**, Ali Esmaili***.
Divya Kumar *. Ye Chen**, Ali Esmaili***. Divya Divya Kumar Kumar *. *. Ye Ye Chen**, Chen**, Ali Ali Esmaili***. Esmaili***. * Process Data Technology, Air Products and Chemicals, Allentown, PA 18095 ** Process Data Aire-mail: Products and Chemicals, Allentown, PA 18095 (Tel: Technology, 610-481-4911;
[email protected]). * Process Process Data Data Technology, Technology, Air Air Products Products and and Chemicals, Chemicals, Allentown, Allentown, PA PA 18095 18095 610-481-4911; e-mail:
[email protected]). ** Process (Tel: Data Technology, Air Products and Chemicals, Allentown, PA 18095 (Tel: (Tel: 610-481-4911; 610-481-4911; e-mail: e-mail:
[email protected]).
[email protected]). ** Process Data Technology, Air Products and Chemicals, Allentown, PA 18095 (Tel: 610-481-4911; e-mail:
[email protected]). ** ** Process Process Data Data Technology, Technology, Air Air Products Products and and Chemicals, Chemicals, Allentown, Allentown, PA PA 18095 18095
[email protected]). *** Process(Tel: Data610-481-4911; Technology, Aire-mail: Products and Chemicals, Allentown, PA 18095 (Tel: 610-481-4911; e-mail:
[email protected]). (Tel: 610-481-4911; e-mail:
[email protected]). *** Process (Tel: Data610-481-4911; Technology, Air Products and Chemicals, Allentown, PA 18095 e-mail:
[email protected]). *** *** Process Process Data Data Technology, Technology, Air Air Products Products and and Chemicals, Chemicals, Allentown, Allentown, PA PA 18095 18095 (Tel: 610-481-4911; e-mail:
[email protected]). (Tel: 610-481-4911; e-mail:
[email protected]). (Tel: 610-481-4911; e-mail:
[email protected]). Abstract: This work focuses on making the best possible decision at the RTO level, when it is not Abstract: Thisviable worktofocuses on making possible decision and at the RTO planning level, when it is not economically have implemented athe full best Production scheduling business optimization. Abstract: Abstract: This This work work focuses focuses on on making making the the best best possible possible decision decision at at the the RTO RTO level, level, when when it it is is not not economically have implemented aa full Production scheduling planning optimization. It attempts to viable mergeto some of the longer-term decisions that are doneand in business the production scheduling and economically viable to have implemented full Production scheduling and business planning optimization. economically viable to have implemented a full Production scheduling and business planning optimization. It attempts management to merge some the RTO, longer-term decisions that are the production schedulingwhile and inventory intoof the thereby minimizing the done totalincost of implementations It It attempts attempts to to merge merge some some of of the the longer-term longer-term decisions decisions that that are are done done in in the the production production scheduling scheduling and and inventory management into the RTO, thereby minimizing the total cost of implementations while attempting to get some ofinto the benefits that a full production/inventory scheduling activity would bring. In inventory inventory management management into the the RTO, RTO, thereby thereby minimizing minimizing the the total total cost cost of of implementations implementations while while attempting get of the that aa full activity would bring. In the current to work asome decision onbenefits inventory levels isproduction/inventory done within RTO byscheduling solving the optimization problem attempting to get some of the benefits that full production/inventory scheduling activity would bring. In attempting to get some of the benefits that a full production/inventory scheduling activity would bring. In the work a decision on augmenting inventory levels is done within RTO solving optimization problem overcurrent a longer horizon and by the objective function forbyRTO withthe inventory cost based on the the current current work work aa decision decision on on inventory inventory levels levels is is done done within within RTO RTO by by solving solving the the optimization optimization problem problem over aa longer horizon and by augmenting the objective RTO with inventory cost based on historical average of marginal cost. The objective functionfunction in RTO for is based on minimization of costs, and over longer horizon and by augmenting the objective function for RTO with inventory cost based on over a longer horizon and by augmenting the objective function for RTO with inventory cost based on historical average marginalobjective cost. The objectiveleads function RTO reduction is based on of costs, and minimization of theofproposed function to an in overall of minimization long term marginal cost. A historical historical average average of of marginal marginal cost. cost. The The objective objective function function in in RTO RTO is is based based on on minimization minimization of of costs, costs, and and minimization the proposed objective function leads to an reduction long term marginal cost. A case study is of presented in which average marginal cost is overall considered greaterof and lower than the current minimization of the proposed objective function leads to an overall reduction of long term marginal cost. A minimization of the proposed objective function leads to an overall reduction of long term marginal cost. A case study is presented in which average marginal cost cost is considered greater and of lower current cost of production and shows that the long term marginal reduces over a period time.than the case case study study is is presented presented in in which which average average marginal marginal cost cost is is considered considered greater greater and and lower lower than than the the current current cost of production and shows that the long term marginal cost reduces over a period of time. cost of production and shows that the long term marginal cost reduces over a period of time. Keywords: Real-time Planning, Inventory Management, Marginal Cost cost of production andOptimization, showsFederation that theScheduling long term and marginal costHosting reduces a period © 2015, IFAC (International of Automatic Control) byover Elsevier Ltd. of Alltime. rights reserved. Keywords: Real-time Optimization, Scheduling and Planning, Inventory Management, Marginal Cost Keywords: Keywords: Real-time Real-time Optimization, Optimization, Scheduling Scheduling and and Planning, Planning, Inventory Inventory Management, Management, Marginal Marginal Cost Cost 1. INTRODUCTION same product and varying plant efficiency with respect to 1. INTRODUCTION same product plant efficiency respect to cost. This kindand of varying system usually is given with direction about INTRODUCTION 1. INTRODUCTION same product product and and varying varying plant plant efficiency efficiency with with respect respect to to In industrial setting 1. different levels of optimization problems same cost. This kind of system usually given direction about daily/weekly production targets fromis the business operations. cost. This kind of system usually is given direction about In industrial setting different levels of optimization problems cost. This kind of system usually is given direction about are solved to make a decision. Five different levels of In production targets fromchange the business In industrial industrial setting setting different different levels levels of of optimization optimization problems problems daily/weekly However, sometimes these targets and itoperations. becomes are solved to decision. different levels of daily/weekly daily/weekly production production targets targets from from the the business business operations. operations. optimization aremake shownaa in Figure 1Five as: PID Control, MPC, are solved to make decision. Five sometimes these and it impossible for the system of targets plants tochange meet them. Tobecomes plan for are solved to make a decision. Five different different levels levels of of However, However, sometimes these targets change and it optimization are shown in Figure 1 as: PID Control,(Darby MPC, However, sometimes these targets change and it becomes becomes RTO, Production Scheduling and Business Planning optimization for the plants to meet them. To plan for this uncertainty it system becomesof important to carefully decide on optimization are are shown shown in in Figure Figure 11 as: as: PID PID Control, Control, MPC, MPC, impossible impossible for the system of plants to meet them. To RTO, Scheduling Business Planning (Darby (Darby for the system of plants to meet them. To plan plan for for et al., Production 2011). However, doingandallBusiness the optimizations is not impossible RTO, uncertainty it becomes important to carefully decide on RTO, Production Production Scheduling Scheduling and and Business Planning Planning (Darby this inventory levels when keeping infinite inventory is not an et al., al., 2011). viable However, doingonly all some the optimizations optimizations is not not this uncertainty uncertainty it it becomes becomes important important to to carefully carefully decide decide on on economically and hence of the levels can be this et levels when keeping infinite inventory is not an et al., 2011). 2011). However, However, doing doing all all the the optimizations is is not inventory option. The challenge in increasing/decreasing the inventory economically viable only some some of the theoflevels can be be inventory inventory levels levels when when keeping keeping infinite infinite inventory inventory is is not not an an implemented. viable But toand takehence advantage of some the longereconomically challenge in inventory economically viable and and hence hence only only some of of the levels levels can can be option. levels isThe compounded byincreasing/decreasing the fact that cost of the production is option. The challenge in increasing/decreasing the inventory implemented. to take advantage of some of the longeroption. The challenge in increasing/decreasing the inventory term decisionsBut made in Production Scheduling and Business implemented. But to take advantage of some of the longeris compounded by the fact that cost of production implemented. But to take advantage of some of the longer- levels highly fluctuating depending on when the extra product is levels is compounded by the fact that cost of production term decisions made in Production Scheduling and Business compounded by the fact that cost of production is is Planning in the RTO level; RTO optimization can be levels isfluctuating term on when the extra is produced. The cost depending of production can fluctuate due product to various term decisions decisions made made in in Production Production Scheduling Scheduling and and Business Business highly highly fluctuating depending on when the extra product is Planning in the RTO level; RTO optimization can be highly fluctuating depending on when the extra product is augmented with relevant costs and solved over a longer Planning The cost of production can fluctuate due various reasons, viz. contractual terms especially caused byto the cost Planning in in the the RTO RTO level; level; RTO RTO optimization optimization can can be be produced. produced. The cost of production can fluctuate due to various augmented with relevant costs and solved over a longer produced. The cost of production can fluctuate due to various horizon. augmented viz.and contractual termsInespecially by the cost augmented with with relevant relevant costs costs and and solved solved over over aa longer longer reasons, of utilities raw material. this workcaused a methodology is reasons, horizon. reasons, viz. viz. contractual contractual terms terms especially especially caused caused by by the the cost cost horizon. of utilities and raw material. In this work a methodology isa horizon. presented to account for changing production cost over of utilities and raw material. In this work a methodology Business of utilities and raw material. In this work a methodology is is presented to account for changing production cost over aa longer horizon, while deciding on the inventory levels. presented to account for changing production cost over Planning Business presented to account for changing production cost over a Business Business longer horizon, while deciding on the inventory levels. Another important factor which changes the cost of longer horizon, while deciding on the inventory levels. Planning Planning longer horizon, while deciding on the inventory levels. Planning Production Another important changes cost of production is that thefactor RTO iswhich performed over the a system Another Another important important factor factor which which changes changes the the cost cost of of Scheduling Production production is that the RTO is performed over aacosts system of plants, which means each plant has its individual which Production production is that the RTO is performed over system Production production is that the RTO is performed over a system of of Scheduling Scheduling plants, which means each plant has its individual costs which varies depending on the efficiency. So in this work two plants, which means each plant has its individual costs which Scheduling Real-Time plants, which means each plant has its individual costs which varies depending efficiency. thisii)work decisions are madeoni) the which asset toSo useinand whentwo to varies Optimization Real-Time varies depending depending on on the the efficiency. efficiency. So So in in this this work work two two Real-Time Real-Time decisions are made i) which asset to use and ii) when to produce, to capture two levels of optimization. Rawlings and decisions are made i) which asset to use and ii) when Optimization Optimization decisions are made i) which asset to use and ii) when to to Optimization produce, to capture two levels of optimization. Rawlings and Amrit, 2009 have proposed combining RTO and MPC level produce, Model Predictive Control produce, to to capture capture two two levels levels of of optimization. optimization. Rawlings Rawlings and and Amrit, 2009 proposed combining RTO similarly and MPC by using an have economic objective function, inlevel the Amrit, Model Model Predictive Predictive Control Control Amrit, 2009 2009 have have proposed proposed combining combining RTO RTO and and MPC MPC level level Model Predictive Control by using an economic objective function, similarly in the current work, decision on inventory level is made within by by using using an an economic economic objective objective function, function, similarly similarly in in the the Regulatory Control current on inventory is made within RTO bywork, using decision an economic objective level function valid over a current work, decision on inventory level is made within current work, decision on inventory level is made within Regulatory Control RTO by using an economic objective function valid over a Regulatory Control longer horizon. RTO by using an economic objective function valid over Regulatory Control RTO by using an economic objective function valid over aa longer horizon. longer horizon. Figure 1: Different Levels of Optimization longer horizon. Xenos et al., 2015, have proposed an integrated RTO scheme Figure 1: 1: Different Different Levels Levels of of Optimization Optimization Xenos et al., 2015, have proposed an integrated RTO scheme for a network of compressors, whereby they decide solve Figure Xenos Figure 1: Different Levels of Optimization Xenos et et al., al., 2015, 2015, have have proposed proposed an an integrated integrated RTO RTO scheme scheme for aa network whereby decide solve load sharing of for compressors, each compressor inthey short-term and for network of compressors, whereby they decide for a network of compressors, whereby they decide solve solve sharing each compressor in short-term and In the current work RTO is used to make decisions on plant load scheduling andfor planning in long-term. The integration load sharing for each compressor in short-term load sharing for each compressor in short-term and and In the current work RTO used to decisions plant production rates given a is system of make multiple plants on making scheduling and planning in long-term. The integration scheme solves two separate optimization problems for short In the current work RTO is used to make decisions on plant scheduling and planning in long-term. The integration In the current work RTO is used to make decisions on plant scheduling and planning in long-term. The integration production rates given a system of multiple plants making scheme solves two separate optimization problems for short production production rates rates given given aa system system of of multiple multiple plants plants making making scheme scheme solves solves two two separate separate optimization optimization problems problems for for short short
Copyright © 2015, 2015 IFAC 229Hosting by Elsevier Ltd. All rights reserved. 2405-8963 © IFAC (International Federation of Automatic Control) Copyright ©under 2015 responsibility IFAC 229 Peer review© of International Federation of Automatic Copyright 2015 IFAC 229Control. Copyright © 2015 IFAC 229 10.1016/j.ifacol.2015.08.186
IFAC ADCHEM 2015 230 June 7-10, 2015. Whistler, BC, Canada
Divya Kumar et al. / IFAC-PapersOnLine 48-8 (2015) 229–233
and long-term.
week depending on the type of system, however it stays constant for a given system.
Section 2 describes the problem in detail and develops the objective function to combine the two levels of optimization in order to decide on the inventory levels. Section 3 and 4 discusses the impact of marginal production cost on inventory and how the modified objective function results in reducing the long term marginal costs.
Another key aspect of evaluating the objective function is the plant models; which relates the amount of raw materials and utility is required to run the each of the plant 𝑖𝑖 at 𝐹𝐹𝑖𝑖 (𝑘𝑘). These plant models can be developed either once or updated in realtime parallel to the RTO.
2. PROBLEM DESCRIPTION
2.2 RTO with inventory Decision
2.1 System of Plants
In Eq. 1, the system of plants is producing at the level of daily target, however if there is a sudden change in the target which is impossible to meet even if all the plants run at maximum capacity. In that scenario, it becomes important to decide on the inventory levels. In order to decide on these levels cost related to developing the inventory needs to be included in Eq. 1. If the inventory is decided to be increased by some level 𝛥𝛥𝛥𝛥 in the entire prediction horizon, 𝑝𝑝, then the cost of using the inventory can be shown as follows:
Consider a system of plants and each plant produces same product 𝑃𝑃𝑃𝑃𝑗𝑗 , represented by 𝑃𝑃𝑖𝑖 , 𝑖𝑖 ∈ [1,2, … , 𝑛𝑛𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 ]. It is important these plants meet daily and weekly production targets set by business personal, possibly arising from a higher level of optimization. In order to meet these in optimal way, a RTO is used to decide how much to produce at each plant given their minimum and maximum capacities. The objective here can be either to maximize revenue or minimize cost. In most cases, lets consider the objective is to minimize cost, then the problem becomes as follows: 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝_𝑐𝑐𝑐𝑐𝑝𝑝𝑝𝑝
𝑖𝑖=1
𝑗𝑗=1
min � � 𝑃𝑃𝑃𝑃𝑃𝑃𝑛𝑛𝑃𝑃 𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃𝑖𝑖 +
𝐹𝐹𝑖𝑖 (𝑘𝑘)
Subject to
�
𝑃𝑃𝑃𝑃𝑛𝑛𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃𝑗𝑗 �
𝐼𝐼𝑛𝑛𝐼𝐼𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃 = ����� 𝑀𝑀𝑃𝑃 ∗ 𝛥𝛥𝛥𝛥 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑝𝑝 𝛥𝛥𝛥𝛥 = ∑𝑘𝑘=1 ∑𝑖𝑖=1 (𝐹𝐹𝑖𝑖 (𝑘𝑘) − 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝 (𝑘𝑘)) 𝐶𝐶𝐶𝐶 𝛥𝛥𝛥𝛥 = 𝛥𝛥𝑓𝑓 − 𝛥𝛥𝑖𝑖
(1)
����� is the historical average marginal cost of where, 𝑀𝑀𝑃𝑃 developing the inventory in the past 𝑛𝑛𝑀𝑀𝑀𝑀 , days, and 𝛥𝛥𝛥𝛥 is result of change in final and initial volume of the inventory 𝛥𝛥𝑓𝑓 and 𝛥𝛥𝑖𝑖 respectively. Inventory cost really represents the cost of building the inventory, however the effect of this cost is different depending on whether the inventory is being depleted or filled. Then Eq. 1 can be augmented with 5, leading to 6, where 𝛥𝛥𝑓𝑓 is bounded by 𝛥𝛥𝑚𝑚𝑖𝑖𝑖𝑖 and 𝛥𝛥𝑚𝑚𝑝𝑝𝑚𝑚 .
𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
� 𝐹𝐹𝑖𝑖 (𝑘𝑘) = 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝 (𝑘𝑘) ∀𝑘𝑘 = 𝑖𝑖=1
𝐹𝐹𝑚𝑚𝑖𝑖𝑖𝑖 ≤ 𝐹𝐹𝑖𝑖 ≤ 𝐹𝐹𝑚𝑚𝑝𝑝𝑚𝑚
|𝐹𝐹𝑖𝑖 (𝑘𝑘) − 𝐹𝐹𝑖𝑖 (𝑘𝑘 − 1)| ≤ Δ𝐹𝐹𝑚𝑚𝑝𝑝𝑚𝑚
[1,2,3 … 𝑝𝑝]
(5)
(2)
(3) (4)
min
Where, 𝑃𝑃𝑃𝑃𝑃𝑃𝑛𝑛𝑃𝑃 𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃𝑖𝑖 is material and utility cost and 𝑃𝑃𝑃𝑃𝑛𝑛𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃𝑗𝑗 is a term to account for some of the soft constraints, especially ramp constraints, 𝐹𝐹𝑖𝑖 (𝑘𝑘) is production rate at each plant 𝑖𝑖 bounded by 𝐹𝐹𝑚𝑚𝑖𝑖𝑖𝑖 and 𝐹𝐹𝑚𝑚𝑝𝑝𝑚𝑚 , and sum all the production 𝐹𝐹𝑖𝑖 (𝑘𝑘) should meet the daily target 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝 , 𝑘𝑘 is the time step in the prediction horizon 𝑝𝑝, which is a constant, 𝛥𝛥𝐹𝐹𝑚𝑚𝑝𝑝𝑚𝑚 is the maximum allowable change in production rate at every plant. Thus the daily production target is a combined set-point for the system of plants and it should be satisfied at every time step 𝑘𝑘 in the prediction horizon 𝑝𝑝. Above optimization (1) can easily be changed to include discrete decision variables to account for equipment switch on/off. However in the current formulation discrete variables have been ignored. Current formulation also assumes that if a plant is on then it should atleast run at the minimum rate and that the optimizer does not have the option to turn on/off the plant. The solution of Eq. 1, is expected to run the cheaper plants first and then the more expensive plants. However due to the minimum rate constraint (Eq. 3) even the more expensive plant will be producing some part of the product. Currently the order of 𝑘𝑘 varies between 15-60 minutes and 𝑝𝑝 varies between 24 h to 1
𝐹𝐹𝑖𝑖 (𝑘𝑘), 𝑉𝑉𝑓𝑓
𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
� 𝑃𝑃𝑃𝑃𝑃𝑃𝑛𝑛𝑃𝑃 𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃𝑖𝑖 +
𝑖𝑖=1 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑐𝑐𝑐𝑐𝑝𝑝𝑝𝑝
� 𝑗𝑗=1
Subject to
𝑃𝑃𝑃𝑃𝑛𝑛𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃𝑗𝑗 − ����� 𝑀𝑀𝑃𝑃 ∗ (Vf − 𝛥𝛥𝑖𝑖 )
𝛥𝛥𝑚𝑚𝑖𝑖𝑖𝑖 ≤ 𝛥𝛥𝑓𝑓 ≤ 𝛥𝛥𝑚𝑚𝑝𝑝𝑚𝑚 , 𝐸𝐸𝐸𝐸. 2 − 4
(6)
(7)
In eq. 6, if 𝛥𝛥𝑓𝑓 increases at the end of prediction horizon, then the cost of producing extra volume in the prediction horizon is already included in the ∑ 𝑃𝑃𝑃𝑃𝑃𝑃𝑛𝑛𝑃𝑃 𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃𝑖𝑖 and ∑ 𝑃𝑃𝑃𝑃𝑛𝑛𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃𝑗𝑗 , and inventory cost represents the cost of building the inventory in past, however the inventory is being built in present. The effect of inventory cost is to compare the current marginal cost 𝑀𝑀𝑃𝑃 with historical average of marginal ����� ∗ 𝛥𝛥𝛥𝛥. If the optimizer decides to fill the inventory, cost, 𝑀𝑀𝑃𝑃 �����, and this then the current marginal cost is lower than 𝑀𝑀𝑃𝑃 results in reducing the objective function. Similarly if the optimizer decides to lower the inventory then it is purely done because currently it is expensive to build the inventory. This behaviour is shown in Figure 2, where point A ����� and point C represents represents when 𝑀𝑀𝑃𝑃 < 𝑀𝑀𝑃𝑃 when 𝑀𝑀𝑃𝑃 > ����� 𝑀𝑀𝑃𝑃 . Point B represents the scenario when ����� in the prediction horizon, 𝑝𝑝. 𝑀𝑀𝑃𝑃~𝑀𝑀𝑃𝑃 230
IFAC ADCHEM 2015 June 7-10, 2015. Whistler, BC, Canada
Divya Kumar et al. / IFAC-PapersOnLine 48-8 (2015) 229–233
231
𝑘𝑘 − 1, can be used to determine perturbation size at current time step, Δ𝑃𝑃𝑃𝑃𝑘𝑘 . In this case, the solution for inventory change Δ𝛥𝛥𝑘𝑘−1 from Problem 6 is used to determine the perturbation for 𝑀𝑀𝑃𝑃 calculation, as shown in 9, where Δt is the length of prediction horizon 𝑝𝑝 as Δ𝛥𝛥 is the inventory change over the prediction horizon 𝑝𝑝. This removes the problem of discontinuity as 𝛥𝛥𝑃𝑃𝑃𝑃𝑘𝑘 allows to calculate marginal price averaged over the expected change in inventory. 𝑀𝑀𝑃𝑃 =
𝐶𝐶2 − 𝐶𝐶1 , 𝛥𝛥𝑃𝑃𝑃𝑃 ∗ 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝
(9)
𝛥𝛥𝑃𝑃𝑃𝑃𝑘𝑘 ∗ 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝 = 𝛥𝛥𝛥𝛥𝑘𝑘−1
Figure 4 shows the highly fluctuating behaviour of 𝑀𝑀𝑃𝑃 over time.
Figure 2: Effect of Marginal Price on Inventory Levels
3. ADVANTAGES OF INCLUDING MARGINAL COST
2.3 Marginal Price Calculation
As we discussed previously, when past averaged unit marginal cost is higher than current marginal cost, optimizer will try to produce more liquid for the next 𝑇𝑇 time buckets since liquid production is cheaper compared to previous time. However, if current marginal cost is higher than averaged historical marginal cost, optimizer will try to reduce liquid production for the next 𝑇𝑇 time buckets. Therefore theoretically over long term, this continuous optimization by including marginal cost will drive the averaged marginal cost decrease until stabilized at the optimal value, which means we could obtain lower unit production cost by this way.
MP. To Performance of Problem 6 is very sensitive to ���� determine ���� MP a naïve approach can be used, whereby the production target 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝 , is perturbed by Δ𝑃𝑃𝑃𝑃 ∗ 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝 , (where Δ𝑃𝑃𝑃𝑃 is the % of change from 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝 ), in Eq. 1 which results in optimal cost 𝐶𝐶2 . Then if 𝐶𝐶1 represents the cost without perturbation and Δ𝑃𝑃𝑃𝑃 is fixed as 10% or 20% of 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝 (𝑘𝑘), Current Marginal Cost 𝑀𝑀𝑃𝑃 can be computed as follows: 𝐶𝐶2 − 𝐶𝐶1 𝛥𝛥𝑃𝑃𝑃𝑃 ∗ 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖𝑖𝑖𝑛𝑛𝑝𝑝𝑝𝑝𝑡𝑡𝑡𝑡𝑡𝑡𝑝𝑝
(8)
𝑝𝑝𝑀𝑀𝑀𝑀
Current Marginal Cost ($/Unit)
𝑀𝑀𝑃𝑃 =
����� 𝑀𝑀𝑃𝑃 = � 𝑀𝑀𝑃𝑃𝑖𝑖 , 𝛥𝛥𝑃𝑃𝑃𝑃 = 10% 𝐶𝐶𝐶𝐶 20% 𝑖𝑖=1
Marginal Cost, MP, ($/Unit)
When 𝑀𝑀𝑃𝑃 is computed using fixed perturbation method, it is observed that this results in discontinuous first-order derivative as shown in Figure 3. Points A and B in Figure 3 are points of discontinuity for first-order derivative.
Utilizing this point for Perturbation size, based on previous RTO solution
$40/Unit
Time t,
A
days
����� over past 𝒏𝒏𝑴𝑴𝑴𝑴 days Figure 4: 𝑴𝑴𝑴𝑴
Take a simple case as an example to illustrate this point. A simplified objective for optimization including marginal cost will be:
B MP = 0 -1%
$100/Unit
1%
5%
min 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃 ∗ 𝐶𝐶𝑃𝑃𝑃𝑃𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃 − (𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃 − 𝐷𝐷𝐷𝐷𝑃𝑃) ∗ 𝐴𝐴𝐼𝐼𝐴𝐴𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶
10%
= min 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃 ∗ (𝐶𝐶𝑃𝑃𝑃𝑃𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃 − 𝐴𝐴𝐼𝐼𝐴𝐴𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶) + 𝐷𝐷𝐷𝐷𝑃𝑃 ∗ 𝐴𝐴𝐼𝐼𝐴𝐴𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶
ΔPr, Perturbation Size (-10% to 10%) Figure 3: Marginal Cost 𝑴𝑴𝑴𝑴 vs Perturbation Size 𝚫𝚫𝑴𝑴𝑷𝑷
(10)
Where 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃 is the decision variable of production amount, 𝐷𝐷𝐷𝐷𝑃𝑃 is customer demand, 𝐶𝐶𝑃𝑃𝑃𝑃𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃 is the calculated current marginal cost value, and 𝐴𝐴𝐼𝐼𝐴𝐴𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 is past averaged marginal cost. Given the range for decision variable 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃 is [0, 200], this monotonic function without any constraint will force
As a result, the naïve approach is modified to remove the discontinuities. If the demand and plant conditions do not change significantly between successive optimizer runs, then it is safe to assume that the solution at previous time step 231
IFAC ADCHEM 2015 232 June 7-10, 2015. Whistler, BC, Canada
Divya Kumar et al. / IFAC-PapersOnLine 48-8 (2015) 229–233
decision variable either goes to its upper bound 200 or its lower bound 0. Two simple cases of this optimization are shown in Table 1 and Table 2. Case A illustrates the optimization, when initial averaged marginal cost is higher than current marginal cost, and due to optimization the averaged marginal cost drops over the Time Bucket 𝑇𝑇.
additional constraints, such as tanks redline or a max capacity constraint, which means optimizer, cannot always select the upper bound or lower bound value. However, over long term optimization, the averaged marginal cost will decrease until stabilized at certain point.
Case A: initial averaged cost is 120$/Unit, initial tank inventory is 800Unit, the target demand is 100Unit, and optimization is started when averaged marginal cost is higher than current marginal cost. With the above mentioned objective, optimal production amount will be either 200 when current production cost is lower than averaged marginal cost; or 0 when current production cost is higher than averaged marginal cost. Therefore over several time buckets, the averaged marginal cost is decreasing, which mean the unit cost of product is decreasing.
4. OPTIMIZATION WITH MARGINAL COST FORECAST A further extension for optimization with marginal cost is to include long term marginal cost forecasting into short term operation optimization. As shown in Figure 5, operational level optimization is in daily interval, and optimization horizon is one week. We can calculate daily instant production cost over time, shown as purple line. After certain time periods, weekly averaged marginal cost could be calculated, shown as green line. With enough historical weekly averaged data, future weekly production cost could be forecasted by ARIMA model or simple moving average (MA) approach. The forecasted future weekly production cost can
Table 1: Case A. Initial Averaged Marginal Cost > Current Marginal Cost Time Bucket Target Demand (Unit) Current Cost ($/Unit) Averaged Cost ($/Unit) Optimal Production (Unit) Tank Inventory (Unit)
1 100
2 100
3 100
4 100
5 100
6 100
7 100
110
105
98
99
98
120
110
119
118
116
114
113
113
112
200
200
200
200
200
0
200
900
1000
1100
1200
1300
1200
1300
Case B: initial averaged cost is 90$/Unit, initial tank inventory is 800Unit, the target demand is 100Unit, and we start the optimization when averaged marginal cost is lower than current marginal cost. Similarly, optimal production amount will be either 200 when current production cost is lower than averaged marginal cost; or 0 when current production cost is higher than averaged marginal cost; or pick a random number (here we use 100unit) when current marginal cost is equal to averaged marginal cost. Similar with Case A, averaged marginal cost is decreasing over several time buckets too.
Figure 5: Marginal Cost Forecast using time series models serve as an input parameter to daily operational optimization, which could help making decision whether daily operation should build or decrease inventory. A modified optimization objective is illustrated below, where the forecasted weekly marginal cost is added into this objective to make the right decision whether daily production should build or decrease inventory. When forecasted marginal cost of next week or even more future is higher than current production cost, optimizer will suggest building the inventory to save the long term cost, and vice versa. This type of approach has been used by Singh et al., 2000 where forecasted values of the feedstock properties are used to optimize for gasoline blending operations.
Table 2: Case B. Initial Averaged Marginal Cost < Current Marginal Cost Time Bucket Target Demand (Unit) Current Cost ($/Unit) Averaged Cost ($/Unit) Optimal Production (Unit) Tank Inventory (Unit)
1 100
2 100
3 100
4 100
5 100
6 100
7 100
110
105
98
90
92
120
110
90
90
90
90
90
90
90
0
0
0
100
0
0
0
700
600
500
500
400
300
200
min 𝑃𝑃𝑃𝑃𝐶𝐶𝑃𝑃 ∗ 𝐶𝐶𝑃𝑃𝑃𝑃𝐶𝐶𝐶𝐶𝐶𝐶𝑃𝑃 − 𝐷𝐷𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 ∗ 𝑁𝑁𝑃𝑃𝑁𝑁𝑃𝑃𝑁𝑁𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃
(11)
Similar with what we discuss for including the past averaged marginal cost into optimization, this could also drive the averaged production cost drop over even longer term. 5. CONCLUSIONS In the current work it is proposed to account for some of the long-term decisions of Production Scheduling and Planning at the RTO level. RTO level objective function is augmented with costs from longer-horizon and this type of a model is applied to a RTO deciding on production rates for plants along with inventory levels (higher level optimization). The
These two simple cases clearly illustrate that optimization with marginal cost will drive the averaged production cost decrease over long term optimization until stabilized at certain value. Although in the real condition, there may be 232
IFAC ADCHEM 2015 June 7-10, 2015. Whistler, BC, Canada
Divya Kumar et al. / IFAC-PapersOnLine 48-8 (2015) 229–233
proposed objective function results in comparing the current marginal cost and historical average of marginal cost, which drives the overall long-term production cost to a lower value.
REFERENCES Darby, M.L., Nikolaou, M., Jones, J. & Nicholson, D. 2011. Rto: An overview and assessment of current practice. Journal of Process Control, 21, 874-884. Rawlings, J. & Amrit, R. 2009. Optimizing process economic performance using model predictive control. In: Magni, L., Raimondo, D. & Allgöwer, F. (eds.) Nonlinear model predictive control. Springer Berlin Heidelberg. Singh, A., Forbes, J.F., Vermeer, P.J. & Woo, S.S. 2000. Model-based real-time optimization of automotive gasoline blending operations. Journal of Process Control, 10, 43-58. Xenos, D.P., Cicciotti, M., Kopanos, G.M., Bouaswaig, A.E.F., Kahrs, O., Martinez-Botas, R. & Thornhill, N.F. 2015. Optimization of a network of compressors in parallel: Real time optimization (rto) of compressors in chemical plants – an industrial case study. Applied Energy, 144, 51-63.
233
233