# Efficient Dynamic Cost Scheduling Algorithm for Financial Data Supply Chain
## 4 Illustrative Example  
In this section, we present a numerical example to illustrate the proposed DCSDBP algorithm. Consider a network of 15 data files with the precedence relations as shown in Figure 3.  
The precedence relationships are fixed relationships provided by the client that the service provider must use in processing the files; therefore, there cannot be any deadlocks relation. Table 1 presents the different parameters' values; these values are either given directly such as file's multiprocessing _ei_, processing time _ni_ and priority _gi_, or derived from the files precedence relation such as file's weight _ai'T_ and precedence parameter _LijT_. The following data were also used: there are two available leased processors; maximum number of available processors than can be rented is 5, _SLA_ = 18 time units; batch window  
Figure 3: Illustrative example. BW = 22 time unit; leased processor fixed software cost \(\mathit{Csf}=\$10\); leased processor hardware cost \(\mathit{Ch}=\$100\); leased processor variable software cost per time unit \(\mathit{Csv}=\$2\); rented processor fixed software cost \(\mathit{Csf}=\$12.5\); rented processor Hardware Cost \(\mathit{Ch}=\$125\); rented processor variable software cost per time unit \(\mathit{Ccsv}=\$2.5\); penalty cost per time unit in case of exceeding the \(\mathit{SLA}\) is \(\mathit{Cp}=\$200\). The algorithm was programmed using LINGO 15.0 x64. The Lingo output shows that the files were processed in 20 time units, while 4 extra processors were rented, and the batch process exceeded the \(\mathit{SLA}\) by 2 time units, which indicates that penalty cost was imposed. Once the batch process started, the program sets all initialization conditions, which means that ready files subset \(\mathit{I}^{T}\) is empty. At the beginning of each time unit \(T\), the precedence parameters \(\mathit{I}^{T}_{ij}\) for all files are checked to determine which files are ready to be processed. All files having precedence parameter \(\mathit{I}^{T}_{ij}=1\) are considered ready and inserted to the ready files subset \(\mathit{I}^{T}\). It is worth mentioning that files 0 and 16 are start and end files with processing time \(n_{i}=0\) which means they won't be allocated to any processor. The reason of their existence is to start and end the network for critical path calculation purposes. The algorithm started at \(T=0\) with files 1, 2, 3, 4, 6, 9, and 10 ready for processing; therefore, they were inserted into the ready files subset \(\mathit{I}^{tT}\). At \(T=0\) files 4 and 6 were processed by leased processor 2 and 1 respectively because these files have the highest calculated weight \(\alpha_{i}^{T=0}\) and predetermined priority \(\beta_{i}\) while the rest of ready files were shifted for the next time unit. At \(T=1\), the values of precedence parameter \(\mathit{I}^{T}_{ij}\) are updated for all files, so the ones that have not been processed or not finished processing still have the value of 1 and are consequently still included in the ready files subset \(\mathit{I}^{T}\) while file 6 which has a processing time \(n_{i}\) of 1 has the value of \(\mathit{I}^{T}_{ij}=\)0 and no longer exist in the subset \(\mathit{I}^{T}\) since it is considered ready. Also, an additional processor \(V^{T}\) was rented and utilized at that time unit because the criteria of renting a new processor was satisfied. It was found that the critical path of the remaining network activities exceeds the \(\mathit{SLA}\), so the program needs to take an action to try to avoid the delay. The decision of renting a new processor is made since the cost of renting a new processor \(\mathit{TH}\) was found to be less than the penalty cost \(\mathit{TCp}\) at that time unit and also since there are ready files for the next time unit that exceeds the total number of available processor. During \(T=1\) file 4 was processed by leased processors 1 and 2, as well as by the additionally rented processor 1. At \(T=2\) another additional processor was rented based on the above-explained mechanism.