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

📄 frmmmas.frm

📁 蚂蚁算法实验室
💻 FRM
📖 第 1 页 / 共 4 页
字号:
         Left            =   -74760
         TabIndex        =   13
         Text            =   "0"
         Top             =   5640
         Width           =   735
      End
      Begin VB.TextBox txtAvgLenYMax 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   -74760
         TabIndex        =   12
         Text            =   "250000"
         Top             =   480
         Width           =   735
      End
      Begin VB.PictureBox AxisAvgLenX 
         Appearance      =   0  'Flat
         AutoRedraw      =   -1  'True
         BackColor       =   &H80000005&
         ForeColor       =   &H80000008&
         Height          =   135
         Left            =   -73920
         ScaleHeight     =   105
         ScaleWidth      =   7545
         TabIndex        =   11
         Top             =   5880
         Width           =   7575
      End
      Begin VB.PictureBox AxisAvgLenY 
         Appearance      =   0  'Flat
         AutoRedraw      =   -1  'True
         BackColor       =   &H80000005&
         ForeColor       =   &H80000008&
         Height          =   5415
         Left            =   -74040
         ScaleHeight     =   5385
         ScaleWidth      =   105
         TabIndex        =   10
         Top             =   480
         Width           =   135
      End
      Begin VB.PictureBox picAvgLen 
         Appearance      =   0  'Flat
         AutoRedraw      =   -1  'True
         BackColor       =   &H80000005&
         ForeColor       =   &H80000008&
         Height          =   5415
         Left            =   -73920
         ScaleHeight     =   5385
         ScaleWidth      =   7545
         TabIndex        =   9
         Top             =   480
         Width           =   7575
      End
      Begin VB.TextBox txtBestLenXMax 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   -67200
         TabIndex        =   8
         Text            =   "1000"
         Top             =   6000
         Width           =   855
      End
      Begin VB.TextBox txtBestLenXMin 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   -73920
         Locked          =   -1  'True
         TabIndex        =   7
         Text            =   "0"
         Top             =   6000
         Width           =   735
      End
      Begin VB.TextBox txtBestLenYMin 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   -74760
         TabIndex        =   6
         Text            =   "0"
         Top             =   5640
         Width           =   735
      End
      Begin VB.TextBox txtBestLenYMax 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   -74760
         TabIndex        =   5
         Text            =   "250000"
         Top             =   480
         Width           =   735
      End
      Begin VB.PictureBox AxisBestLenX 
         Appearance      =   0  'Flat
         AutoRedraw      =   -1  'True
         BackColor       =   &H80000005&
         ForeColor       =   &H80000008&
         Height          =   135
         Left            =   -73920
         ScaleHeight     =   105
         ScaleWidth      =   7545
         TabIndex        =   4
         Top             =   5880
         Width           =   7575
      End
      Begin VB.PictureBox AxisBestLenY 
         Appearance      =   0  'Flat
         AutoRedraw      =   -1  'True
         BackColor       =   &H80000005&
         ForeColor       =   &H80000008&
         Height          =   5415
         Left            =   -74040
         ScaleHeight     =   5385
         ScaleWidth      =   105
         TabIndex        =   3
         Top             =   480
         Width           =   135
      End
      Begin VB.PictureBox picBestLen 
         Appearance      =   0  'Flat
         AutoRedraw      =   -1  'True
         BackColor       =   &H80000005&
         ForeColor       =   &H80000008&
         Height          =   5415
         Left            =   -73920
         ScaleHeight     =   5385
         ScaleWidth      =   7545
         TabIndex        =   2
         Top             =   480
         Width           =   7575
      End
      Begin VB.ListBox lstBestLenRep 
         Height          =   4920
         ItemData        =   "frmMMAS.frx":1297
         Left            =   120
         List            =   "frmMMAS.frx":1299
         TabIndex        =   1
         Top             =   720
         Width           =   2895
      End
      Begin VB.Label Label33 
         Caption         =   "当前最浓的颜色代表的信息量为:"
         Height          =   255
         Left            =   -74040
         TabIndex        =   82
         Top             =   5160
         Width           =   2775
      End
      Begin VB.Label Label27 
         Caption         =   "蚂蚁这样移动的概率:"
         Height          =   255
         Left            =   -74760
         TabIndex        =   83
         Top             =   2640
         Width           =   1815
      End
      Begin VB.Label Label25 
         Alignment       =   2  'Center
         Caption         =   "各路径信息量浓度图"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   -74760
         TabIndex        =   86
         Top             =   480
         Width           =   4095
      End
      Begin VB.Label Label24 
         Alignment       =   2  'Center
         Caption         =   "当前最短路径示意图"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   -70440
         TabIndex        =   85
         Top             =   480
         Width           =   4095
      End
      Begin VB.Label Label23 
         Alignment       =   2  'Center
         Caption         =   "(颜色越浓表示信息浓度量越大)"
         Height          =   255
         Left            =   -74760
         TabIndex        =   84
         Top             =   4920
         Width           =   4095
      End
      Begin VB.Label Label18 
         Caption         =   "最优路径:"
         Height          =   255
         Left            =   3120
         TabIndex        =   62
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label17 
         Caption         =   "最优路径长度:"
         Height          =   255
         Left            =   120
         TabIndex        =   61
         Top             =   480
         Width           =   1335
      End
   End
End
Attribute VB_Name = "frmMMAS"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
  Dim Sign_Stop_Calc As Boolean
  Dim BestAntOfIter As Integer, BestLenOfIter As Double
  Dim WorstAntOfIter As Integer, WorstLenOfIter As Double
  Dim GlobalBestLen As Double
  Dim Iteration As Integer
  Dim S_BestLen As Double
  Dim strBestPath As String
  Dim AvgLenOfIter As Double
  Dim S_LenOfIter As Double

Private Sub Lock_Controls()
  cmdStart.Enabled = False
  chkCAvg.Enabled = False
  chkUseNew1.Enabled = False
  chkDrawBestLen.Enabled = False
  chkDrawAvgLen.Enabled = False
  chkAlwaysCleanResult.Enabled = False
  chkDrawTogether.Enabled = False
  lstCityData.Enabled = False
  txtCalcTime.Enabled = False
  txtMaxAnts.Enabled = False
  txtAlpha.Enabled = False
  txtBeta.Enabled = False
  txtRou.Enabled = False
  txtSigma.Enabled = False
  txtTaoMax.Enabled = False
  txtTaoMin.Enabled = False
  txtW.Enabled = False
  cmdStop.Enabled = True
  cmdPause.Enabled = True
  lstAnt_to_Show.Enabled = False
  cmdNextMove.Enabled = False
  cmdShowAntMove.Enabled = False
  cmdShowBestAntMove.Enabled = False
End Sub
Private Sub UnLock_Controls()
  cmdStart.Enabled = True
  chkCAvg.Enabled = True
  chkUseNew1.Enabled = True
  chkDrawBestLen.Enabled = True
  chkDrawAvgLen.Enabled = True
  chkAlwaysCleanResult.Enabled = True
  chkDrawTogether.Enabled = True
  lstCityData.Enabled = True
  txtCalcTime.Enabled = True
  txtMaxAnts.Enabled = True
  txtAlpha.Enabled = True
  txtBeta.Enabled = True
  txtRou.Enabled = True
  txtSigma.Enabled = True
  txtTaoMax.Enabled = True
  txtTaoMin.Enabled = True
  txtW.Enabled = True
  cmdStop.Enabled = False
  cmdPause.Enabled = False
  lstAnt_to_Show.Enabled = False
  cmdNextMove.Enabled = False
  cmdShowAntMove.Enabled = False
  cmdShowBestAntMove.Enabled = False
End Sub
Private Sub chkAlwaysCleanResult_Click()
  If chkAlwaysCleanResult.Value = 1 Then
    SignAlwaysCleanResult = True
  Else
    If chkAlwaysCleanResult.Value = 0 Then
      SignAlwaysCleanResult = False
    End If
  End If
End Sub

Private Sub chkCAvg_Click()
  If chkCAvg.Value = 1 Then
    SignComputeAvg = True
  Else
    If chkCAvg.Value = 0 Then
      SignComputeAvg = False
    End If
  End If
End Sub

Private Sub chkDrawAvgLen_Click()
  If chkDrawAvgLen.Value = 1 Then
    SignDrawAvgLen = True
  Else
    If chkDrawAvgLen.Value = 0 Then
      SignDrawAvgLen = False
    End If
  End If
End Sub

Private Sub chkDrawBestLen_Click()
  If chkDrawBestLen.Value = 1 Then
    SignDrawBestLen = True
  Else
    If chkDrawBestLen.Value = 0 Then
      SignDrawBestLen = False
    End If
  End If
End Sub

Private Sub chkDrawPath_Click()
  If chkDrawPath.Value = 1 Then
    SignDrawPath = True
  Else
    If chkDrawPath.Value = 0 Then
      SignDrawPath = False
    End If
  End If
End Sub

Private Sub chkDrawTao_Click()
  If chkDrawTao.Value = 1 Then
    SignDrawTao = True
  Else
    If chkDrawTao.Value = 0 Then
      SignDrawTao = False

⌨️ 快捷键说明

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