57 #include <mesosim/MELoop.h>
58 #include <mesosim/METriggeredCalibrator.h>
61 #ifdef CHECK_MEMORY_LEAKS
63 #endif // CHECK_MEMORY_LEAKS
91 WRITE_ERROR(
"Unknown edge ('" +
id +
"') referenced in a vaporizer.");
100 WRITE_ERROR(
"A vaporization begin time is negative (edge id='" +
id +
"').");
104 WRITE_ERROR(
"A vaporization ends before it starts (edge id='" +
id +
"').");
119 const std::string& base) {
131 throw InvalidArgument(
"The lanes to use within MSLaneSpeedTrigger '" +
id +
"' are not known.");
133 std::vector<MSLane*> lanes;
134 std::vector<std::string> laneIDs;
136 for (std::vector<std::string>::iterator i = laneIDs.begin(); i != laneIDs.end(); ++i) {
139 throw InvalidArgument(
"The lane to use within MSLaneSpeedTrigger '" +
id +
"' is not known.");
141 lanes.push_back(lane);
143 if (lanes.size() == 0) {
144 throw InvalidArgument(
"No lane defined for MSLaneSpeedTrigger '" +
id +
"'.");
175 std::vector<std::string> lines;
184 const std::string& base) {
199 if (routeProbe !=
"") {
204 METriggeredCalibrator* trigger = buildMECalibrator(net,
id, &lane->
getEdge(), pos, file, outfile, freq, probe);
220 const std::string& base) {
231 throw InvalidArgument(
"The edge to use within MSTriggeredRerouter '" +
id +
"' is not known.");
233 std::vector<MSEdge*> edges;
234 std::vector<std::string> edgeIDs;
236 for (std::vector<std::string>::iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) {
239 throw InvalidArgument(
"The edge to use within MSTriggeredRerouter '" +
id +
"' is not known.");
241 edges.push_back(edge);
243 if (edges.size() == 0) {
244 throw InvalidArgument(
"No edges found for MSTriggeredRerouter '" +
id +
"'.");
249 throw InvalidArgument(
"Could not parse MSTriggeredRerouter '" +
id +
"'.");
263 const std::vector<MSLane*>& destLanes,
264 const std::string& file) {
270 METriggeredCalibrator*
271 NLTriggerBuilder::buildMECalibrator(
MSNet& ,
const std::string&
id,
273 const std::string& file,
274 const std::string& outfile,
276 return new METriggeredCalibrator(
id, edge, pos, file, outfile, freq, MSGlobals::gMesoNet->getSegmentForEdge(*edge, pos)->getLength(), probe);
284 const std::string& file,
285 const std::string& outfile,
293 std::vector<MSEdge*>& edges,
294 SUMOReal prob,
const std::string& file,
bool off) {
301 const std::vector<std::string>& lines,
306 throw InvalidArgument(
"Could not build bus stop '" +
id +
"'; probably declared twice.");
315 const std::string& base,
316 const bool allowEmpty) {
336 const std::string& tt,
337 const std::string& tid) {
342 throw InvalidArgument(
"The lane " + objectid +
" to use within the " + tt +
" '" + tid +
"' is not known.");
351 const std::string& tt,
const std::string& tid) {
365 throw InvalidArgument(
"The position of " + tt +
" '" + tid +
"' lies beyond the lane's '" + lane->
getID() +
"' length.");