# Scheduling Control (B)

+ High-space-ratio and low-space-ratio


![left](./student-guide/diagram/25-Generate-speed-control-02-01.png)

------------------------------------------------------------

High-space-ratio and low-space-ratio

PD's balanced scheduling strategy is mainly to calculate a score for each store, and then generate a schedule according to the score, so that the score of each store is as average as possible. Assuming that the storage size of each store is the same, we can calculate a score based on the size of the region, so that the space used by each store is balanced. But we can't guarantee that each store will have the same amount of storage space. Therefore, high-space-ratio and low-space-ratio are the two thresholds used to divide storage space usage.

PD's score calculation is a segmentation function, and the segment point is on these two thresholds. For example, if the high-space-ratio is 0.6, it means that when the remaining space is more than 40%, it is a high space. In this case, PD does not consider the size of the remaining space when calculating the score. For low space, assume that the low-space-ratio is 0.8, which means that when the remaining space is less than 20%, it is low space. At this time, the calculation score takes into account the size of the remaining space. For cases where the remaining space is less than 40% and greater than 20%, the fraction is calculated by directly calculating a linear function from the above two segment points.
