-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRoute.h
39 lines (35 loc) · 1.04 KB
/
Route.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
#pragma once
#include "Node.h"
using namespace std;
class Node;
class Route{
public:
Node* depot;
//vector<double> C;// cumulative cost
int length = 0;// number of client plus depot on route
//int posInSet;// position in set of route (using for update LS)
Param* pr;
vector<bool> isNodeTested;// true if all move with this node are tested on this route
Route(){}
Route(Param* _pr) {
pr = _pr;
for (int i = 1; i <= pr->numClient; ++i)isNodeTested.push_back(false);
}
void ckRoute();
void insertToRou(Node* u);
void insertToRouPrev(Node* u);
void clearRouteFrom(Node* u);
void clearRouteFromRev(Node* u);
int caculateDis();
void updateRoute();
int getCliInRou(int* arr, int* arrLoc);//return num of client in rou
void showR();
void showRInFile(ostream& os);
void showRLoc();
void showRLocInFile(ostream& os);
void showR_rev();
void reverse1Dep();
void reverse();
void clearNode();// remove all client in route
~Route();
};