"larsjohansen" <larsjohansen.news@kandu.dk> skrev i en meddelelse
news:624N7.736$K4.144397@news010.worldonline.dk...
> Mangler Erlangs formel som add-on til Excel. Det skal være den der
> beregner trafik intensitet.
> Helst Freeware.
Her er et forslag i VBA som du selv kan indsætte.
Ud fra 2 af parametrene (Erlang, Trunks og QoS) gives den 3die.
Erlang : Trafikintensitet, samtaletimer per time.
Trunks : Antal linier
QoS : Maximal afvisning (0,05 = 5%)
hilsen
Klaus
==============================================
Function ErlangQ(Erlang, Trunks)
Dim Partial As Double
Dim i As Integer
Partial = 1
For i = 1 To Trunks
Partial = Erlang * Partial
Partial = Partial / (i + Partial)
Next i
ErlangQ = Partial
End Function
==============================================
Function ErlangT(QualityOfService, Erlang)
Dim Partial As Double
Dim ntrunks As Integer
Const max As Integer = 32767
Partial = 1
For ntrunks = 1 To max
Partial = Erlang * Partial
Partial = Partial / (ntrunks + Partial)
If Partial <= QualityOfService Then
ErlangT = Int(ntrunks + 0.5)
GoTo EndIt
End If
Next ntrunks
ErlangT = max
EndIt:
End Function
================================================
Function ErlangE(QualityOfService, Trunks)
Dim delta As Double
Dim Ai As Double
Dim B As Double
Dim grenze As Integer
epsilon = QualityOfService / 100
grenze = Trunks
While ErlangQ(grenze, Trunks) <= QualityOfService
grenze = grenze * 2
Wend
Ai = grenze / 2
delta = grenze / 4
B = ErlangQ(Ai, Trunks)
While Abs(B - QualityOfService) > epsilon
If B > QualityOfService Then
Ai = Ai - delta
Else
Ai = Ai + delta
End If
delta = delta / 2
B = ErlangQ(Ai, Trunks)
Wend
ErlangE = Ai
End Function
>