📄 frmsuanfa1.frm
字号:
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmsuanfa1
Caption = "Form1"
ClientHeight = 10575
ClientLeft = 60
ClientTop = 345
ClientWidth = 13530
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 10575
ScaleWidth = 13530
WindowState = 2 'Maximized
Begin TabDlg.SSTab SSTab1
Height = 10935
Left = 120
TabIndex = 0
Top = 0
Width = 15015
_ExtentX = 26485
_ExtentY = 19288
_Version = 393216
Tabs = 2
Tab = 1
TabHeight = 520
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
TabCaption(0) = "调度算法"
TabPicture(0) = "frmsuanfa1.frx":0000
Tab(0).ControlEnabled= 0 'False
Tab(0).Control(0)= "Frame1"
Tab(0).Control(1)= "DataGrid1"
Tab(0).ControlCount= 2
TabCaption(1) = "设备负荷情况查看"
TabPicture(1) = "frmsuanfa1.frx":001C
Tab(1).ControlEnabled= -1 'True
Tab(1).Control(0)= "DataGrid2"
Tab(1).Control(0).Enabled= 0 'False
Tab(1).Control(1)= "Frame3"
Tab(1).Control(1).Enabled= 0 'False
Tab(1).Control(2)= "Timer1"
Tab(1).Control(2).Enabled= 0 'False
Tab(1).Control(3)= "MSChart1"
Tab(1).Control(3).Enabled= 0 'False
Tab(1).ControlCount= 4
Begin VB.Frame Frame1
BackColor = &H00C0C0C0&
Height = 1095
Left = -74880
TabIndex = 8
Top = 600
Width = 14655
Begin VB.ComboBox Cmbsuanfa
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "frmsuanfa1.frx":0038
Left = 1920
List = "frmsuanfa1.frx":0042
TabIndex = 11
Top = 360
Width = 2415
End
Begin VB.CommandButton Comok
Caption = "任务分派"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6480
TabIndex = 10
Top = 360
Width = 1215
End
Begin VB.CommandButton comexit1
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 10560
TabIndex = 9
Top = 360
Width = 1215
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "算法"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1320
TabIndex = 13
Top = 360
Width = 420
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Height = 180
Left = 7080
TabIndex = 12
Top = 240
Width = 90
End
End
Begin VB.PictureBox MSChart1
Height = 375
Left = 120
ScaleHeight = 315
ScaleWidth = 13515
TabIndex = 7
Top = 9960
Width = 13575
End
Begin VB.Timer Timer1
Interval = 100
Left = 720
Top = 7560
End
Begin VB.Frame Frame3
BackColor = &H00C0C0C0&
Height = 1095
Left = 240
TabIndex = 1
Top = 360
Width = 14295
Begin VB.ComboBox cmbmachine
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "frmsuanfa1.frx":0054
Left = 2160
List = "frmsuanfa1.frx":0056
TabIndex = 5
Top = 480
Width = 2895
End
Begin VB.CommandButton combb
Caption = "报表"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 9000
TabIndex = 4
Top = 480
Width = 1815
End
Begin VB.CommandButton Comexit
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 11760
TabIndex = 3
Top = 480
Width = 1455
End
Begin VB.CommandButton Comfind
Caption = "查询"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6120
TabIndex = 2
Top = 480
Width = 1815
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "设备选择"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1080
TabIndex = 6
Top = 600
Width = 840
End
End
Begin MSDataGridLib.DataGrid DataGrid2
Height = 7440
Left = 240
TabIndex = 14
Top = 1920
Width = 14295
_ExtentX = 25215
_ExtentY = 13123
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSDataGridLib.DataGrid DataGrid1
Height = 8175
Left = -74880
TabIndex = 15
Top = 1920
Width = 14775
_ExtentX = 26061
_ExtentY = 14420
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "frmsuanfa1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim C() As Integer
Dim str1 As String
Dim rs As New ADODB.Recordset
Dim maa() As String
Dim tt()
Dim p() As Integer '存储初始种群p(ss+1,nn+1)
Dim pg() As Integer '存储新种群p(ss+1,nn+1)
Dim A() As Integer '存储工艺相关数据a(mm+1,nn+1)
Dim B() As Integer '存储工艺约束b(nn+1,ll+1)
Dim pgg() As Integer '新产生的染色体串
Dim D() As Integer '
Dim dd As Integer
Dim pnew() As Integer
Dim fnew() As Single
Dim ran() As Single '存储随即数ran(nn+1)
Dim pran() As Single '存储各个染色体的选择概率pran(ss+1)
Dim pf() As Single '存储每个染色体的适值f(ss+1)
Dim f() As Single '存储每个染色体的适值f(ss+1)
Dim mach() As machine '用它来存储机器的任务集mach(mm+1,hh+1)
Dim mach1() As machine
Dim min() As Integer '用来记录设备当前的任务数
Dim ss As Integer '用它来设置种群大小
Dim pc As Single '用它来表示复制率
Dim pm As Single '用它来表示变异率
Dim mm As Integer '用它来表示机器数
Dim nn As Integer '用它来表示工序数
Dim ll As Integer '用它来表示约束工艺的最大数
Dim hh As Integer '用它来表示每台机器上的最多任务数
'drawingnumber为产品名称,quantitys为计划数量,pcocdssquatos为产品定额,manchine1 为设备的占用时间,manchine2为设备工作效率,
Public Sub mpop(quantitys As Integer, processquatos As Single, mach1() As Single, mach2() As Single)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -