Skip to content

Commit

Permalink
Merge branch 'main' of github.com:eclipse-sumo/sumo into Netedit_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 20, 2024
2 parents a49ebaa + 174111c commit 03c07d9
Show file tree
Hide file tree
Showing 11 changed files with 289 additions and 215 deletions.
1 change: 1 addition & 0 deletions src/netbuild/NBEdge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@ NBEdge::addEdge2EdgeConnection(NBEdge* dest, bool overrideRemoval, SVCPermission
if (dest == nullptr) {
invalidateConnections();
myConnections.push_back(Connection(-1, dest, -1));
myStep = EdgeBuildingStep::LANES2LANES_USER;
} else if (find_if(myConnections.begin(), myConnections.end(), connections_toedge_finder(dest)) == myConnections.end()) {
myConnections.push_back(Connection(-1, dest, -1));
myConnections.back().permissions = permissions;
Expand Down
27 changes: 26 additions & 1 deletion src/netbuild/NBNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ NBNode::computeLanes2Lanes() {
}
#ifdef DEBUG_CONNECTION_GUESSING
if (DEBUGCOND) {
std::cout << "l2l node=" << getID() << " bresenham:\n";
std::cout << "l2l node=" << getID() << " outgoing=" << currentOutgoing->getID() << " bresenham:\n";
for (NBEdge* e : myIncomingEdges) {
const std::vector<NBEdge::Connection>& elv = e->getConnections();
for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
Expand Down Expand Up @@ -1428,6 +1428,11 @@ NBNode::computeLanes2Lanes() {
// find incoming lane for neighboring outgoing
for (int i = 0; i < toLane; i++) {
if (outToIn.count(i) != 0) {
#ifdef DEBUG_CONNECTION_GUESSING
if (DEBUGCOND) {
std::cout << "l2l node=" << getID() << " from=" << incoming->getID() << " to " << currentOutgoing->getLaneID(toLane) << " (changeProhibited, secondTarget)\n";
}
#endif
incoming->setConnection(outToIn[i], currentOutgoing, toLane, NBEdge::Lane2LaneInfoType::COMPUTED);
added = true;
break;
Expand All @@ -1436,6 +1441,11 @@ NBNode::computeLanes2Lanes() {
if (!added) {
for (int i = toLane; i < currentOutgoing->getNumLanes(); i++) {
if (outToIn.count(i) != 0) {
#ifdef DEBUG_CONNECTION_GUESSING
if (DEBUGCOND) {
std::cout << "l2l node=" << getID() << " from=" << incoming->getID() << " to " << currentOutgoing->getLaneID(toLane) << " (changeProhibited, newTarget)\n";
}
#endif
incoming->setConnection(outToIn[i], currentOutgoing, toLane, NBEdge::Lane2LaneInfoType::COMPUTED);
added = true;
break;
Expand Down Expand Up @@ -1570,6 +1580,11 @@ NBNode::recheckVClassConnections(NBEdge* currentOutgoing) {
// find a dedicated bike lane as target
if (bikeLaneTarget >= 0) {
incoming->setConnection(i, currentOutgoing, bikeLaneTarget, NBEdge::Lane2LaneInfoType::COMPUTED);
#ifdef DEBUG_CONNECTION_GUESSING
if (DEBUGCOND) {
std::cout << " extra bike connection from=" << incoming->getLaneID(i) << " (bikelane) to=" << currentOutgoing->getLaneID(bikeLaneTarget) << "\n";
}
#endif
builtConnection = true;
} else {
// use any lane that allows bicycles
Expand All @@ -1579,6 +1594,11 @@ NBNode::recheckVClassConnections(NBEdge* currentOutgoing) {
const bool allowDouble = (incoming->getPermissions(i) == SVC_BICYCLE
&& (dir == LinkDirection::RIGHT || dir == LinkDirection::PARTRIGHT || dir == LinkDirection::STRAIGHT));
incoming->setConnection(i, currentOutgoing, i2, NBEdge::Lane2LaneInfoType::COMPUTED, allowDouble);
#ifdef DEBUG_CONNECTION_GUESSING
if (DEBUGCOND) {
std::cout << " extra bike connection from=" << incoming->getLaneID(i) << " to=" << currentOutgoing->getLaneID(i2) << "\n";
}
#endif
builtConnection = true;
break;
}
Expand All @@ -1599,6 +1619,11 @@ NBNode::recheckVClassConnections(NBEdge* currentOutgoing) {
for (int i = start; i < end; i += inc) {
if ((incoming->getPermissions(i) & SVC_BICYCLE) != 0) {
incoming->setConnection(i, currentOutgoing, bikeLaneTarget, NBEdge::Lane2LaneInfoType::COMPUTED);
#ifdef DEBUG_CONNECTION_GUESSING
if (DEBUGCOND) {
std::cout << " extra bike connection from=" << incoming->getLaneID(i) << " (final) to=" << currentOutgoing->getLaneID(bikeLaneTarget) << "\n";
}
#endif
break;
}
}
Expand Down
17 changes: 6 additions & 11 deletions src/netedit/frames/GNEAttributesEditorRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ GNEAttributesEditorRow::showAttributeRow(const GNEAttributeProperties& attrPrope
}
// show elements depending of attribute properties
if (attrProperty.isActivatable()) {
showAttributeToggleEnable(attrProperty, firstEditedAC->isAttributeEnabled(myAttribute), attributeEnabled);
showAttributeToggleEnable(attrProperty, firstEditedAC->isAttributeEnabled(myAttribute));
} else if (myAttribute == GNE_ATTR_PARENT) {
showAttributeReparent(attributeEnabled);
} else if ((myAttribute == SUMO_ATTR_TYPE) && tagProperty.hasTypeParent()) {
showAttributeInspectParent(attrProperty, attributeEnabled);
} else if (myAttribute == SUMO_ATTR_ALLOW) {
} else if (attrProperty.isVClass() && (myAttribute != SUMO_ATTR_DISALLOW)) {
showAttributeVClass(attrProperty, attributeEnabled);
} else if (myAttribute == SUMO_ATTR_COLOR) {
showAttributeColor(attrProperty, attributeEnabled);
Expand All @@ -197,7 +197,7 @@ GNEAttributesEditorRow::showAttributeRow(const GNEAttributeProperties& attrPrope
// continue depending of type of attribute
if (attrProperty.isBool()) {
showValueCheckButton(value, attributeEnabled, computedAttribute);
} else if (attrProperty.isDiscrete() || attrProperty.isVType()) {
} else if (!attrProperty.isVClass() && (attrProperty.isDiscrete() || attrProperty.isVType())) {
showValueComboBox(attrProperty, value, attributeEnabled, computedAttribute);
} else {
showValueString(value, attributeEnabled, computedAttribute);
Expand Down Expand Up @@ -339,7 +339,7 @@ GNEAttributesEditorRow::onCmdSetAttribute(FXObject* obj, FXSelector, void*) {


// first check if set default value
if (myValueTextField->getText().empty() && attrProperties.hasDefaultValue()) {
if (myValueTextField->getText().empty() && attrProperties.hasDefaultValue() && !attrProperties.isVClass()) {
// update text field without notify
myValueTextField->setText(attrProperties.getDefaultValue().c_str(), FALSE);
}
Expand Down Expand Up @@ -427,15 +427,10 @@ GNEAttributesEditorRow::getAttributeValue(const bool enabled) const {


void
GNEAttributesEditorRow::showAttributeToggleEnable(const GNEAttributeProperties& attrProperty, const bool value,
const bool enabled) {
GNEAttributesEditorRow::showAttributeToggleEnable(const GNEAttributeProperties& attrProperty, const bool value) {
myAttributeToggleEnableCheckButton->setText(attrProperty.getAttrStr().c_str());
myAttributeToggleEnableCheckButton->setCheck(value);
if (enabled) {
myAttributeToggleEnableCheckButton->enable();
} else {
myAttributeToggleEnableCheckButton->disable();
}
myAttributeToggleEnableCheckButton->enable();
myAttributeToggleEnableCheckButton->show();
// hide other elements
myAttributeLabel->hide();
Expand Down
2 changes: 1 addition & 1 deletion src/netedit/frames/GNEAttributesEditorRow.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class GNEAttributesEditorRow : protected FXHorizontalFrame {
const std::string getAttributeValue(const bool enabled) const;

/// @brief show attribute toogle enable
void showAttributeToggleEnable(const GNEAttributeProperties& attrProperty, const bool value, const bool enabled);
void showAttributeToggleEnable(const GNEAttributeProperties& attrProperty, const bool value);

/// @brief show attribute reparent
void showAttributeReparent(const bool enabled);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Warning: Lane '-326116286#2_1' is not connected from any incoming edge at junction '25662542'.
Warning: Lane '-326116286#2_2' is not connected from any incoming edge at junction '25662542'.
Warning: Edge '-4402014#2' is not connected to outgoing edges at junction '25662542'.
Warning: Lane '-4588217#5_1' is not connected from any incoming edge at junction '25662542'.
Warning: Edge '-4588220#2' is not connected to outgoing edges at junction '25662542'.
Warning: Edge '326116286#0' is not connected to outgoing edges at junction '25662542'.
Warning: Lane '4402014#0_1' is not connected from any incoming edge at junction '25662542'.
Warning: Lane '4402014#0_2' is not connected from any incoming edge at junction '25662542'.
Warning: Edge '4588217#3' is not connected to outgoing edges at junction '25662542'.
Warning: The traffic light 'GS_25662542' does not control any links; it will not be build.
Warning: Could not build program '0' for traffic light 'GS_25662542'
Warning: 7 total messages of type: Lane '%' is not connected from any incoming edge at junction '%'.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-12-20 10:25:35 by Eclipse SUMO netconvert Version v1_21_0+1522-8cbae08792c
<!-- generated on 2024-12-20 11:54:29 by Eclipse SUMO netconvert Version v1_21_0+1533-63f07eb042e
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -131,33 +131,10 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
</lane>
</edge>

<tlLogic id="GS_25662542" type="actuated" programID="0" offset="0">
<phase duration="42" state="rGGGGGG" minDur="5" maxDur="50"/>
<phase duration="3" state="rGyyGGG"/>
<phase duration="42" state="GGrrGGG" minDur="5" maxDur="50"/>
<phase duration="3" state="yGrrGGG"/>
</tlLogic>

<junction id="2055804552" type="dead_end" x="0.00" y="37.72" incLanes="4402014#0_0 4402014#0_1 4402014#0_2" intLanes="" shape="0.00,37.72 -0.85,47.08 0.00,37.72"/>
<junction id="25662542" type="traffic_light" x="31.49" y="40.60" incLanes="4588217#3_0 4588217#3_1 -4588220#2_0 -4588220#2_1 -4588220#2_2 -4402014#2_0 -4402014#2_1 -4402014#2_2 326116286#0_0 326116286#0_1 326116286#0_2 326116286#0_3" intLanes="" shape="39.91,46.57 40.83,36.21 40.06,35.50 39.84,34.67 39.72,33.53 39.72,32.08 39.82,30.27 23.03,28.88 22.66,29.71 22.26,29.95 21.72,30.11 21.04,30.16 20.21,30.13 18.50,48.85 19.31,49.09 19.59,49.33 19.77,49.64 19.85,50.02 19.85,50.48 37.87,52.19 38.34,49.01 38.66,47.91 39.02,47.14 39.44,46.69">
<request index="0" response="0000100" foes="0000100"/>
<request index="1" response="0000000" foes="0000000"/>
<request index="2" response="0000000" foes="0000001"/>
<request index="3" response="0000000" foes="0000000"/>
<request index="4" response="0000000" foes="0000000"/>
<request index="5" response="0000000" foes="0000000"/>
<request index="6" response="0000000" foes="0000000"/>
</junction>
<junction id="25662542" type="dead_end" x="31.49" y="40.60" incLanes="4588217#3_0 4588217#3_1 -4588220#2_0 -4588220#2_1 -4588220#2_2 -4402014#2_0 -4402014#2_1 -4402014#2_2 326116286#0_0 326116286#0_1 326116286#0_2 326116286#0_3" intLanes="" shape="39.91,46.57 40.83,36.21 40.06,35.50 39.84,34.67 39.72,33.53 39.72,32.08 39.82,30.27 23.03,28.88 22.66,29.71 22.26,29.95 21.72,30.11 21.04,30.16 20.21,30.13 18.50,48.85 19.31,49.09 19.59,49.33 19.77,49.64 19.85,50.02 19.85,50.48 37.87,52.19 38.34,49.01 38.66,47.91 39.02,47.14 39.44,46.69"/>
<junction id="2882465305" type="dead_end" x="137.74" y="49.97" incLanes="-4588217#5_0 -4588217#5_1" intLanes="" shape="137.74,49.97 138.20,44.79 137.74,49.97"/>
<junction id="3327334153" type="dead_end" x="26.78" y="90.25" incLanes="-326116286#2_0 -326116286#2_1 -326116286#2_2" intLanes="" shape="26.78,90.25 34.20,90.95 26.78,90.25"/>
<junction id="5148507741" type="dead_end" x="34.84" y="0.00" incLanes="4588220#0_0 4588220#0_1 4588220#0_2" intLanes="" shape="34.84,-0.00 25.47,-0.78 34.84,0.00"/>

<connection from="-4588220#2" to="-4588217#5" fromLane="1" toLane="1" tl="GS_25662542" linkIndex="1" dir="r" state="O"/>
<connection from="-4588220#2" to="-326116286#2" fromLane="1" toLane="1" tl="GS_25662542" linkIndex="2" dir="s" state="O"/>
<connection from="-4588220#2" to="-326116286#2" fromLane="2" toLane="2" tl="GS_25662542" linkIndex="3" dir="s" state="O"/>
<connection from="326116286#0" to="4402014#0" fromLane="1" toLane="1" tl="GS_25662542" linkIndex="4" dir="r" state="O"/>
<connection from="326116286#0" to="4588220#0" fromLane="1" toLane="1" tl="GS_25662542" linkIndex="5" dir="s" state="O"/>
<connection from="326116286#0" to="4588220#0" fromLane="2" toLane="2" tl="GS_25662542" linkIndex="6" dir="s" state="O"/>
<connection from="4588217#3" to="-326116286#2" fromLane="1" toLane="1" tl="GS_25662542" linkIndex="0" dir="r" state="o"/>

</net>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-12-20 11:57:31 by Eclipse SUMO sumo Version v1_21_0+1542-16308667ffb
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This file may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License 2.0 are satisfied: GNU General Public License, version 2
or later which is available at
https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
<sumoConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
<net-file value="net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
</input>
<output>
<write-license value="true"/>
<edgedata-output value="aggregated.xml"/>
</output>
<processing>
<default.speeddev value="0"/>
</processing>
<report>
<xml-validation value="never"/>
<duration-log.disable value="true"/>
<duration-log.statistics value="true"/>
<no-step-log value="true"/>
</report>
<mesoscopic>
<mesosim value="true"/>
<meso-junction-control value="true"/>
</mesoscopic>
</sumoConfiguration>
-->

<meandata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/meandata_file.xsd">
<interval begin="0.00" end="323.00" id="DEFAULT_EDGEDATA">
<edge id="A0right0" sampledSeconds="601.90" traveltime="6.02" overlapTraveltime="6.38" density="22.29" laneDensity="22.29" occupancy="11.15" waitingTime="0.00" timeLoss="0.03" speed="13.89" speedRelative="1.00" departed="0" arrived="100" entered="100" left="0" laneChangedFrom="0" laneChangedTo="0"/>
<edge id="bottom0A0" sampledSeconds="1722.14" traveltime="34.44" overlapTraveltime="36.50" density="63.78" laneDensity="21.26" occupancy="10.63" waitingTime="0.00" timeLoss="1421.20" speed="2.43" speedRelative="0.17" departed="50" arrived="0" entered="0" left="50" laneChangedFrom="0" laneChangedTo="0"/>
<edge id="left0A0" sampledSeconds="2764.04" traveltime="55.28" overlapTraveltime="58.59" density="102.36" laneDensity="34.12" occupancy="17.06" waitingTime="0.00" timeLoss="2463.11" speed="1.51" speedRelative="0.11" departed="50" arrived="0" entered="0" left="50" laneChangedFrom="0" laneChangedTo="0"/>
</interval>
</meandata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Loading net-file from 'net.net.xml' ... done (1ms).
Loading done.
Simulation version v1_21_0+1542-16308667ffb started with time: 0.00.
Simulation ended at time: 323.00.
Reason: All vehicles have left the simulation.
Statistics (avg of 100):
RouteLength: 167.20
Speed: 4.84
Duration: 51.44
WaitingTime: 2.90
TimeLoss: 38.84
DepartDelay: 37.12
4 changes: 4 additions & 0 deletions tests/tools/import/OSM/webWizard/errors.tools
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,9 @@ Warning: Person 'ped122' is jammed on edge ':1828018040_c0', time=639.00.
Warning: Vehicle 'pt_tram_12:0.1' performs emergency braking on lane ':98973667_3_0' with decel=7.00, wished=3.00, severity=1.00, time=755.00.
Warning: Person 'ped67' aborted waiting for M5:3 at busStop '30731481'.
Warning: Person 'ped94' aborted waiting for N2:0 at busStop '2915590925'.
Warning: Person 'ped145' aborted waiting for N42:0 at busStop '2915590925'.
Warning: Person 'ped157' aborted waiting for N42:1 at busStop '3867910439'.
Warning: Person 'ped136' aborted waiting for N42:1 at busStop '3867910439'.
Warning: Person 'ped155' aborted waiting for N42:1 at busStop '3867910439'.
Warning: Person 'ped59' aborted waiting for M5:0 at busStop '1633759766'.
Warning: Person 'ped47' aborted waiting for TXL:0 at busStop '3869306771'.
Loading

0 comments on commit 03c07d9

Please sign in to comment.