#pragma once #include "GreedyTSP.h" class AFX_EXT_CLASS CAnnealingTSP : public CGreedyTSP { public: CAnnealingTSP(void); virtual ~CAnnealingTSP(void); virtual void Reset(); virtual void SetPathData(const VectorPathData& vecPathData, const SPathData& ptStart); virtual double CalculateTSP(); protected: double getLength(int i, int j); bool anneal(double d); // int *m_pPathCurrent; VectorInteger m_vecPathCurrent; // * The current order of cities. double m_dTemperature; // * The current temperature. double m_dDelta; double m_dTotalDistanceCurrent; // * The length of the current path. };