Skip to content

Commit

Permalink
adapting tests #21 #1922
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Mar 14, 2024
1 parent 2087175 commit 2022739
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/microsim/devices/MSDevice_FCDReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ MSDevice_FCDReplay::insertOptions(OptionsCont& oc) {
insertDefaultAssignmentOptions("fcd-replay", "FCD Replay Device", oc);

oc.doRegister("device.fcd-replay.file", new Option_FileName());
oc.addDescription("device.fcd.begin", "FCD Replay Device", TL("FCD file to read"));
oc.addDescription("device.fcd-replay.file", "FCD Replay Device", TL("FCD file to read"));
}


Expand Down Expand Up @@ -93,9 +93,9 @@ MSDevice_FCDReplay::~MSDevice_FCDReplay() {

bool
MSDevice_FCDReplay::notifyMove(SUMOTrafficObject& veh,
double /*oldPos*/,
double /*newPos*/,
double /*newSpeed*/) {
double /*oldPos*/,
double /*newPos*/,
double /*newSpeed*/) {
if (myTrajectory == nullptr || myTrajectory->empty()) {
// TODO remove vehicle
return false;
Expand Down
27 changes: 26 additions & 1 deletion tests/sumo/meta/help/output.sumo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Eclipse SUMO sumo Version v1_19_0+1185-ef359fe9789
Eclipse SUMO sumo Version v1_19_0+1295-20871755e55
Copyright (C) 2001-2024 German Aerospace Center (DLR) and others; https://sumo.dlr.de
A microscopic, multi-modal traffic simulation.

Expand Down Expand Up @@ -367,6 +367,20 @@ Processing Options:
--pedestrian.striping.walkingarea-detail INT Generate INT intermediate
points to smooth out lanes within the
walkingarea
--pedestrian.jupedsim.step-length TIME The update interval of the JuPedSim
simulation (in seconds)
--pedestrian.jupedsim.exit-tolerance FLOAT The distance to accept the
JuPedSim arrival point (in meters)
--pedestrian.jupedsim.model STR The submodel to use in JuPedSim
(currently only 'CollisionFreeSpeed')
--pedestrian.jupedsim.strength-neighbor-repulsion FLOAT The neighbor
repulsion strength of the JuPedSim model
--pedestrian.jupedsim.range-neighbor-repulsion FLOAT The neighbor repulsion
range of the JuPedSim model (in meters)
--pedestrian.jupedsim.strength-geometry-repulsion FLOAT The geometry
repulsion strength of the JuPedSim model
--pedestrian.jupedsim.range-geometry-repulsion FLOAT The geometry repulsion
range of the JuPedSim model (in meters)
--ride.stop-tolerance FLOAT Tolerance to apply when matching
pedestrian and vehicle positions on
boarding at individual stops
Expand Down Expand Up @@ -820,6 +834,15 @@ Friction Device Options:
can be applied to the friction device ->
e.g. to force false measurements

FCD Replay Device Options:
--device.fcd-replay.probability FLOAT The probability for a vehicle to have
a 'fcd-replay' device
--device.fcd-replay.explicit STR[] Assign a 'fcd-replay' device to named
vehicles
--device.fcd-replay.deterministic The 'fcd-replay' devices are set
deterministic using a fraction of 1000
--device.fcd-replay.file FILE FCD file to read

TraCI Server Options:
--remote-port INT Enables TraCI Server if set
--num-clients INT Expected number of connecting clients
Expand Down Expand Up @@ -905,6 +928,8 @@ GUI Only Options:
position
--tracker-interval TIME The aggregation period for value tracker
windows
--osg-view Start with an OpenSceneGraph view
instead of the regular 2D view
--gui-testing Enable overlay for screen recognition
--gui-testing-debug Enable output messages during
GUI-Testing
Expand Down
20 changes: 19 additions & 1 deletion tests/sumo/meta/write_schema/cfg.sumo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-03-07 14:22:00 by Eclipse SUMO sumo Version v1_19_0+1185-ef359fe9789
<!-- generated on 2024-03-14 13:29:17 by Eclipse SUMO sumo Version v1_19_0+1295-20871755e55
-->

<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
Expand Down Expand Up @@ -31,6 +31,7 @@
<xsd:element name="tripinfo_device" type="tripinfo_deviceTopicType" minOccurs="0"/>
<xsd:element name="vehroutes_device" type="vehroutes_deviceTopicType" minOccurs="0"/>
<xsd:element name="friction_device" type="friction_deviceTopicType" minOccurs="0"/>
<xsd:element name="fcd_replay_device" type="fcd_replay_deviceTopicType" minOccurs="0"/>
<xsd:element name="traci_server" type="traci_serverTopicType" minOccurs="0"/>
<xsd:element name="mesoscopic" type="mesoscopicTopicType" minOccurs="0"/>
<xsd:element name="random_number" type="random_numberTopicType" minOccurs="0"/>
Expand Down Expand Up @@ -216,6 +217,13 @@
<xsd:element name="pedestrian.striping.reserve-oncoming.max" type="floatOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.striping.legacy-departposlat" type="boolOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.striping.walkingarea-detail" type="intOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.jupedsim.step-length" type="timeOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.jupedsim.exit-tolerance" type="floatOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.jupedsim.model" type="strOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.jupedsim.strength-neighbor-repulsion" type="floatOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.jupedsim.range-neighbor-repulsion" type="floatOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.jupedsim.strength-geometry-repulsion" type="floatOptionType" minOccurs="0"/>
<xsd:element name="pedestrian.jupedsim.range-geometry-repulsion" type="floatOptionType" minOccurs="0"/>
<xsd:element name="ride.stop-tolerance" type="floatOptionType" minOccurs="0"/>
<xsd:element name="mapmatch.distance" type="floatOptionType" minOccurs="0"/>
<xsd:element name="mapmatch.junctions" type="boolOptionType" minOccurs="0"/>
Expand Down Expand Up @@ -498,6 +506,15 @@
</xsd:all>
</xsd:complexType>

<xsd:complexType name="fcd_replay_deviceTopicType">
<xsd:all>
<xsd:element name="device.fcd-replay.probability" type="floatOptionType" minOccurs="0"/>
<xsd:element name="device.fcd-replay.explicit" type="strArrayOptionType" minOccurs="0"/>
<xsd:element name="device.fcd-replay.deterministic" type="boolOptionType" minOccurs="0"/>
<xsd:element name="device.fcd-replay.file" type="fileOptionType" minOccurs="0"/>
</xsd:all>
</xsd:complexType>

<xsd:complexType name="traci_serverTopicType">
<xsd:all>
<xsd:element name="remote-port" type="intOptionType" minOccurs="0"/>
Expand Down Expand Up @@ -552,6 +569,7 @@
<xsd:element name="window-size" type="strArrayOptionType" minOccurs="0"/>
<xsd:element name="window-pos" type="strArrayOptionType" minOccurs="0"/>
<xsd:element name="tracker-interval" type="timeOptionType" minOccurs="0"/>
<xsd:element name="osg-view" type="boolOptionType" minOccurs="0"/>
<xsd:element name="gui-testing" type="boolOptionType" minOccurs="0"/>
<xsd:element name="gui-testing-debug" type="boolOptionType" minOccurs="0"/>
<xsd:element name="gui-testing.setting-output" type="fileOptionType" minOccurs="0"/>
Expand Down
41 changes: 40 additions & 1 deletion tests/sumo/meta/write_template_commented_full/cfg.sumo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-03-07 14:22:00 by Eclipse SUMO sumo Version v1_19_0+1185-ef359fe9789
<!-- generated on 2024-03-14 13:29:17 by Eclipse SUMO sumo Version v1_19_0+1295-20871755e55
-->

<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
Expand Down Expand Up @@ -519,6 +519,27 @@
<!-- Generate INT intermediate points to smooth out lanes within the walkingarea -->
<pedestrian.striping.walkingarea-detail value="4" type="INT"/>

<!-- The update interval of the JuPedSim simulation (in seconds) -->
<pedestrian.jupedsim.step-length value="0.01" type="TIME"/>

<!-- The distance to accept the JuPedSim arrival point (in meters) -->
<pedestrian.jupedsim.exit-tolerance value="1" type="FLOAT"/>

<!-- The submodel to use in JuPedSim (currently only &apos;CollisionFreeSpeed&apos;) -->
<pedestrian.jupedsim.model value="CollisionFreeSpeed" type="STR"/>

<!-- The neighbor repulsion strength of the JuPedSim model -->
<pedestrian.jupedsim.strength-neighbor-repulsion value="8" type="FLOAT"/>

<!-- The neighbor repulsion range of the JuPedSim model (in meters) -->
<pedestrian.jupedsim.range-neighbor-repulsion value="0.1" type="FLOAT"/>

<!-- The geometry repulsion strength of the JuPedSim model -->
<pedestrian.jupedsim.strength-geometry-repulsion value="5" type="FLOAT"/>

<!-- The geometry repulsion range of the JuPedSim model (in meters) -->
<pedestrian.jupedsim.range-geometry-repulsion value="0.02" type="FLOAT"/>

<!-- Tolerance to apply when matching pedestrian and vehicle positions on boarding at individual stops -->
<ride.stop-tolerance value="10" type="FLOAT"/>

Expand Down Expand Up @@ -1154,6 +1175,21 @@

</friction_device>

<fcd_replay_device>
<!-- The probability for a vehicle to have a &apos;fcd-replay&apos; device -->
<device.fcd-replay.probability value="-1" type="FLOAT"/>

<!-- Assign a &apos;fcd-replay&apos; device to named vehicles -->
<device.fcd-replay.explicit value="" synonymes="device.fcd-replay.knownveh" type="STR[]"/>

<!-- The &apos;fcd-replay&apos; devices are set deterministic using a fraction of 1000 -->
<device.fcd-replay.deterministic value="false" type="BOOL"/>

<!-- FCD file to read -->
<device.fcd-replay.file value="" type="FILE"/>

</fcd_replay_device>

<traci_server>
<!-- Enables TraCI Server if set -->
<remote-port value="0" type="INT"/>
Expand Down Expand Up @@ -1275,6 +1311,9 @@
<!-- The aggregation period for value tracker windows -->
<tracker-interval value="1" type="TIME"/>

<!-- Start with an OpenSceneGraph view instead of the regular 2D view -->
<osg-view value="false" type="BOOL"/>

<!-- Enable overlay for screen recognition -->
<gui-testing value="false" type="BOOL"/>

Expand Down
17 changes: 16 additions & 1 deletion tests/sumo/meta/write_template_full/cfg.sumo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-03-07 14:22:00 by Eclipse SUMO sumo Version v1_19_0+1185-ef359fe9789
<!-- generated on 2024-03-14 13:29:17 by Eclipse SUMO sumo Version v1_19_0+1295-20871755e55
-->

<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
Expand Down Expand Up @@ -185,6 +185,13 @@
<pedestrian.striping.reserve-oncoming.max value="1.28" type="FLOAT" help="Maximum width in m to reserve for oncoming pedestrians"/>
<pedestrian.striping.legacy-departposlat value="false" type="BOOL" help="Interpret departPosLat for walks in legacy style"/>
<pedestrian.striping.walkingarea-detail value="4" type="INT" help="Generate INT intermediate points to smooth out lanes within the walkingarea"/>
<pedestrian.jupedsim.step-length value="0.01" type="TIME" help="The update interval of the JuPedSim simulation (in seconds)"/>
<pedestrian.jupedsim.exit-tolerance value="1" type="FLOAT" help="The distance to accept the JuPedSim arrival point (in meters)"/>
<pedestrian.jupedsim.model value="CollisionFreeSpeed" type="STR" help="The submodel to use in JuPedSim (currently only &apos;CollisionFreeSpeed&apos;)"/>
<pedestrian.jupedsim.strength-neighbor-repulsion value="8" type="FLOAT" help="The neighbor repulsion strength of the JuPedSim model"/>
<pedestrian.jupedsim.range-neighbor-repulsion value="0.1" type="FLOAT" help="The neighbor repulsion range of the JuPedSim model (in meters)"/>
<pedestrian.jupedsim.strength-geometry-repulsion value="5" type="FLOAT" help="The geometry repulsion strength of the JuPedSim model"/>
<pedestrian.jupedsim.range-geometry-repulsion value="0.02" type="FLOAT" help="The geometry repulsion range of the JuPedSim model (in meters)"/>
<ride.stop-tolerance value="10" type="FLOAT" help="Tolerance to apply when matching pedestrian and vehicle positions on boarding at individual stops"/>
<mapmatch.distance value="100" type="FLOAT" help="Maximum distance when mapping input coordinates (fromXY etc.) to the road network"/>
<mapmatch.junctions value="false" type="BOOL" help="Match positions to junctions instead of edges"/>
Expand Down Expand Up @@ -432,6 +439,13 @@
<device.friction.offset value="0" type="FLOAT" help="The measurement offset parameter which can be applied to the friction device -&gt; e.g. to force false measurements"/>
</friction_device>

<fcd_replay_device>
<device.fcd-replay.probability value="-1" type="FLOAT" help="The probability for a vehicle to have a &apos;fcd-replay&apos; device"/>
<device.fcd-replay.explicit value="" synonymes="device.fcd-replay.knownveh" type="STR[]" help="Assign a &apos;fcd-replay&apos; device to named vehicles"/>
<device.fcd-replay.deterministic value="false" type="BOOL" help="The &apos;fcd-replay&apos; devices are set deterministic using a fraction of 1000"/>
<device.fcd-replay.file value="" type="FILE" help="FCD file to read"/>
</fcd_replay_device>

<traci_server>
<remote-port value="0" type="INT" help="Enables TraCI Server if set"/>
<num-clients value="1" type="INT" help="Expected number of connecting clients"/>
Expand Down Expand Up @@ -479,6 +493,7 @@
<window-size value="" type="STR[]" help="Create initial window with the given x,y size"/>
<window-pos value="" type="STR[]" help="Create initial window at the given x,y position"/>
<tracker-interval value="1" type="TIME" help="The aggregation period for value tracker windows"/>
<osg-view value="false" type="BOOL" help="Start with an OpenSceneGraph view instead of the regular 2D view"/>
<gui-testing value="false" type="BOOL" help="Enable overlay for screen recognition"/>
<gui-testing-debug value="false" type="BOOL" help="Enable output messages during GUI-Testing"/>
<gui-testing.setting-output value="" type="FILE" help="Save gui settings in the given settings output file"/>
Expand Down

0 comments on commit 2022739

Please sign in to comment.