This repository was archived by the owner on Apr 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenadp.cpp
More file actions
60 lines (46 loc) · 1.71 KB
/
openadp.cpp
File metadata and controls
60 lines (46 loc) · 1.71 KB
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
// #include <string> // XXX need to be moved to SimpleSolver.h
// #include <boost/numeric/ublas/vector.hpp>
// #include <boost/numeric/ublas/matrix.hpp>
#include "Solver.h"
#include "Resource.h"
#include "Decision.h"
#include "SimpleParameter.h"
#include "SolverParameter.h"
#include "PLValueFunction.h"
#include "PLOptimizer.h"
#include "STCStepsize.h"
using namespace boost::numeric::ublas;
int main(int argc, char *argv[]) {
//SimpleParameter params;
//params.general.iterate = 200;
SolverParameter params;
vector<vector<Resource> > resources(3);
vector<matrix<Decision> > decisions(3);
Solver<PLValueFunction, PLOptimizer, STCStepsize> sol(resources, decisions,
params);
// vector<vector<std::string> > resourceAttributes;
// vector<vector<std::string> > decisionAttributes;
// vector<Resource> resources(4);
// matrix<Connection> connections(4, 4);
//resources(0) = Resource(0, 1);
//resources(1) = Resource(10, 1);
//resources(2) = Resource(0, 1);
//resources(3) = Resource(-1, 1);
//connections(0, 0) = Connection(0, 0);
//connections(0, 1) = Connection(10, 1);
//connections(0, 2) = Connection(10, 1);
//connections(0, 3) = Connection(10, 1);
//connections(1, 0) = Connection(0, 0);
//connections(1, 1) = Connection(0, 0);
//connections(1, 2) = Connection(10, 1);
//connections(1, 3) = Connection(0, 0);
//connections(2, 0) = Connection(0, 0);
//connections(2, 1) = Connection(0, 0);
//connections(2, 2) = Connection(0, 0);
//connections(2, 3) = Connection(0, 0);
//connections(3, 0) = Connection(0, 0);
//connections(3, 1) = Connection(0, 0);
//connections(3, 2) = Connection(10, 1);
//connections(3, 3) = Connection(0, 0);
return 0;
}