-
Notifications
You must be signed in to change notification settings - Fork 2
/
SimAnneal.h
62 lines (49 loc) · 1.33 KB
/
SimAnneal.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// SimAnneal.h
#ifndef _SIMANNEAL_H_
#define _SIMANNEAL_H_
#include "BBox.h"
#include "DataPlace.h"
using namespace std;
class SimAnneal {
private:
void generate();
void calibrate();
double cost();
bool accept(double newCost, double oldCost, double curTemp);
void dynamic_window();
void update(double& curTemp);
void update_Lam(double& curTemp);
void anneal_detailed();
void anneal_global();
size_t I, maxI;
size_t updateCount, maxUpdate;
size_t acceptCount;
double curRate;
double windowfactor;
double xspan, yspan;
DataPlace& rb;
BBox layoutBBox;
double layoutXSize, layoutYSize, layoutArea;
size_t maxIter;
size_t calibMaxIter;
double initTemp;
double curTemp;
double stopTemp;
double k;
bool greedy, detailed;
double hpwl, avghpwl, totalhpwl;
double overlap, avgoverlap, totaloverlap;
double penaltyRow;
double oldCost, newCost;
double lambda, lambdaP;
vector<size_t> movables;
vector<Point> oldPlace;
vector<Point> newPlace;
double posAcceptCount, negAcceptCount, totalCount;
size_t itCount;
void initPlacement(DataPlace& _rb);
void fillingRows(DataPlace& _rb);
public:
SimAnneal(DataPlace& rbplace, bool gr, bool det);
};
#endif