43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
75 "' has to be given in the definition of flow '" +
id +
"'.");
83 "' are allowed in flow '" +
id +
"'.");
90 "' is needed in flow '" +
id +
"'.");
100 #ifdef HAVE_SUBSECOND_TIMESTEPS
109 if (ok && vph <= 0) {
111 throw ProcessError(
"Invalid repetition rate in the definition of flow '" +
id +
"'.");
113 if (ok && vph != 0) {
122 if (ok && ret->
depart < 0) {
124 throw ProcessError(
"Negative begin time in the definition of flow '" +
id +
"'.");
133 if (ok && end <= ret->depart) {
135 throw ProcessError(
"Flow '" +
id +
"' ends before or at its begin time.");
148 throw ProcessError(
"Negative repetition number in the definition of flow '" +
id +
"'.");
156 throw ProcessError(
"Invalid repetition rate in the definition of flow '" +
id +
"'.");
174 bool skipID,
bool skipDepart) {
176 std::string id, errorMsg;
183 "' have to be given both in the definition of '" +
id +
"'.");
195 if (helper ==
"triggered") {
200 if (ok && ret->
depart < 0) {
201 errorMsg =
"Negative departure time in the definition of '" +
id +
"'.";
208 WRITE_WARNING(
"period and repno are deprecated in vehicle '" +
id +
"', use flows instead.");
210 #ifdef HAVE_SUBSECOND_TIMESTEPS
284 if (helper ==
"random") {
286 }
else if (helper ==
"free") {
288 }
else if (helper ==
"allowed") {
290 }
else if (helper ==
"best") {
297 throw ProcessError(
"Invalid departLane definition for " + element +
" '" + ret->
id +
"'");
300 throw ProcessError(
"Invalid departLane definition for " + element +
" '" + ret->
id +
"'");
302 throw ProcessError(
"Invalid departLane definition for " + element +
" '" + ret->
id +
"'");
316 if (helper ==
"random") {
318 }
else if (helper ==
"random_free") {
320 }
else if (helper ==
"free") {
322 }
else if (helper ==
"base") {
324 }
else if (helper ==
"pwagSimple") {
326 }
else if (helper ==
"pwagGeneric") {
328 }
else if (helper ==
"maxSpeedGap") {
335 throw ProcessError(
"Invalid departPos definition for " + element +
" '" + ret->
id +
"'");
337 throw ProcessError(
"Invalid departPos definition for " + element +
" '" + ret->
id +
"'");
351 if (helper ==
"random") {
353 }
else if (helper ==
"max") {
360 throw ProcessError(
"Invalid departSpeed definition for " + element +
" '" + ret->
id +
"'");
362 throw ProcessError(
"Invalid departSpeed definition for " + element +
" '" + ret->
id +
"'");
377 if (helper ==
"current") {
384 throw ProcessError(
"Invalid arrivalLane definition for " + element +
" '" + ret->
id +
"'");
386 throw ProcessError(
"Invalid arrivalLane definition for " + element +
" '" + ret->
id +
"'");
400 if (helper ==
"random") {
402 }
else if (helper ==
"max") {
409 throw ProcessError(
"Invalid arrivalPos definition for " + element +
" '" + ret->
id +
"'");
411 throw ProcessError(
"Invalid arrivalPos definition for " + element +
" '" + ret->
id +
"'");
425 if (helper ==
"current") {
432 throw ProcessError(
"Invalid arrivalSpeed definition for " + element +
" '" + ret->
id +
"'");
434 throw ProcessError(
"Invalid arrivalSpeed definition for " + element +
" '" + ret->
id +
"'");
445 throw ProcessError(
"Invalid color definition for " + element +
" '" + ret->
id +
"'");
447 throw ProcessError(
"Invalid color definition for " + element +
" '" + ret->
id +
"'");
462 WRITE_WARNING(
"The length does not include the gap to the preceeding vehicle anymore! Please recheck your values.");
472 WRITE_WARNING(
"The guiOffset attribute is deprecated! Please use minGap instead.");
551 CFAttrMap::const_iterator cf_it;
552 for (cf_it = allowedAttrs.begin(); cf_it != allowedAttrs.end(); cf_it++) {
553 if (cf_it->first == element) {
557 if (cf_it == allowedAttrs.end()) {
568 for (std::set<SumoXMLAttr>::const_iterator it = cf_it->second.begin(); it != cf_it->second.end(); it++) {
583 std::set<SumoXMLAttr> krausParams;
591 std::set<SumoXMLAttr> pwagParams;
600 std::set<SumoXMLAttr> idmParams;
608 std::set<SumoXMLAttr> idmmParams;
617 std::set<SumoXMLAttr> bkernerParams;
625 std::set<SumoXMLAttr> wiedemannParams;
638 const std::string&
id) {