-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add interlocking initialization (#329)
* added data directory * added new dependencies * add PlanPro file * update toml to refrence git fork * fix lint and add __init__.py * add sumo_config_helper * restructure directories * changed cords to schwarze Pumpe * use refactored version of yaramo * change configs so a new planpro would be generated * fix lint * add start_interlocking * Add test, that runs if not for faults in yaramo * added another model * added Signal Generator * the points are fixed * fix lint * add Platform import * add new version of data * fix lint * realy fix lint * fix typehints * add right poetry.lock * changed path acording to project dir structure * change paths again * move the example * return to more complex sumo net * changes from feedback * change test according to feedback * fix lint * fix poetry lock
- Loading branch information
Showing
38 changed files
with
573,313 additions
and
148 deletions.
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4,748 changes: 4,748 additions & 0 deletions
4,748
data/sumo/test_example/sumo-config/test_example.con.xml
Large diffs are not rendered by default.
Oops, something went wrong.
1,424 changes: 1,424 additions & 0 deletions
1,424
data/sumo/test_example/sumo-config/test_example.edg.xml
Large diffs are not rendered by default.
Oops, something went wrong.
11,088 changes: 11,088 additions & 0 deletions
11,088
data/sumo/test_example/sumo-config/test_example.net.xml
Large diffs are not rendered by default.
Oops, something went wrong.
380 changes: 380 additions & 0 deletions
380
data/sumo/test_example/sumo-config/test_example.nod.xml
Large diffs are not rendered by default.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
data/sumo/test_example/sumo-config/test_example.routes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
6 changes: 6 additions & 0 deletions
6
data/sumo/test_example/sumo-config/test_example.scenario.sumocfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.