-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
67 lines (51 loc) · 1.86 KB
/
main.cpp
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
63
64
65
66
67
#include <iostream>
#include "system.hpp"
#include "localnode.hpp"
#include "scp.hpp"
#include "simulation.hpp"
// void trigger(System * system, unsigned nodeId, int value);
// void printStatus(System * system);
int main() {
Simulation::simulate();
// System system(7, "System");
// cout << system.name << ": started!\n";
// vector<unsigned> vect0{0, 1, 2, 3, 4, 5};
// system.nodes.at(0)->updateQset(vect0);
// cout << "\nNode 0's qset: ";
// for (auto i = vect0.begin(); i != vect0.end(); ++i)
// std::cout << *i << ' ';
// vector<unsigned> vect1{0, 1, 3, 4, 5};
// system.nodes.at(1)->updateQset(vect1);
// cout << "\nNode 1's qset: ";
// for (auto i = vect1.begin(); i != vect1.end(); ++i)
// std::cout << *i << ' ';
// vector<unsigned> vect2{1, 2, 3, 5, 6};
// system.nodes.at(2)->updateQset(vect2);
// cout << "\nNode 2's qset: ";
// for (auto i = vect2.begin(); i != vect2.end(); ++i)
// std::cout << *i << ' ';
// vector<unsigned> vect3{3, 4, 5, 6};
// system.nodes.at(3)->updateQset(vect3);
// cout << "\nNode 3's qset: ";
// for (auto i = vect3.begin(); i != vect3.end(); ++i)
// std::cout << *i << ' ';
// vector<unsigned> vect4{1, 3, 4};
// system.nodes.at(4)->updateQset(vect4);
// cout << "\nNode 4's qset: ";
// for (auto i = vect4.begin(); i != vect4.end(); ++i)
// std::cout << *i << ' ';
// vector<unsigned> vect5{0, 1, 2, 3, 5};
// system.nodes.at(5)->updateQset(vect5);
// cout << "\nNode 5's qset: ";
// for (auto i = vect5.begin(); i != vect5.end(); ++i)
// std::cout << *i << ' ';
// vector<unsigned> vect6{2, 3, 6};
// system.nodes.at(6)->updateQset(vect6);
// cout << "\nNode 6's qset: ";
// for (auto i = vect6.begin(); i != vect6.end(); ++i)
// std::cout << *i << ' ';
// cout << "\n\n";
// trigger(&system, 0, 3);
// printStatus(&system);
return 0;
}