• 沒有找到結果。

This appendix describes a discrete event simulation model for the BRP scheme. Three types of input parameters are considered in the simulation model.

System Parameter: There are C channels in the MSC.

Traffic Parameters: The CS call arrivals to the MSC form a Poisson stream with rate λ. We assume that all calls are VCC calls. The expected call holding time is 1/µ with variance Vc.

Mobility Parameter: The expected domain residence time for each domain is 1/δ with variance Vd.

In our simulation model, the following attributes are defined for an event.

• The type attribute indicates the event type. An Arrival event represents a VCC CS call arrival (i.e., a high-priority call arrival in the MSC). A CS2PS event represents that a VCC CS call switches to the PS domain. A PS2CS event represents that a VCC PS call switches back to the CS domain. A Completion event represents a call completion.

• The callId attribute specifies the ID of the call.

• The priority attribute indicates high-priority (with value 1) or low-priority (with value 0). This attribute is used in a Completion event.

• The tc attribute indicates the remaining call holding time.

• The td attribute indicates the domain residence time in the current domain.

All events are inserted into the event list, and are deleted/processed from the event list in the non-decreasing timestamp order. A simulation clock is maintained to indicate the simulation progress, which is the timestamp of the event being processed.

In this simulation model, the Nl counter records the number of low-priority calls in the MSC, and the Nc counter records the number of available channels in the MSC. The output measures of the simulation are the total number N of PS2CS events, the total number Nr of CS bearer re-establishments and the total number Nf of force-terminations.

From the above output measures, we compute

pf = Nf/N, pr = Nr/N, and ¯pn= pf + pr (A.1)

The simulation model uses a queue LQueue to maintain the low-priority calls in the MSC.

When a CS2PS event occurs (i.e., the VCC CS call becomes low-priority at the MSC), the callId attribute of this event is inserted at the tail of LQueue. If an Arrival event occurs when Nc = 0 and Nl > 0, according to the First-Come-Last-Preempted rule, the callId at the tail of LQueue is deleted (i.e., the high-priority call arrival preempts a low-priority call).

Figure A.1 illustrates the simulation flow chart for the BRP scheme. In this flow chart, Step 1 initializes the parameters. Step 2 generates the first Arrival event h where h.priority = 1 and this event is inserted into the event list. At Steps 3 and 4, the first event e in the event list is processed based on its type described as follows:

Arrival: Step 5 generates the next Arrival event f where f.priority = 1 and inserts it into the event list. Step 6 checks whether Nc > 0 (i.e., there is available channel in the MSC). If so, Nc is decremented by one at Step 7 (i.e., this CS call occupies a channel in the MSC). Otherwise, Step 8 checks whether Nl > 0 (i.e., there exists a

Start and insert it into the event list

No

generate the next Arrival event f where f.priority =1 and

Figure A.1: Simulation Flow Chart for the BRP Scheme

low-priority call for preemption in the MSC). If so, the callId at the tail of LQueue is deleted, and Nl is decremented by one at Step 9 (i.e., the last-coming low-priority call is preempted). Finally, if Nc > 0 at Step 6 or Nl > 0 at Step 8 (i.e., a channel is available), Step 10 compares the remaining call holding time e.tc and the domain residence time e.td. If e.tc < e.td (this call completes before it switches to the PS domain), Step 11 generates a Completion event g where g.priority = 1 for this high-priority call completion, and inserts it into the event list. Otherwise, Step 12 generates a CS2PS event h where h.tc = e.tc - e.td and h.priority = 0, and inserts it into the event list.

CS2PS: Step 13 inserts e.callId at the tail of LQueue, and increases Nlby one. If e.tc <

e.td at Step 14, then Step 15 generates a Completion event g where g.priority = 0 for this low-priority call completion, and inserts it into the event list. Otherwise, Step 16 generates a PS2CS event h where h.tc = e.tc - e.td and h.priority = 1, and inserts it into the event list.

PS2CS: N is incremented by one at Step 17. If e.callId exists in LQueue at Step 18 (i.e., the reserved CS bearer is still available), then Step 19 deletes e.callId from LQueue, and Nl is decremented by one. Otherwise, Step 20 checks whether Nc > 0. If so, Nr

is incremented by one, and Nc is decremented by one at Step 21 (i.e., the CS bearer is re-established). If Nc = 0 at Step 20, Step 22 checks whether Nl > 0. If so, the callId at the tail of LQueue is deleted, Nr is increased by one, and Nl is decreased by one at Step 23 (i.e., the last-coming low priority call is preempted). If Nc = 0 and Nl = 0, Nf is incremented by one at Step 24 (i.e., this call is force-terminated).

If e.callId exists in LQueue, Nc > 0 or Nl > 0, Step 25 compares the remaining call holding time e.tc and the domain residence time e.td. If e.tc < e.td, Step 26 generates a Completion event g where g.priority = 1 and inserts it into the event list. Otherwise, Step 27 generates a CS2PS event h where h.tc = e.tc -e.td and h.priority = 0, and inserts it into the event list.

Completion: There are two cases at Step 28:

e.priority = 1. Nc is incremented by one at Step 29 (i.e., a channel in the MSC is released).

e.priority = 0. If e.callId exists in LQueue at Step 30, then Step 31 deletes the e.callId from LQueue, decreases Nl by one, and increases Nc by one.

At the end of each iteration, Step 32 checks if N > 1, 000, 000. If so, Step 33 computes the output measures by (A.1), and the simulation terminates.

相關文件