# Efficient Dynamic Cost Scheduling Algorithm for Financial Data Supply Chain
## 3 Data Batch Algorithm
### Dynamic Cost Scheduling Algorithm for Data Batch Processing (DCSDBP)
#### 3.1.4 Problem Decision Variables
Looking at Equations (29) and (31), the decision to rent an additional processor is based on another criterion. \(D\) was introduced which, as per Equation (29), ensures that no extra processor shall be rented unless there is an available task ready to be allocated to it. This ensures that no additional processor will be rented unless it will be used. Step 5: Update the Availability of FilesEach data file processing parameter is incremented by the number of times it was processed. When a file is fully processed, then it is removed from the subset for the following time unit and the rest of the process. Update \(f_{i}^{T}\) Matrix:  
\[\sum_{i=1}^{I^{\prime}}X_{ik}^{T}\leq P_{k}^{T}\ \forall\ k\in K \tag{14}\]2  
If  
\[\sum_{i=1}^{I^{\prime}}X_{ik}^{T}\leq P_{k}^{T}\ \forall\ k\in K \tag{14}\]3  
Then  
\[\sum_{i=1}^{I^{\prime}}X_{ik}^{T}\leq P_{k}^{T}\ \forall\ k\in K \tag{14}\]4  
Else  
\[\sum_{i=1}^{I^{\prime}}X_{ik}^{T}\leq P_{k}^{T}\ \forall\ k\in K \tag{14}\]5  
And  
\[\sum_{i=1}^{I^{\prime}}X_{ik}^{T}\leq P_{k}^{T}\ \forall\ k\in K \tag{14}\]6  
If  
\[\sum_{i=1}^{I^{\prime}}X_{ik}^{T}\leq P_{k}^{T}\ \forall\ k\in K \tag{14}\]7  
Then  
\[\sum_{i=1}^{I^{\prime}}X_{ik}^{T}\leq P_{k}^{T}\ \forall\ k\in K \tag{14}\]8  
And  
\[\sum_{i=1}^{I^{\prime}}X_{ik}^{T}\leq P_{k}^{T}\ \forall\ k\in K \tag{14}\]9  
This step will update the file availability to determine if any file needs further processing or all files are completed. Step 6: Check Termination Condition  
When all files are processed, then the algorithm shall stop, else the model will go to step 7. If  
\[\sum_{i=1}^{I^{\prime}}Y_{ir}^{T}\leq W_{r}^{T}\ \forall\ r\in R \tag{15}\]0  
Then  
Stop. If  
\[\sum_{i=1}^{I^{\prime}}Y_{ir}^{T}\leq W_{r}^{T}\ \forall\ r\in R \tag{15}\]1  
Then  
\[\sum_{i=1}^{I^{\prime}}Y_{ir}^{T}\leq W_{r}^{T}\ \forall\ r\in R \tag{15}\]2  
Else  
\[\sum_{i=1}^{I^{\prime}}Y_{ir}^{T}\leq W_{r}^{T}\ \forall\ r\in R \tag{15}\]3  
Step 7: Update Clock  
Increment iteration clock by one time unit until the DCSDBP algorithm allocates all files. \[\sum_{i=1}^{I^{\prime}}Y_{ir}^{T}\leq W_{r}^{T}\ \forall\ r\in R \tag{15}\]4  
Go to Step 2  
Steps 2 through 7 of the DCSDBP will be repeated until all tasks are allocated to available resources and there are no more jobs waiting in the queue. The Total batch process cost is updated as follows:  
\[ \begin{split} TBC&=(C_{sf}+C_{h})*K+\sum\limits_{T=1}^{ END}\sum\limits_{i=1}^{t^{T}T}\sum\limits_{k=1}^{K}C_{sv}*X_{ik}^{T}\\ &+\sum\limits_{T=1}^{BW}\sum\limits_{i=1}^{WT}\sum\limits_{k=1}^{ K}\frac{(C_{sf}+C_{h})*(1-X_{ik}^{T})}{BW}*(1-X_{ik}^{T})\\ &+\sum\limits_{r=1}^{V}(C_{esf}+C_{ch})(END-T^{r})+\sum\limits_{ T=1}^{END}\sum\limits_{i=1}^{t^{T}T}\sum\limits_{r=1}^{V}C_{esv}*Y_{ir}^{T}\\ &+\sum\limits_{r=1}^{V}\sum\limits_{i=1}^{t^{T}T}\sum\limits_{T= T^{r}}^{END}(C_{esf}+C_{eh})(1-Y_{ir}^{T})+A^{END}*Cp*(T^{END}- SLA)\end{split}  \tag{46}\]  
The total cost and the completion time will be calculated at the end of the DCSDBP algorithm. The total batch process cost (C) = leased processors fixed hardware cost + leased processors variable software cost + leased processors opportunity cost + rented processors variable software cost + rented processors variable software cost + rented processors hardware cost + rented processors opportunity cost + penalty cost.