-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstance_Generator.h
More file actions
44 lines (27 loc) · 893 Bytes
/
Instance_Generator.h
File metadata and controls
44 lines (27 loc) · 893 Bytes
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
#ifndef __INST_GENERATOR__
#define __INST_GENERATOR__
#include "Tools.h"
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
class Instance_Generator {
protected :
float Backpack_capacity;
int n_items;
int p_criteria;
int nb_instances;
vector< tuple<float, vector< float> > > Items_information;
public:
Instance_Generator(int n, int p, int nb_inst);
void random_instances(string path);
void conflicting_instances(string path);
string write_content(vector< string > weights, vector< vector< string > > utilities, string Weight);
void readFile(string filename);
vector< float > PL_WS(vector<float> WS_vector);
void set_Efficient_front(string filename);
float get_weight_of(int i) { return std::get<0>(Items_information[i]); };
float get_utility(int i, int j) { return std::get<1>(Items_information[i])[j]; };
};
#endif