資源簡介
對(duì)旅行商問題的解法提出了蟻群算法,并用MFC編程實(shí)現(xiàn),有比較有好的界面,并對(duì)問題做了細(xì)致的分析。

代碼片段和文件信息
//?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;
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????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個(gè)文件信息
- 上一篇:完美簡體中文VC6漢化補(bǔ)丁
- 下一篇:基于可變窗口的立體匹配C++程序代碼
評(píng)論
共有 條評(píng)論