diff --git a/model_examples/model_extension/saxony.transportation_network b/model_examples/model_extension/saxony.transportation_network index c46e53e7ca9de0d443aa546cdef5f5cd69bb1bfb..bc072bf9a4511f970db33972e0b1dc344b4f3765 100644 --- a/model_examples/model_extension/saxony.transportation_network +++ b/model_examples/model_extension/saxony.transportation_network @@ -3,13 +3,13 @@ <roadnetworks identifier="DG/1" length="95.0" source="//@locations.0" target="//@locations.3"> <roads identifier="A4" length="95.0"/> </roadnetworks> - <roadnetworks identifier="DL/3" length="20.0" source="//@locations.0" target="//@locations.5"> + <roadnetworks identifier="DL/3" length="20.0" source="//@locations.0" target="//@locations.4"> <roads identifier="A4" length="20.0"/> </roadnetworks> - <roadnetworks identifier="DL/2" length="67.0" source="//@locations.5" target="//@locations.6"> + <roadnetworks identifier="DL/2" length="67.0" source="//@locations.4" target="//@locations.5"> <roads identifier="A14" length="67.0"/> </roadnetworks> - <roadnetworks identifier="DL/1" length="15.0" source="//@locations.6" target="//@locations.2"> + <roadnetworks identifier="DL/1" length="15.0" source="//@locations.5" target="//@locations.2"> <roads identifier="A38" length="15.0"/> </roadnetworks> <roadnetworks identifier="DC/1" length="64.0" source="//@locations.0" target="//@locations.1"> @@ -44,10 +44,6 @@ </locations> <locations/> <locations/> - <locations/> - <locations/> - <locations/> - <locations/> <routes identifier="R1" start="//@locations.0" end="//@locations.1"> <vehicle identifier="V03" location="//@locations.0" model="eTruck" fuelCapacity="150.0"/> </routes> diff --git a/stgroup.mdsd.transportation_network.transformation/model_extension/model_extension.etl b/stgroup.mdsd.transportation_network.transformation/model_extension/model_extension.etl index e7cbd8ce2814c6ebb15a480827ee51bbe86aa8bc..dfc5bf7efc312ad2a2aa52654c487c49be97a3c5 100644 --- a/stgroup.mdsd.transportation_network.transformation/model_extension/model_extension.etl +++ b/stgroup.mdsd.transportation_network.transformation/model_extension/model_extension.etl @@ -34,6 +34,9 @@ rule SplitRoadNetworks var originalRN:source!RoadNetwork = s.eContainer(); var network:source!TransportationNetwork = originalRN.eContainer(); + network.roadnetworks.add(rn); + network.locations.add(l); + rn.identifier = originalRN.identifier + "/" + originalRN.roads.size(); rn.roads.add(s); rn.length = s.length; @@ -43,11 +46,9 @@ rule SplitRoadNetworks delete l; } else{ rn.target = l; + originalRN.source = l; } - originalRN.source = l; - network.roadnetworks.add(rn); - network.locations.add(l); } rule deleteEmptyRoadNetworks