55 #include <mesosim/METriggeredCalibrator.h>
58 #ifdef CHECK_MEMORY_LEAKS
60 #endif // CHECK_MEMORY_LEAKS
88 WRITE_ERROR(
"Unknown edge ('" +
id +
"') referenced in a vaporizer.");
97 WRITE_ERROR(
"A vaporization begin time is negative (edge id='" +
id +
"').");
101 WRITE_ERROR(
"A vaporization ends before it starts (edge id='" +
id +
"').");
116 const std::string& base) {
128 throw InvalidArgument(
"The lanes to use within MSLaneSpeedTrigger '" +
id +
"' are not known.");
130 std::vector<MSLane*> lanes;
131 std::vector<std::string> laneIDs;
133 for (std::vector<std::string>::iterator i = laneIDs.begin(); i != laneIDs.end(); ++i) {
136 throw InvalidArgument(
"The lane to use within MSLaneSpeedTrigger '" +
id +
"' is not known.");
138 lanes.push_back(lane);
140 if (lanes.size() == 0) {
141 throw InvalidArgument(
"No lane defined for MSLaneSpeedTrigger '" +
id +
"'.");
172 std::vector<std::string> lines;
181 const std::string& base) {
196 METriggeredCalibrator* trigger = buildMECalibrator(net,
id, &lane->
getEdge(), pos, file, outfile, freq);
212 const std::string& base) {
223 throw InvalidArgument(
"The edge to use within MSTriggeredRerouter '" +
id +
"' is not known.");
225 std::vector<MSEdge*> edges;
226 std::vector<std::string> edgeIDs;
228 for (std::vector<std::string>::iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) {
231 throw InvalidArgument(
"The edge to use within MSTriggeredRerouter '" +
id +
"' is not known.");
233 edges.push_back(edge);
235 if (edges.size() == 0) {
236 throw InvalidArgument(
"No edges found for MSTriggeredRerouter '" +
id +
"'.");
241 throw InvalidArgument(
"Could not parse MSTriggeredRerouter '" +
id +
"'.");
255 const std::vector<MSLane*>& destLanes,
256 const std::string& file) {
262 METriggeredCalibrator*
263 NLTriggerBuilder::buildMECalibrator(
MSNet& ,
const std::string&
id,
265 const std::string& file,
266 const std::string& outfile,
268 return new METriggeredCalibrator(
id, edge, pos, file, outfile, freq);
276 const std::string& file,
277 const std::string& outfile,
279 return new MSCalibrator(
id, edge, pos, file, outfile, freq);
285 std::vector<MSEdge*>& edges,
286 SUMOReal prob,
const std::string& file,
bool off) {
293 const std::vector<std::string>& lines,
298 throw InvalidArgument(
"Could not build bus stop '" +
id +
"'; probably declared twice.");
307 const std::string& base,
308 const bool allowEmpty) {
328 const std::string& tt,
329 const std::string& tid) {
334 throw InvalidArgument(
"The lane " + objectid +
" to use within the " + tt +
" '" + tid +
"' is not known.");
343 const std::string& tt,
const std::string& tid) {
357 throw InvalidArgument(
"The position of " + tt +
" '" + tid +
"' lies beyond the lane's '" + lane->
getID() +
"' length.");