Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Leg and Activity Engines and prepare DRT functionality #140

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion assets/3-links/vehicles.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<vehicleDefinitions xmlns="http://www.matsim.org/files/dtd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.matsim.org/files/dtd http://www.matsim.org/files/dtd/vehicleDefinitions_v2.0.xsd">
<vehicleDefinitions xmlns="http://www.matsim.org/files/dtd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.matsim.org/files/dtd/vehicleDefinitions_v2.0.xsd">
<vehicleType id="car">
<attributes>
</attributes>
Expand Down
Binary file added assets/drt/bin-data/drt.ids.binpb
Binary file not shown.
Binary file added assets/drt/bin-data/drt.network.1.binpb
Binary file not shown.
Binary file added assets/drt/bin-data/drt.plans.binpb
Binary file not shown.
Binary file added assets/drt/bin-data/drt.vehicles.binpb
Binary file not shown.
5 changes: 5 additions & 0 deletions assets/drt/bin-data/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To create the `binpb` files, use this command:

```shell
cargo run --bin convert_to_binary -- --network assets/drt/grid_network.xml --population assets/drt/multi_mode_one_shared_taxi_population.xml --vehicles assets/drt/vehicles.xml --output-dir assets/drt/bin-data --run-id drt
```
29 changes: 29 additions & 0 deletions assets/drt/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
modules:
protofiles:
type: ProtoFiles
network: ./assets/drt/bin-data/drt.network.binpb
population: ./assets/drt/bin-data/drt.plans.binpb
vehicles: ./assets/drt/bin-data/drt.vehicles.binpb
ids: ./assets/drt/bin-data/drt.ids.binpb
partitioning:
type: Partitioning
num_parts: 1
method: None
output:
type: Output
output_dir: ./test_output/drt
profiling: !CSV
level: INFO
routing:
type: Routing
mode: UsePlans
simulation:
type: Simulation
start_time: 0
end_time: 84600
sample_size: 1
stuck_threshold: 30
drt:
type: Drt
services:
- mode: drt
257 changes: 257 additions & 0 deletions assets/drt/grid_network.xml

Large diffs are not rendered by default.

179 changes: 179 additions & 0 deletions assets/drt/multi_mode_one_shared_taxi_population.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE population SYSTEM "http://www.matsim.org/files/dtd/population_v6.dtd">

<population>


<!-- ====================================================================== -->

<person id="passenger0">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="114" x="-300.0" y="-800.0" end_time="00:00:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="349" x="300.0" y="-200.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger1">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="144" x="-700.0" y="-200.0" end_time="00:05:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="437" x="-200.0" y="-300.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger2">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="223" x="-800.0" y="-500.0" end_time="00:10:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="347" x="-100.0" y="-200.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger3">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="234" x="-800.0" y="-300.0" end_time="00:15:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="119" x="700.0" y="-800.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger4">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="314" x="-300.0" y="-800.0" end_time="00:20:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="260" x="200.0" y="-100.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger5">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="333" x="-900.0" y="-400.0" end_time="00:25:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="438" x="0.0" y="-300.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger6">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="325" x="-300.0" y="-600.0" end_time="00:30:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="111" x="-900.0" y="-800.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger7">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="412" x="-800.0" y="-700.0" end_time="00:35:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="318" x="500.0" y="-800.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger8">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="455" x="-800.0" y="-100.0" end_time="00:40:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="236" x="-400.0" y="-300.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

<person id="passenger9">
<attributes>
<attribute name="employed" class="java.lang.Boolean">false</attribute>
</attributes>
<plan selected="yes">
<activity type="dummy" link="139" x="300.0" y="-400.0" end_time="00:45:00">
</activity>
<leg mode="drt">
</leg>
<activity type="dummy" link="330" x="700.0" y="-600.0">
</activity>
</plan>

</person>

<!-- ====================================================================== -->

</population>
23 changes: 23 additions & 0 deletions assets/drt/vehicles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<vehicleDefinitions xmlns="http://www.matsim.org/files/dtd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.matsim.org/files/dtd/vehicleDefinitions_v2.0.xsd">
<vehicleType id="car">
<attributes>
</attributes>
<description>abc</description>
<length meter="9.5"/>
<width meter="3.0"/>
<maximumVelocity meterPerSecond="42.0"/>
<passengerCarEquivalents pce="2.0"/>
<networkMode networkMode="car"/>
<flowEfficiencyFactor factor="1.5"/>
</vehicleType>
<vehicle id="drt" type="car">
<attributes>
<attribute name="dvrpMode" class="java.lang.String">drt</attribute>
<attribute name="startLink" class="java.lang.String">111</attribute>
<attribute name="serviceBeginTime" class="java.lang.Double">0</attribute>
<attribute name="serviceEndTime" class="java.lang.Double">8000</attribute>
</attributes>
</vehicle>
</vehicleDefinitions>
Empty file added assets/equil/equil-plans.binpb
Empty file.
Loading
Loading