-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
38 lines (34 loc) · 871 Bytes
/
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
/**
* @file main.cpp
* @author csl 3079625093@qq.com
* @version 0.1
* @date 2022-01-06
*
* @copyright Copyright (c) 2022
*
* @attention if you want to run this program, just:
* [1] cd netsolver/
* [2] mkdir build
* [3] cmake ..
* [4] make
* [5] ./netSolver
*/
#include "handler.h"
int main(int argc, char const *argv[])
{
try
{
// read the arcs data
auto arcs = ns_net::Handler::readData("../data/data.csv");
// construct the base nodes
auto baseNodes = std::vector<ns_net::Node>{ns_net::Node(2, 209.057), ns_net::Node(20, 212.706)};
// solve the net
ns_net::Handler handler(arcs, baseNodes);
handler.solve(true);
}
catch (const std::runtime_error &e)
{
std::cerr << e.what() << std::endl;
}
return 0;
}