| Algorithm 3 Find optimal | |
| 1: | Input:, , , W, , , , , , , K, T, , and , precision . |
| 2: | Output: |
| 3: | Compute . |
| 4: | Apply Algorithm 1 to find out . |
| 5: | Apply Algorithm 2 to find out . |
| 6: | whiledo |
| 7: | if then |
| 8: | . |
| 9: | else |
| 10: | . |
| 11: | end if |
| 12: | . |
| 13: | Apply Algorithm 1 to find out . |
| 14: | Apply Algorithm 2 to find out . |
| 15: | end while |
| 16: | . |
| 17: | END |