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

📄 acsview.h

📁 蚁群算法是解决电力调配系统和商场供货系统问题的有效算法,这里提供了一种蚁群算法,供大家参考
💻 H
字号:
// acsView.h : interface of the CAcsView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_ACSVIEW_H__B341C6ED_5681_11D5_8DEC_52544C29CB85__INCLUDED_)
#define AFX_ACSVIEW_H__B341C6ED_5681_11D5_8DEC_52544C29CB85__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "TspNew.h"
class CAcsView : public CFormView
{
protected: // create from serialization only
	CAcsView();
	DECLARE_DYNCREATE(CAcsView)

public:
	//{{AFX_DATA(CAcsView)
	enum{ IDD = IDD_ACS_FORM };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Attributes
public:
	CAcsDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAcsView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual void OnDraw(CDC* pDC);
	//}}AFX_VIRTUAL

// Implementation
public:
	int bestant;//取得最优路径的蚂蚁位置
	double bestlength;//最优路径的长度
	double avergelength;//平均路径长度
	double m_city[MAX_SIZE][MAX_SIZE];//城市距离信息
    int cityorder[1000];//最优路径顺序
	void DrawToScreen(void);//输出结果到当前屏幕
	CDC *m_ptMemDC;//定义内存DC
	CBitmap *m_ptMemBitmap;//定义内存位图
	//当前屏幕坐标的X,Y值
	int m_nMaxX;
	int m_nMaxY;
	virtual ~CAcsView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CAcsView)
	afx_msg void OnMenuSetdefault();
	afx_msg void OnMenuRunsystem();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in acsView.cpp
inline CAcsDoc* CAcsView::GetDocument()
   { return (CAcsDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ACSVIEW_H__B341C6ED_5681_11D5_8DEC_52544C29CB85__INCLUDED_)

⌨️ 快捷键说明

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