vehicle.cpp

来自「这是我写毕业论文的源程序,用模拟退火算法求解VRPTW问题.在我机子上运行过了,」· C++ 代码 · 共 63 行

CPP
63
字号
// Vehicle.cpp: implementation of the CVehicle class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Vehicle.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CVehicle::CVehicle(double vacuum,UINT firstClient)
{

	this->firstClient=firstClient;
	this->vacuum=vacuum;  
}
CVehicle::CVehicle(const CVehicle &vehicle)
{
	*this=vehicle;
}
void CVehicle::SetVehicle(UINT firstClient,UINT vacuum)
{

	this->firstClient;
	this->vacuum=vacuum;
}
CVehicle::~CVehicle()
{

}
UINT CVehicle::GetFirst()
{
	return firstClient;
}


void CVehicle::SetFirst(UINT first)
{
	this->firstClient=first;

}

void CVehicle::SetVacuum(double vacumm)
{
    this->vacuum=vacumm;
}

double CVehicle::GetVacuum()
{
   return vacuum;
}  

bool CVehicle::operator ==(const CVehicle ve) const
{
	if(this->firstClient==ve.firstClient)
	{	if(this->vacuum==ve.vacuum)
			return true;
	}
		return false;

}

⌨️ 快捷键说明

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