Skip to content

Commit

Permalink
added test refs ##10447, #21
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Aug 28, 2024
1 parent 10491bd commit c25c0c8
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/sumo/devices/taxi/prebooking/abort_pickup/errors.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Warning: Person 'p0' aborted waiting for taxi at edge 'B2C2'.
Warning: Vehicle 'trip_0' aborted waiting for a person that will never come.
Warning: Vehicle 'trip_1' aborted waiting for a person that will never come.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<person id="p0" depart="300.00">
<ride from="B2C2" to="A0B0" lines="taxi">
<param key="earliestPickupTime" value="75.00"/>
<param key="reservationTime" value="60.00"/>
</ride>
</person>
</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="taxi" vClass="taxi">
<param key="has.taxi.device" value="true"/>
</vType>

<trip id="trip_0" type="taxi" depart="0.00">
<stop lane="A0B0_1" triggered="person"/>
</trip>
<trip id="trip_1" type="taxi" depart="0.00">
<stop lane="A2B2_1" triggered="person"/>
</trip>
</routes>
5 changes: 5 additions & 0 deletions tests/sumo/devices/taxi/prebooking/abort_pickup/options.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--no-step-log --no-duration-log --net-file=net.net.xml
-r input_routes.rou.xml
--tripinfo-output tripinfos.xml
--tripinfo-output.write-unfinished
-a input_additional2.add.xml
Empty file.
51 changes: 51 additions & 0 deletions tests/sumo/devices/taxi/prebooking/abort_pickup/tripinfos.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-08-28 13:32:43 by Eclipse SUMO sumo Version v1_20_0+1753-8d7e5fec371
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"/>
<additional-files value="input_additional2.add.xml"/>
</input>
<output>
<write-license value="true"/>
<tripinfo-output value="tripinfos.xml"/>
<tripinfo-output.write-unfinished value="true"/>
</output>
<processing>
<default.speeddev value="0"/>
</processing>
<report>
<xml-validation value="never"/>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
</sumoConfiguration>
-->

<tripinfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/tripinfo_file.xsd">
<personinfo id="p0" depart="300.00" type="DEFAULT_PEDTYPE" speedFactor="1.00" duration="-1" waitingTime="2.00" timeLoss="-1" traveltime="-1">
<ride waitingTime="2.00" vehicle="NULL" depart="-1" arrival="-1" arrivalPos="-1" duration="-1" routeLength="-1" timeLoss="-1"/>
</personinfo>
<tripinfo id="trip_0" depart="0.00" departLane="A0B0_1" departPos="5.10" departSpeed="0.00" departDelay="0.00" arrival="-1.00" arrivalLane="" arrivalPos="-1.00" arrivalSpeed="-1.00" duration="302.00" routeLength="282.49" waitingTime="0.00" waitingCount="0" stopTime="275.00" timeLoss="6.66" rerouteNo="0" devices="tripinfo_trip_0 routing_trip_0 taxi_trip_0" vType="taxi" speedFactor="1.00" vaporized="">
<taxi customers="0" occupiedDistance="0.00" occupiedTime="0.00"/>
</tripinfo>
<tripinfo id="trip_1" depart="0.00" departLane="A2B2_1" departPos="5.10" departSpeed="0.00" departDelay="0.00" arrival="-1.00" arrivalLane="" arrivalPos="-1.00" arrivalSpeed="-1.00" duration="302.00" routeLength="303.93" waitingTime="1.00" waitingCount="1" stopTime="267.00" timeLoss="13.12" rerouteNo="3" devices="tripinfo_trip_1 routing_trip_1 taxi_trip_1" vType="taxi" speedFactor="1.00" vaporized="">
<taxi customers="0" occupiedDistance="0.00" occupiedTime="0.00"/>
</tripinfo>
</tripinfos>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-08-26 15:32:42 by Eclipse SUMO sumo Version v1_20_0+1721-016cfd09667
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"/>
<additional-files value="input_additional2.add.xml"/>
</input>
<output>
<write-license value="true"/>
<tripinfo-output value="tripinfos.xml"/>
<tripinfo-output.write-unfinished value="true"/>
</output>
<processing>
<default.speeddev value="0"/>
</processing>
<report>
<xml-validation value="never"/>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
<mesoscopic>
<mesosim value="true"/>
</mesoscopic>
</sumoConfiguration>
-->

<tripinfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/tripinfo_file.xsd">
<personinfo id="p0" depart="70.00" type="DEFAULT_PEDTYPE" speedFactor="1.00" duration="89.00" waitingTime="0.00" timeLoss="0.00" traveltime="89.00">
<ride waitingTime="0.00" vehicle="trip_1" depart="70.00" arrival="159.00" arrivalPos="191.73" duration="89.00" routeLength="1221.73" timeLoss="0.00"/>
</personinfo>
<tripinfo id="trip_0" depart="0.00" departLane="A0B0_1" departPos="0.00" departSpeed="13.89" departDelay="0.00" arrival="-1.00" arrivalLane="" arrivalPos="-1.00" arrivalSpeed="-1.00" duration="220.00" routeLength="191.73" waitingTime="0.00" waitingCount="0" stopTime="1.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_trip_0 routing_trip_0 taxi_trip_0" vType="taxi" speedFactor="1.00" vaporized="">
<taxi customers="0" occupiedDistance="0.00" occupiedTime="0.00"/>
</tripinfo>
<tripinfo id="trip_1" depart="0.00" departLane="A2B2_1" departPos="0.00" departSpeed="13.89" departDelay="0.00" arrival="-1.00" arrivalLane="" arrivalPos="-1.00" arrivalSpeed="-1.00" duration="220.00" routeLength="1509.33" waitingTime="0.00" waitingCount="0" stopTime="62.00" timeLoss="47.00" rerouteNo="2" devices="tripinfo_trip_1 routing_trip_1 taxi_trip_1 person_trip_1" vType="taxi" speedFactor="1.00" vaporized="">
<taxi customers="1" occupiedDistance="1221.73" occupiedTime="88.96"/>
</tripinfo>
</tripinfos>
3 changes: 3 additions & 0 deletions tests/sumo/devices/taxi/prebooking/testsuite.sumo
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ no_walk_departPos
# order taxi before the depart, using ride params "reservationTime" and "earliestPickupTime"
reservation_before_depart

# order taxi too early
abort_pickup

# order taxi before the depart, using ride param "earliestPickupTime"
default_reservationTime
greedy
Expand Down

0 comments on commit c25c0c8

Please sign in to comment.