| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 853 人关注过本帖
标题:花100人民币找人帮忙修改一些VB小程序
只看楼主 加入收藏
Reevon
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2011-3-27
结帖率:0
收藏
已结贴  问题点数:20 回复次数:5 
花100人民币找人帮忙修改一些VB小程序
花100人民币找人帮忙修改一些VB小程序,有兴趣的加我QQ 631281358
我自己调试了好几天没调试出来,可能是我新手的原因吧,很杯具
在线等待高手的求助
搜索更多相关主题的帖子: 人民币 在线 
2011-03-27 14:32
qq1023569223
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:湖南科技大学
等 级:贵宾
威 望:26
帖 子:2753
专家分:13404
注 册:2010-12-22
收藏
得分:7 
呵呵!

   唯实惟新 至诚致志
2011-03-27 14:35
Reevon
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2011-3-27
收藏
得分:0 
以下是引用qq1023569223在2011-3-27 14:35:08的发言:

呵呵!
希望得到高手的帮忙
2011-03-27 14:36
lisypro
Rank: 4
等 级:业余侠客
威 望:3
帖 子:695
专家分:216
注 册:2005-9-25
收藏
得分:7 
哈哈,有诚意可以加我的QQ 82341763

长期承接管理系统
代做各种vb/ / vc小程序
QQ:82341763
手机:13623290828
群号 11619730
2011-03-28 09:32
dhdj866
Rank: 2
等 级:论坛游民
帖 子:6
专家分:17
注 册:2011-1-6
收藏
得分:7 
怎么没有源程序
2011-03-28 22:51
Reevon
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2011-3-27
收藏
得分:0 
回复 5楼 dhdj866
'优化主函数
Public Function Hecmp(ByVal N As Integer, ByVal M As Integer, _
                 a() As Double, b() As Double, ByVal alpha As Double, _
                ByVal eps As Double, x() As Double, xx() As Double, ByVal K As Integer) As Integer
   
    Dim rn() As Double
    Dim r As Integer, G As Integer, i As Integer, j As Integer, it As Integer, kt As Integer, jt As Integer, kk As Integer
    Dim fj As Double, fr As Double, fg As Double, z As Double, rr As Double
    Dim C() As Double, D() As Double, W() As Double, xt() As Double, xf() As Double
   
    Dim mm As Double
   
    ReDim C(M - 1)
    ReDim D(M - 1)
    ReDim W(M - 1)
    ReDim xt(N - 1)
    ReDim xf(N - 1)
   
    '利用随机数产生可用的初始点
    Do
        Hecmpfs N, M, x(), C(), D(), W()
        r = 0: G = 0
        While ((r < N) And G = 0) '判断初始点x是否满足约束条件
            If ((C(r) <= W(r)) And (D(r) >= W(r))) Then
                r = r + 1
            Else
                G = 1
                For i = 0 To N - 1 '利用随机数产生初始点
                    x(i) = a(i) + (b(i) - a(i)) * Rnd
                Next i
            End If
        Wend
    Loop While G = 1
        
   
   
    rr = 0#
    'Randomize '初始化随机数
    For i = 0 To N - 1
        xx(i * N * 2) = x(i)
    Next i
   
    xx(N * N * 2) = Hecmpf(x(), N)
   
    For j = 1 To 2 * N - 1
        For i = 0 To N - 1
'            rr = 2053# * rr + 13849#
'            mm = rr / 65536#
'            rr = rr - mm * 65536#
'            xx(i * N * 2 + j) = a(i) + (b(i) - a(i)) * (rr / 65536#)
            'Randomize '初始化随机数
            xx(i * N * 2 + j) = a(i) + (b(i) - a(i)) * Rnd
            x(i) = xx(i * N * 2 + j)
        Next i
        
        it = 1
        
        While it = 1
            it = 0: r = 0: G = 0
            While ((r < N) And G = 0)
                If ((a(r) <= x(r)) And (b(r) >= x(r))) Then
                    r = r + 1
                Else
                    G = 1
                End If
            Wend
            
            If (G = 0) Then
                Hecmpfs N, M, x(), C(), D(), W()
                r = 0
                While ((r < M) And (G = 0))
                    If ((C(r) <= W(r)) And (D(r) >= W(r))) Then
                        r = r + 1
                    Else
                        G = 1
                    End If
                Wend
            End If
            
            If (G <> 0) Then
                For r = 0 To N - 1
                    z = 0#
                    For G = 0 To j - 1
                        z = z + xx(r * N * 2 + G) / (1# * j)
                    Next G
                    xx(r * N * 2 + j) = (xx(r * N * 2 + j) + z) / 2#
                    x(r) = xx(r * N * 2 + j)
                Next r
                it = 1
            Else
                xx(N * N * 2 + j) = Hecmpf(x, N)
            
            End If
        Wend
    Next j
   
    kk = 1: it = 1
   
    While (it = 1)
        it = 0
        fr = xx(N * N * 2): r = 0
        For i = 1 To 2 * N - 1
            If (xx(N * N * 2 + i)) > fr Then r = i: fr = xx(N * N * 2 + i)
        Next i
        G = 0: j = 0: fg = xx(N * N * 2)
        If r = 0 Then
            G = 1: j = 1: fg = xx(N * N * 2 + 1)
        End If
        For i = j + 1 To 2 * N - 1
            If (i <> r) Then
                If (xx(N * N * 2 + i) > fg) Then
                    G = i: fg = xx(N * N * 2 + i)
                End If
            End If
        Next i
        For i = 0 To N - 1
            xf(i) = 0#
            For j = 0 To 2 * N - 1
                If j <> r Then
                    xf(i) = xf(i) + xx(i * N * 2 + j) / (2# * N - 1#)
                End If
            Next j
            xt(i) = (1# + alpha) * xf(i) - alpha * xx(i * N * 2 + r)
        Next i
        jt = 1
        While jt = 1
            jt = 0
            z = Hecmpf(xt, N)
            While z > fg
                For i = 0 To N - 1
                    xt(i) = (xt(i) + xf(i)) / 2#
                Next i
                z = Hecmpf(xt, N)
            Wend
            j = 0
            For i = 0 To N - 1
                If (a(i) > xt(i)) Then
                    xt(i) = xt(i) + 0.0001: j = 1
                End If
                If (b(i) < xt(i)) Then
                    xt(i) = xt(i) - 0.0001: j = 1
                End If
            Next i
            If j <> 0 Then
                jt = 1
            Else
                Hecmpfs N, M, xt(), C(), D(), W()
                j = 0: kt = 1
                While ((kt = 1) And (j < M))
                    If ((C(j) <= W(j)) And (D(j) >= W(j))) Then
                        j = j + 1
                    Else
                        kt = 0
                    End If
                Wend
                If (j < M) Then
                    For i = 0 To N - 1
                        xt(i) = (xt(i) + xf(i)) / 2#
                    Next i
                    jt = 1
                End If
            End If
        Wend
        For i = 0 To N - 1
            xx(i * N * 2 + r) = xt(i)
        Next i
        xx(N * N * 2 + r) = z
        fr = 0#: fg = 0#
        For j = 0 To 2 * N - 1
            fj = xx(N * N * 2 + j)
            fr = fr + fj / (2# * N)
            fg = fg + fj * fj
        Next j
        fr = (fg - 2# * N * fr * fr) / (2# * N - 1#)
        If (fr >= eps) Then
            kk = kk + 1
            If (kk < K) Then it = 1
        End If
    Wend
   
    For i = 0 To N - 1
        x(i) = 0#
        For j = 0 To 2 * N - 1
            x(i) = x(i) + xx(i * N * 2 + j) / (2# * N)
        Next j
    Next i
   
    z = Hecmpf(x, N): x(N) = z
   
    Hecmpfs N, M, x(), C(), D(), W()
   
    Hecmp = kk
   
End Function
2011-04-15 12:33
快速回复:花100人民币找人帮忙修改一些VB小程序
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.057039 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved