forked from woodbri/vrpdptw
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProblem.h
48 lines (34 loc) · 931 Bytes
/
Problem.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
#ifndef PROBLEM_H
#define PROBLEM_H
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <math.h>
#include "Node.h"
#include "Order.h"
const double w1 = 1.0; // route duration weighting
const double w2 = 1000.0; // total number of time violations weight
const double w3 = 1.0; // total number of capacity violations weight
class Problem {
public:
int K; // number of vehicles
int Q; // capacity
int DepotClose;
double atwl;
std::vector<Node> N; // vector of nodes
std::vector<Order> O; // vector of orders
// variables for plotting
double extents[4];
// Problem() {};
// ~Problem() {};
void loadProblem(char *infile);
unsigned int getNodeCount();
unsigned int getOrderCount();
double distance(int n1, int n2) const;
void makeOrders();
void dump();
void calcAvgTWLen();
};
#endif