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

add interlocking initialization #329

Merged
merged 34 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2bf99dc
added data directory
Lietze Apr 17, 2023
aea28ec
added new dependencies
Lietze Apr 17, 2023
3b63222
add PlanPro file
Lietze Apr 17, 2023
18aa367
update toml to refrence git fork
Lietze Apr 17, 2023
1e0c66c
fix lint and add __init__.py
Lietze Apr 17, 2023
dcb1cb1
add sumo_config_helper
Lietze Apr 18, 2023
f181382
restructure directories
Lietze Apr 18, 2023
8819240
changed cords to schwarze Pumpe
Lietze Apr 18, 2023
0775ae8
use refactored version of yaramo
Lietze Apr 18, 2023
08d0477
change configs so a new planpro would be generated
Lietze Apr 18, 2023
3bf2421
fix lint
Lietze Apr 18, 2023
e8e4f4e
add start_interlocking
Lietze Apr 18, 2023
4cecdaa
Add test, that runs if not for faults in yaramo
Lietze Apr 18, 2023
f6adf53
added another model
Lietze Apr 18, 2023
ab5c704
added Signal Generator
Lietze Apr 18, 2023
03036dc
the points are fixed
Lietze Apr 18, 2023
55a965d
fix lint
Lietze Apr 18, 2023
b3efd8b
add Platform import
Lietze Apr 18, 2023
76c25c4
add new version of data
Lietze Apr 20, 2023
e6688db
fix lint
Lietze Apr 20, 2023
5fa83f2
realy fix lint
Lietze Apr 20, 2023
e0e3506
fix typehints
Lietze Apr 20, 2023
d512c7b
Merge branch 'dev' into feature/289-add-initialization-of-interlocking
Lietze Apr 20, 2023
833d37b
add right poetry.lock
Lietze Apr 20, 2023
0e2d564
changed path acording to project dir structure
Lietze Apr 20, 2023
21b418d
change paths again
Lietze Apr 20, 2023
82d8e79
move the example
Lietze Apr 20, 2023
aaae2ba
return to more complex sumo net
Lietze Apr 20, 2023
5fed125
changes from feedback
Lietze Apr 20, 2023
77a6d09
change test according to feedback
Lietze Apr 20, 2023
5041ff9
fix lint
Lietze Apr 20, 2023
b2bffc4
Merge branch 'dev' into feature/289-add-initialization-of-interlocking
Lietze Apr 20, 2023
684b35a
fix poetry lock
Lietze Apr 20, 2023
b3d982a
Merge branch 'dev' into feature/289-add-initialization-of-interlocking
Lietze Apr 20, 2023
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
Empty file added data/__init__.py
Empty file.
173,286 changes: 173,286 additions & 0 deletions data/planpro/test_example.ppxml

Large diffs are not rendered by default.

173,286 changes: 173,286 additions & 0 deletions data/planpro/test_with_fixed_points.ppxml

Large diffs are not rendered by default.

173,286 changes: 173,286 additions & 0 deletions data/planpro/test_with_new_yaramo.ppxml

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions data/planpro_helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from orm_importer.importer import ORMImporter
from planproexporter import Generator
from railwayroutegenerator.routegenerator import RouteGenerator
from track_signal_generator.generator import TrackSignalGenerator


def generate_planpro():
cordinates = [
(51.5594, 14.3344),
(51.5381, 14.3794),
(51.4829, 14.4130),
(51.5166, 14.3088),
]
polygon = ""
for cord in cordinates:
polygon += str(cord[0]) + " "
polygon += str(cord[1]) + " "
polygon = polygon[:-1]
# This is somewhere west of Schwarze Pumpe.

# Import from OSM/ORM
topology = ORMImporter().run(polygon)

# Generate Signals
# TrackSignalGenerator(topology).place_edge_signals()

# Generate Routes
RouteGenerator(topology).generate_routes()

# Write PlanPro
generator = Generator()
generator.generate(
topology, "BP2022-AP1", "BP2022-AP1", "data/planpro/test_with_fixed_points"
)


if __name__ == "__main__":
generate_planpro()
4,748 changes: 4,748 additions & 0 deletions data/sumo/test_example/sumo-config/test_example.con.xml

Large diffs are not rendered by default.

1,424 changes: 1,424 additions & 0 deletions data/sumo/test_example/sumo-config/test_example.edg.xml

Large diffs are not rendered by default.

11,088 changes: 11,088 additions & 0 deletions data/sumo/test_example/sumo-config/test_example.net.xml

Large diffs are not rendered by default.

380 changes: 380 additions & 0 deletions data/sumo/test_example/sumo-config/test_example.nod.xml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions data/sumo/test_example/sumo-config/test_example.routes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?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="regio" accel="2.5" decel="1.3" length="20.00" vClass="rail" color="193,18,28" />

<vType id="ice" accel="5" decel="1.3" length="60.00" vClass="rail_electric" color="192,192,192" />

<vType id="cargo" accel="2.5" decel="1.3" length="80.00" vClass="rail" color="30,30,30" />

</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<configuration>
<input>
<net-file value="test_example.net.xml" />
<route-files value="test_example.routes.xml" />
</input>
</configuration>
Loading