14 vector<pair<string, string>> TransportFacilityReader::readFacilities(
string filename) {
15 ifstream my_file(filename.c_str());
16 if (!my_file.good()) {
17 throw invalid_argument(
"Invalid facility file.");
20 vector<pair<string, string>> result;
23 getline(my_file, line);
24 while (getline(my_file, line)) {
25 result.push_back(parseFacility(line));
31 pair<string, string> TransportFacilityReader::parseFacility(
string row) {
32 vector<string> values = StringUtils::split(row,
",");
34 if (values.size() != 2) {
36 " elements, it should be 2.");
39 return make_pair(values[0], values[1]);
string toString(ClusterType c)
Converts a ClusterType value to corresponding name.
Time Dependent Person DataType.
Conversion from or to string.