51 #ifdef CHECK_MEMORY_LEAKS
53 #endif // CHECK_MEMORY_LEAKS
98 if (!oc.
isSet(
"matsim-files")) {
106 for (std::vector<std::string>::const_iterator file = files.begin(); file != files.end(); ++file) {
109 WRITE_ERROR(
"Could not open matsim-file '" + *file +
"'.");
112 nodesHandler.setFileName(*file);
122 for (std::vector<std::string>::const_iterator file = files.begin(); file != files.end(); ++file) {
137 matsimAttrs, MATSIM_ATTR_NOTHING,
138 "matsim - file"), myNodeCont(toFill) {
160 WRITE_ERROR(
"Unable to project coordinates for node '" +
id +
"'.");
163 if (!myNodeCont.insert(node)) {
165 WRITE_ERROR(
"Could not add node '" +
id +
"'. Probably declared twice.");
175 bool keepEdgeLengths,
bool lanesFromCapacity,
179 myNodeCont(nc), myEdgeCont(toFill), myCapacityNorm(3600),
180 myKeepEdgeLengths(keepEdgeLengths), myLanesFromCapacity(lanesFromCapacity),
181 myCapacity2Lanes(capacity2Lanes) {
197 myCapacityNorm = (
SUMOReal)(capDivider * 3600);
205 if (st.
size() != 3) {
206 WRITE_ERROR(
"Bogus capacity period format; requires 'hh:mm:ss'.");
213 myCapacityNorm = (
SUMOReal)(hours * 3600 + minutes * 60 + seconds);
234 NBNode* fromNode = myNodeCont.retrieve(fromNodeID);
235 NBNode* toNode = myNodeCont.retrieve(toNodeID);
237 WRITE_ERROR(
"Could not find from-node for edge '" +
id +
"'.");
240 WRITE_ERROR(
"Could not find to-node for edge '" +
id +
"'.");
242 if (fromNode == 0 || toNode == 0) {
245 if (myLanesFromCapacity) {
246 permLanes = myCapacity2Lanes.get(capacity);
248 NBEdge* edge =
new NBEdge(
id, fromNode, toNode,
"", freeSpeed, (
unsigned int) permLanes, -1, -1, -1);
249 if (myKeepEdgeLengths) {
252 if (!myEdgeCont.insert(edge)) {
254 WRITE_ERROR(
"Could not add edge '" +
id +
"'. Probably declared twice.");