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

📄 airportdepview.h

📁 使飞机进离港航班的时间在一时间段内达到最小.
💻 H
字号:
// AirportDepView.h : interface of the CAirportDepView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_AIRPORTDEPVIEW_H__4472DE3E_D427_4F6B_824B_8646528224FE__INCLUDED_)
#define AFX_AIRPORTDEPVIEW_H__4472DE3E_D427_4F6B_824B_8646528224FE__INCLUDED_

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

#include "Flight.h"
#include "Airport.h"

class CAirportDepView : public CScrollView
{
protected: // create from serialization only
	CAirportDepView();
	DECLARE_DYNCREATE(CAirportDepView)

// Attributes
public:
	CAirportDepDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAirportDepView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetBacter();   //妥协方法接种疫苗(疫苗取自代理理想点)
	bool CompareFlightNum(Flight f1,Flight f2);  //比较航班号
	void doOneGenerationModified();             //修改一代种群
	void cross(int toCross, int toMute);        //选择一些种群进行交叉操作
	Airport cross2Group(Airport g1,Airport g2);   //交叉两个种群
	void Clone(Airport g,Airport & newAirport);       //克隆父代
	void mute(int toCross, int toMute);    //选择一些种群进行变异操作
	void eliminate(int toCross, int toMute);   //保证种群中的相邻代机场航班延误时间段数不同
	void sort();
	void OutAirport(Airport air);
	virtual ~CAirportDepView();
	void Generate_Airport();   //初始化所有代的机场种群
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CAirportDepView)
	afx_msg void OnAirportdep();
	afx_msg void OnGA();
	afx_msg void OnAirportArr();
	afx_msg void OnCIA();
	afx_msg void OnFCFS();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	
	CPoint m_ptOrigin; //光标
	CStringArray m_strPath;  //存放字符串
	CStringArray m_strArray;  //存放字符串
	vector<Airport> airport;
	int MUTE_FACTOR;   //变异因子
	int CROSS_FACTOR;  //交叉因子
	int population;      //最大种群数
};

#ifndef _DEBUG  // debug version in AirportDepView.cpp
inline CAirportDepDoc* CAirportDepView::GetDocument()
   { return (CAirportDepDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_AIRPORTDEPVIEW_H__4472DE3E_D427_4F6B_824B_8646528224FE__INCLUDED_)

⌨️ 快捷键说明

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