7 Программный расчет
Значения рассчитываются на языке программирования Vbasic:
Option Base 1
Private Sub cmdEval_Click()
Dim Lam(3), Lamy(3)
Dim Ami(12), Amv(12), Api(12), Apycc(12)
Dim Ymi(12), Ymv(12), Ypi(12), Ypycc(12)
Dim Aij(12, 12) As Double
Dim i, j As Long
Dim Nsum As Long
Dim v, p As Long
Dim Nsys, Nov As Double
Dim Ain, Yin As Double
Dim Pi(12), Li(12), Mi(12)
'-------------------------- Исходные данные -----------------------------
Azsl = 0.007 'Erl/AL
Aslm = 0.0075 'Erl/AL
A_udel_vix_KP_ATS = 0.05
Aslm2 = 0.0015 '?Aycc?
Ni = Array(5000, 12790, 2790, 1300, 380, 770, 256, 2850, 1400, 6750, 6790, 512)
Ny = Array(1500, 2500, 30000)
Py = Array(0.46, 0.08, 0.46)
Delta = Array(10, 1#, 0.5)
S = Array(100, 0, 0)
nTP = Array(1, 3, 6.5)
n_rd = Array(1, 1, 2)
n_wr = Array(0, 0, 0.8)
tau_ob = 15
n_mirror_disks = 3
v_tr = 140
v_sz = 8
v_zn = 53
v_zp = 6
v_k = 64000
Lam_sz = 2
Poks = 0.2
Tau_pb = 0.01
Alpha_p = 0.2
v_pd = 1
t_SSP = 0.2
'--------------------------------------------------------------------------
'5 - Проверочный расчет числа МСЛ на ГТС
'5.1 - Определение интенсивностей нагрузок между АМТС и РАТС
'5.2 - Определение интенсивности средних нагрузок между существующимим и проектируемой РАТС
For i = 1 To 12
Ami(i) = Ni(i) * Azsl
Amv(i) = Ni(i) * Aslm
Api(i) = A_udel_vix_KP_ATS * Ni(i)
Apycc(i) = Aslm2 * Ni(i)
Prynt "Ami(" & i & ") = " & Ami(i) & " | "
Prynt "Amv(" & i & ") = " & Amv(i) & " | "
Prynt "Api(" & i & ") = " & Api(i) & " | "
Prynt "Apycc(" & i & ") = " & Apycc(i)
Nsum = Ni(i) + Nsum
Next
'Опредедение межстанционных нагрузок на ГТС
Prynt "Nc = " & Nsum
For i = 1 To 12
For j = 1 To 12
If i <> j Then
Aij(i, j) = Api(i) * (Ni(j) / Nsum)
Prynt Aij(i, j) & Chr(9)
Else
Prynt "- "
End If
Next
Prynt vbCrLf
Next
'5.3 - Расчет числа СЛ
For i = 1 To 12
Ymi(i) = 1.03 * Ami(i) + 0.29 * Sqr(Ami(i))
Ymv(i) = 1.03 * Amv(i) + 0.29 * Sqr(Amv(i))
Ypi(i) = 1.03 * Api(i) + 0.29 * Sqr(Api(i))
Ypycc(i) = 1.03 * Apycc(i) + 0.29 * Sqr(Apycc(i))
Prynt "Ymi(" & i & ") = " & Ymi(i) & " | "
Prynt "Ymv(" & i & ") = " & Ymv(i) & " | "
Prynt "Ypi(" & i & ") = " & Ypi(i) & " | "
Prynt "Ypycc(" & i & ") = " & Ypycc(i)
Next
'5.4 - Проверочные расчеты соответствия по транспортной сети
v = 455 + 437: p = 1920
Nsys = v / p
Nov = 2 * Nsys
Prynt "Nsys = " & Nsys & "; Nov = " & Nov
'5.5 - Распределение нагрузок при обслуживании вызовов к ИСС
For i = 1 To 12
Ain = Api(i) / 97.5
Yin = 1.03 * Ain + 0.29 * Sqr(Ain)
Prynt "Ain(" & i & ") = " & Ain & " Yin(" & i & ") = " & Yin
Next
'-----------------------------------------------------------
'6.1 - Анализ временных задержек в ИС
'T2 = (N+1) * Tccs7 + N * Troute
'6.2 - Задержки вызова услуги в телефонной сети
Lambda0 = 1
Dim Lambda(12) As Variant
LamSum = 0
For i = 1 To 12
Lambda(i) = Lambda0 * Ni(i)
LamSum = LamSum + Lambda(i)
Next
'L(i) = L(i) + Lij
L4 = L43 + L31 + L10
L3 = L31 + L10
L2 = L21 + L10
For i = 1 To 12
Pi(i) = Lambda(i) / LamSum
Lc = Lc + (Pi(i) * Li(i))
Mc = Mc + (Pi(i) * Mi(i))
Next
'Vc = ?
'TauL = Lc / Vc
'6.3 - Задержка на участке SSP - SCP
t_SSP = 0.2
'6.4 - Задержка сообщений в канале ОКС №7 при передаче от SSP к SCP
LamSum = 0
For i = 1 To 3
D = Ny(i) * Delta(i)
Prynt "Delta(" & i & ") = " & D
Lam(i) = D / 3600
Prynt "Lam(" & i & ") = " & Lam(i)
LamSum = LamSum + Lam(i)
Next
Prynt "LamSum = " & LamSum
For i = 1 To 3
Py(i) = Lam(i) / LamSum
n_TP_sum = n_TP_sum + (nTP(i) * Py(i))
Prynt "Py(" & i & ") = " & Py(i)
Next
Prynt "n_TP_sum = " & n_TP_sum
For i = 1 To 3
n_TP_avg = n_TP_avg + ((nTP(i) * Py(i) * S(i)) / 100)
Next
n_TP_avg = n_TP_avg + n_TP_sum
Prynt "n_TP_avg = " & n_TP_avg
Lam_TP = n_TP_avg * LamSum
Prynt "Lam_TP = " & Lam_TP
v_TP = 140
n_zn = v_TP / v_zn
Prynt "N_zn = " & n_zn
Tau_zn = (8 * v_zn) / v_k
Tau_sz = (8 * v_sz) / v_k
Tau_zp = (8 * v_zp) / v_k
Prynt "Tau_zn = " & Tau_zn
Prynt "Tau_sz = " & Tau_sz
Prynt "Tau_zp = " & Tau_zp
Tau_TP = Tau_zn * n_zn
Prynt "t_TP = " & Tau_TP
n_k = Round((Lam_TP * Tau_TP) / Poks) + 1
Prynt "n_k = " & n_k
Lam_TP_k = Lam_TP / n_k
Prynt "Lam_TP_k = " & Lam_TP_k
p1 = Lam_sz * Tau_sz
p2 = Lam_TP_k * Tau_TP
p3 = 1 - (p1 + p2)
Prynt "p1 = " & p1 & "; p2 = " & p2 & "; p3 = " & p3
'For i = 1 To 3
' sm = sm + (Lam(i) * Tau(i) ^ 2)
' Rk = Rk + p(i)
'Next
' Rk_1 = Rk - p(K)
' t_k = sm / (2 * (1 - Rk_1) * (1 - Rk))
'R1 = p1
t_szo = (p1 * Tau_sz + 2 * p2 * Tau_TP + p3 * Tau_zp) / (2 * (1 - R1))
t_tpo = (p1 * Tau_sz + 2 * p2 * Tau_TP + p3 * Tau_zp) / (2 * (1 - R1) * (1 - R2))
t_zpo = (p1 * Tau_sz + 2 * p2 * Tau_TP + p3 * Tau_zp) / (2 * (1 - R1) * (1 - R2) * (1 - R3))
Tau_TP = Tau_TP + t_tpo
Prynt "t_szo = " & t_szo
Prynt "t_tpo = " & t_tpo
Prynt "t_zpo = " & t_zpo
Prynt "t_tp = " & Tau_TP
'6.5 - Задержка обработки запросов на интеллектуальную услугу в ВС SCP
Tau_pb = 0.01
Kbs = 3
'Kbs = Vp / Vpb
'tau_pb = 1 / Vpb
'tau_p = 1 / Vp
tau_p = Tau_pb / Kbs
Prynt "tau_p = " & tau_p
For i = 1 To 3
n_write = n_write + (n_wr(i) * Py(i) / n_TP_sum)
n_read = n_read + (n_rd(i) * Py(i) / n_TP_sum)
Next
Prynt "n_read = " & n_read
Prynt "n_write = " & n_write
t_d = n_write * tau_ob + n_read * (tau_ob / n_mirror_disks)
t_d = t_d * 0.001
Prynt "t_d = " & t_d
p_D = Lam_TP * t_d
p_P = Lam_TP * tau_p
R_PD = p_P + p_D
Tau_PD = R_PD / Lam_TP
v_pd = 1
t_opd = (R_PD * Tau_PD * (1 + v_pd ^ 2)) / (2 * (1 - R_PD))
Prynt "p_D = " & p_D
Prynt "p_P = " & p_P
Prynt "R_PD = " & R_PD
Prynt "Tau_PD = " & Tau_PD
Prynt "t_opd = " & t_opd
t_SCP = t_opd + Tau_PD
Prynt "t_SCP = " & t_SCP
'6.6 - Выбор производительности процессорной системы SCP
t_ctr = 1: t_d = 0.129
t_pm = t_ctr - t_d
Kbs = Round(Lam_TP * Tau_pb / (Alpha_p * (t_ctr - t_d))) + 1
t_p = Tau_pb / Kbs
Prynt "t_pm = " & t_pm
Prynt "Kbs = " & Kbs
Prynt "t_p = " & t_p
'6.7 - Задержки времени обслуживания запроса на интеллектульную услугу на участке SSP - SCP
t_tp_gen = (2 * Tau_TP) + t_SCP + t_SSP
t_tp_gen = 0.05104
t_yp = t_tp_gen * n_TP_avg
Prynt "T_TP = " & t_tp_gen
Prynt "t_yp = " & t_yp
'6.8 - Задержки запросов на интеллектуальные услуги в выходных регистрах SSP
Betta = LamSum * t_yp
p_P = Betta / n_k
t_yo = (p_P * t_yp) / (1 - p_P)
t_y_gen = t_yo + t_yp
Prynt "Betta = " & Betta
Prynt "p_P = " & p_P
Prynt "t_yo = " & t_yo
Prynt "T_y = " & t_y_gen
End Sub
Sub Prynt(msg)
lstOut.AddItem msg
End Sub
0 комментариев