For each decision
If decision is not eliminated
Get value of source region's quantity point from region maintenance table
If (number of items in source region is greater than 0)
Get the value of destination region quantity point from region maintenance
If the number of items in destination region is greater than 0
Calculate maximum source cost as follows
Set nMaxSrcCost to the number of items in source region of decision #0
For each decision from 1 to last
If (Number of items in current region > nMaxSrcCost)
Set nMaxSrcCost to number of items in region
End If
Next decision
Set nWeight to current decision weight
Calculate the load as follows:
Load = (nMaxSrcCost - # of items in source region)
+ Current Decision weight
+ number of items in destination region
End if // number of items in destination region > 0
End if // number of items in source region > 0
If (Load is >= specified Threshold Value)
Eliminate the decision
End if
End if
Next For
Balance load. |