• 大小: 3.84MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-28
  • 语言: C/C++
  • 标签: TSP  蚁群  

资源简介

对旅行商问题的解法提出了蚁群算法,并用MFC编程实现,有比较有好的界面,并对问题做了细致的分析。

资源截图

代码片段和文件信息

// AntTsp.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “AntTsp.h“
#include “AntTspDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAntTspApp

BEGIN_MESSAGE_MAP(CAntTspApp CWinApp)
//{{AFX_MSG_MAP(CAntTspApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAntTspApp construction

CAntTspApp::CAntTspApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CAntTspApp object

CAntTspApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CAntTspApp initialization

BOOL CAntTspApp::InitInstance()
{
AfxEnableControlContainer();

// Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable you should remove from the following
//  the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CAntTspDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with Cancel
}

// Since the dialog has been closed return FALSE so that we exit the
//  application rather than start the application‘s message pump.
return FALSE;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      12821  2004-12-30 00:36  源代码\antsystem.h

     文件      20572  2011-05-17 21:40  源代码\AntTsp.aps

     文件       1186  2011-05-20 16:08  源代码\AntTsp.clw

     文件       2063  2004-12-28 12:20  源代码\AntTsp.cpp

     文件       4222  2004-12-30 01:12  源代码\AntTsp.dsp

     文件        535  2004-12-28 12:20  源代码\AntTsp.dsw

     文件       1324  2004-12-28 12:20  源代码\AntTsp.h

     文件     107520  2011-05-20 16:08  源代码\AntTsp.ncb

     文件      50688  2011-05-20 16:08  源代码\AntTsp.opt

     文件       1498  2011-05-17 21:40  源代码\AntTsp.plg

     文件       5368  2004-12-29 00:39  源代码\AntTsp.rc

     文件       7022  2004-03-02 13:38  源代码\AntTspDlg.cpp

     文件       1558  2004-12-29 00:36  源代码\AntTspDlg.h

     文件    2506802  2011-05-17 21:40  源代码\Debug\AntTsp.exe

     文件    3072400  2011-05-17 21:40  源代码\Debug\AntTsp.ilk

     文件      11969  2011-05-17 21:40  源代码\Debug\AntTsp.obj

     文件    5474104  2011-05-17 21:40  源代码\Debug\AntTsp.pch

     文件    4236288  2011-05-17 21:40  源代码\Debug\AntTsp.pdb

     文件       8616  2011-05-17 21:40  源代码\Debug\AntTsp.res

     文件     381111  2011-05-17 21:40  源代码\Debug\AntTspDlg.obj

     文件     105189  2011-05-17 21:40  源代码\Debug\StdAfx.obj

     文件     238592  2011-05-20 16:06  源代码\Debug\vc60.idb

     文件     462848  2011-05-17 21:40  源代码\Debug\vc60.pdb

     文件       3579  2004-12-28 12:20  源代码\ReadMe.txt

     文件       1078  2004-12-28 12:20  源代码\res\AntTsp.ico

     文件        398  2004-12-28 12:20  源代码\res\AntTsp.rc2

     文件        773  2004-12-29 00:37  源代码\Resource.h

     文件        796  2004-12-14 11:54  源代码\st70.tsp

     文件        208  2004-12-28 12:20  源代码\StdAfx.cpp

     文件       1074  2004-12-28 20:28  源代码\StdAfx.h

............此处省略9个文件信息

评论

共有 条评论