| Algorithm 4 System time allocation scheme | |
| 1: | Input:, precision |
| 2: | Output:, , |
| 3: | for all do |
| 4: | switch TD mode do |
| 5: | case: TDMA |
| 6: | . |
| 7: | . |
| 8: | case: FDMA |
| 9: | . |
| 10: | . |
| 11: | end switch |
| 12: | Apply Algorithm 3 to find out optimal for . |
| 13: | Compute according to Equation (10) and Constraint 4 of problem P2. |
| 14: | end for |
| 15: | Find out and the corresponding , . |
| 16: | END |