⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wfj.frm

📁 实现了排队理论在数学中的使用方法
💻 FRM
📖 第 1 页 / 共 5 页
字号:
     m = Val(Trim(txtDaoda1.Text)) / temp1
     FuNum = Val(Trim(txtFuShu1.Text))
      
      For k = 1 To FuNum
       JiGaiN0 = JiGaiN0 + CiFang(m, k) / JieCheng(k)
      Next k
       
      JiGaiN0 = 1 / JiGaiN0
      
      qTemp = (CiFang(m, nTempI) / JieCheng(nTempI)) * JiGaiN0
      q = 1 - qTemp
      A = Val(Trim(txtDaoda1.Text)) * q
      
      
      txtXiaoGai1.Text = Format(Round(qTemp, 3), "0.000")
      txtJiGai1.Text = Format(Round(JiGaiN0, 3), "0.000")
      txtXiang1.Text = Format(Round(q, 3), "0.000")
      txtJue1.Text = Format(Round(A, 3), "0.000")
     
     
     
End Sub

Private Sub Cal2_Click()
  On Error Resume Next
  Dim Pn As Double
   n = 1
   queueL = Val(Trim(txtDuiChang2.Text))
   lambda = Val(Trim(txtDaoDa2.Text))
   Miu = Val(Trim(Trim(txtFuWu2.Text)))
   Row = lambda / Miu
   
   Pn = (CiFang(Row, queueL + 1) * (1 - Row)) / (1 - CiFang(Row, queueL + 2))
   P = Pn
   q = 1 - P
   A = lambda * q
   l = (Row / (1 - Row)) * (((1 + (queueL + 1) * CiFang(Row, queueL + 2) - (queueL + 2) * CiFang(Row, queueL + 1)) / (1 - CiFang(Row, queueL + 2))))
   Lq = (CiFang(Row, 2) / ((1 - Row)) * ((1 + queueL * CiFang(Row, queueL + 1) - (queueL + 1) * CiFang(Row, queueL)) / (1 - CiFang(Row, queueL + 2))))
   W = l / lambda
   Wq = Lq / lambda
   
   txtXiang2.Text = Format(Round(q, 3), "0.000")
   txtJue2.Text = Format(Round(A, 3), "0.000")
   txtXiaoGai2.Text = Format(Round(P, 3), "0.000")
   txtGuPing2.Text = Format(Round(l, 3), "0.000")
   txtDengPing2.Text = Format(Round(Lq, 3), "0.000")
   txtHuaPing2.Text = Format(Round(W, 3), "0.000")
   txtDengHua2.Text = Format(Round(Wq, 3), "0.000")
End Sub

Private Sub Cal3_Click()
  On Error Resume Next
  Dim l1 As Integer
  Dim P0 As Double
  Dim pTemp1, pTemp2 As Double
  
 
   lambda = Val(Trim(txtDaoDa3.Text))
   Miu = Val(Trim(txtFuWu3.Text))
   Row = lambda / Miu
   
  
   l = lambda / (Miu - lambda)
   Lq = CiFang(lambda, 2) / (Miu * (Miu - lambda))
   W = l / (Miu - lambda)
   Wq = l / Miu
   
   txtGuPing3.Text = Format(Round(l, 3), "0.000")
   txtDengPing3.Text = Format(Round(Lq, 3), "0.000")
   txtHuaPing3.Text = Format(Round(W, 3), "0.000")
   txtDengHua3.Text = Format(Round(Wq, 3), "0.000")
  
End Sub

Private Sub Cal4_Click()
 On Error Resume Next
  Dim l1 As Integer
  Dim P0 As Double
  Dim pTemp1, pTemp2 As Double
  
  n = Val(Trim(txtFuShu4.Text))
  lambda = Val(Trim(txtDaoDa4.Text))
  Miu = Val(Trim(txtFuWu4.Text))
  Row = lambda / Miu
  pTemp1 = 0
  For l1 = 0 To n
   pTemp1 = pTemp1 + CiFang(Row, l1) / JieCheng(l1)
  Next l1
   
   pTemp2 = pTemp1 + (CiFang(Row, n + 1) / (JieCheng(n) * (n - Row)))
   P0 = 1 / pTemp2
  
   P = P0
   q = 1 - P
   A = lambda * q
   
   If Not ((Row / n) < 1) Then
     MsgBox "ρ/n>=1,所以不存在极限分布!", vbOKOnly, "出错提示"
     Exit Sub
     End If
   l = Row + ((CiFang(Row, n + 1) * P0) / (n * JieCheng(n) * CiFang((1 - Row / n), 2)))
   Lq = CiFang(Row, n + 1) * P0 / (n * JieCheng(n) * CiFang((1 - Row / n), 2))
   W = l / lambda
   Wq = Lq / lambda
   
   
   txtXiang4.Text = Format(Round(q, 3), "0.000")
   txtJue4.Text = Format(Round(A, 3), "0.000")
   txtXiaoGai4.Text = Format(Round(P, 3), "0.000")
   txtGuPing4.Text = Format(Round(l, 3), "0.000")
   txtDengPing4.Text = Format(Round(Lq, 3), "0.000")
   txtHuaPing4.Text = Format(Round(W, 3), "0.000")
   txtDengHua4.Text = Format(Round(Wq, 3), "0.000")
  
End Sub

Private Sub Cal5_Click()
  On Error Resume Next
  Dim l1 As Integer
  Dim P0 As Double
  Dim pTemp1, pTemp2 As Double
  Dim n As Integer
  Dim n1 As Double
  Dim m As Integer
  
  n1 = Val(Trim(txtFuShu5.Text))
  n = Val(Trim(txtFuShu5.Text))
  lambda = Val(Trim(txtDaoDa5.Text))
  Miu = Val(Trim(txtFuWu5.Text))
  queueL = Val(Trim(txtDuiChang5.Text))
  Row = lambda / Miu
  m = Val(Trim(txtDuiChang5.Text))
  
  pTemp1 = 0
  For l1 = 0 To n
   pTemp1 = pTemp1 + CiFang(Row, l1) / JieCheng(l1)
  Next l1
   
   pTemp2 = pTemp1 + (CiFang(Row, n) * (Row / n - CiFang(Row / n, queueL + 1))) / (JieCheng(n) * (1 - Row / n))
   P0 = 1 / pTemp2
   P = (CiFang(Row, n + queueL) / (CiFang(n1, queueL) * JieCheng(n))) * P0
   q = 1 - P
   A = lambda * q
   
   l = Row * (1 - (CiFang(Row, n + queueL) * P0) / (CiFang(n1, queueL) * JieCheng(n))) + CiFang(Row, n + 1) * P0 * (1 - (m + 1) * CiFang(Row / n, m) + m * CiFang(Row / n, m + 1)) / (n * JieCheng(n) * CiFang(1 - Row / n, 2))
   Lq = CiFang(Row, n + 1) * P0 * (1 - (m + 1) * CiFang(Row / n, m) + m * CiFang(Row / n, m + 1)) / (n * JieCheng(n) * CiFang(1 - Row / n, 2))

   W = l / lambda
   Wq = Lq / lambda
   
   txtXiang5.Text = Format(Round(q, 3), "0.000")
   txtJue5.Text = Format(Round(A, 3), "0.000")
   txtXiaoGai5.Text = Format(Round(P, 3), "0.000")
   txtGuPing5.Text = Format(Round(l, 3), "0.000")
   txtDengPing5.Text = Format(Round(Lq, 3), "0.000")
   txtHuaPing5.Text = Format(Round(W, 3), "0.000")
   txtDengHua5.Text = Format(Round(Wq, 3), "0.000")
   

End Sub

Private Sub Command1_Click(Index As Integer)
On Error Resume Next
   If Index = 0 Then
         frm0.Visible = True
         Frm1.Visible = False
         frm2.Visible = False
         frm3.Visible = False
         frm4.Visible = False
         frm5.Visible = False
         frm6.Visible = False
      
      ElseIf Index = 1 Then
        frm0.Visible = False
        Frm1.Visible = True
        frm2.Visible = False
         frm3.Visible = False
         frm4.Visible = False
         frm5.Visible = False
        frm6.Visible = False
        ElseIf Index = 2 Then
         frm0.Visible = False
         Frm1.Visible = False
         frm2.Visible = True
          frm3.Visible = False
         frm4.Visible = False
         frm5.Visible = False
         frm6.Visible = False
         
         ElseIf Index = 3 Then
         frm0.Visible = False
         Frm1.Visible = False
         frm2.Visible = False
         frm3.Visible = True
         frm4.Visible = False
         frm5.Visible = False
         frm6.Visible = False
         
         
        ElseIf Index = 4 Then
          frm0.Visible = False
          Frm1.Visible = False
          frm2.Visible = False
           frm3.Visible = False
          frm4.Visible = True
          frm5.Visible = False
          frm6.Visible = False
        ElseIf Index = 5 Then
          frm0.Visible = False
          Frm1.Visible = False
          frm2.Visible = False
           frm3.Visible = False
          frm4.Visible = False
          frm5.Visible = True
          frm6.Visible = False
        ElseIf Index = 6 Then
          frm0.Visible = False
          Frm1.Visible = False
          frm2.Visible = False
           frm3.Visible = False
          frm4.Visible = False
          frm5.Visible = False
          frm6.Visible = True
          Rich6.FileName = App.Path + "\File\YuanLi.rtf"
          Rich6.Font.Size = Hscro6.Value
          Else
            isKai = False
            Timer1.Enabled = True
          End If
End Sub

Private Sub Form_Load()
On Error Resume Next
  Skin1.LoadSkin App.Path + "\Skins\Zhelezo.skn"
  Skin1.ApplySkin (Me.hWnd)
  
  isKai = True
  Timer1.Interval = 10
  Timer1.Enabled = True
  
  
  frm0.Visible = True
  Frm1.Visible = False
  frm2.Visible = False
  frm3.Visible = False
  frm4.Visible = False
  frm5.Visible = False
  frm6.Visible = False
  
  
  
  
End Sub

Private Sub Hscro6_Change()
  Rich6.Font.Size = Hscro6.Value
  
End Sub

Private Sub More1_Click()
 On Error Resume Next
   Load JiGai
  JiGai.Show
End Sub

Private Sub Reset0_Click()
  txtDaoda.Text = "0.0"
  txtFuWu.Text = "0.0"
  txtJue.Text = "0.0"
  txtXiang.Text = "0.0"
  txtXiaoGai.Text = "1.0"
End Sub

Private Sub Reset1_Click()
  txtDaoda1.Text = "0.0"
  txtFuWu1.Text = "0.0"
  txtFuShu1.Text = "0"
  txtJue1.Text = "0.0"
  txtXiang1.Text = "0.0"
  txtXiaoGai1.Text = "1.0"
  txtJiGai1.Text = "0.0"
End Sub

Private Sub Reset2_Click()
 On Error Resume Next
  txtDaoDa2.Text = "0.0"
  txtFuWu2.Text = "0.0"
  txtFuShu2.Text = "1"
  txtJue2.Text = "0.0"
  txtXiang2.Text = "0.0"
  txtXiaoGai2.Text = "1.0"
  txtDengHua2.Text = "0.0"
  txtGuPing2.Text = "0.0"
  txtHuaPing2.Text = "0.0"
  txtDengPing2.Text = "0.0"
End Sub

Private Sub Reset3_Click()
 On Error Resume Next
  txtDaoDa3.Text = "0.0"
  txtFuWu3.Text = "0.0"
  txtDengHua3.Text = "0.0"
  txtGuPing3.Text = "0.0"
  txtHuaPing3.Text = "0.0"
  txtDengPing3.Text = "0.0"
End Sub

Private Sub Reset4_Click()
 On Error Resume Next
  txtDaoDa4.Text = "0.0"
  txtFuWu4.Text = "0.0"
  txtFuShu4.Text = "1"
  txtJue4.Text = "0.0"
  txtXiang4.Text = "0.0"
  txtXiaoGai4.Text = "1.0"
  txtDengHua4.Text = "0.0"
  txtGuPing4.Text = "0.0"
  txtHuaPing4.Text = "0.0"
  txtDengPing4.Text = "0.0"
End Sub

Private Sub Reset5_Click()
 On Error Resume Next
  txtDaoDa5.Text = "0.0"
  txtFuWu5.Text = "0.0"
  txtFuShu5.Text = "1"
  txtJue5.Text = "0.0"
  txtXiang5.Text = "0.0"
  txtXiaoGai5.Text = "1.0"
  txtDengHua5.Text = "0.0"
  txtGuPing5.Text = "0.0"
  txtHuaPing5.Text = "0.0"
  txtDengPing5.Text = "0.0"
  txtDuiChang5.Text = 0
End Sub

Private Sub Timer1_Timer()
  If isKai = False Then
    
      If Me.Height > 509 Then
        Me.Height = Me.Height - 55
       End If
      If Me.Width > 1035 Then
        Me.Width = Me.Width - 55
      End If
      If Me.Width < 1036 Then
      End
  End If
End If
    
    
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -