SDC C-Project CF Review 프로그램
SWK
2023-03-10 5ce2e7ca14f09da2138ea783ef16044a01423413
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#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.
 
};