-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* unified naming of Pt vs PublicTransport * moved `vehicle.PublicTransportData` to `pt.PtVehicleData`. * added missing javadoc * fixed walking speed configuration in mapping
- Loading branch information
Showing
17 changed files
with
76 additions
and
70 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -13,17 +13,18 @@ | |
* Contact: [email protected] | ||
*/ | ||
|
||
package org.eclipse.mosaic.lib.objects.traffic; | ||
package org.eclipse.mosaic.lib.objects.pt; | ||
|
||
import org.eclipse.mosaic.lib.geo.GeoPoint; | ||
|
||
/** | ||
* Each public transport stop consists of its geolocation and the planned arrival and departure time at the stop. | ||
* A {@link PtStop} represents a stop along a public transport line or route, e.g., a bus stop or train station. | ||
* This data structure consists of its geolocation and the planned arrival and departure time at the stop. | ||
* | ||
* @param location The geographic location of the stop. | ||
* @param arrivalTime The time when arriving at this stop. {@code null} for the first stop of a leg. | ||
* @param departureTime The time when leaving this stop. {@code null} for the last stop of a leg. | ||
*/ | ||
public record PublicTransportStop(GeoPoint location, Long arrivalTime, Long departureTime) { | ||
public record PtStop(GeoPoint location, Long arrivalTime, Long departureTime) { | ||
|
||
} |
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* Contact: [email protected] | ||
*/ | ||
|
||
package org.eclipse.mosaic.lib.objects.vehicle; | ||
package org.eclipse.mosaic.lib.objects.pt; | ||
|
||
import org.eclipse.mosaic.lib.enums.VehicleStopMode; | ||
|
||
|
@@ -22,19 +22,24 @@ | |
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
public class PublicTransportData { | ||
/** | ||
* Additional data holding information about the public transport line of the vehicle associated with this. | ||
* The data is generated and filled by SumoAmbassador and can be consumed by any vehicle application | ||
* which is mapped onto the public transport vehicle. | ||
*/ | ||
public class PtVehicleData { | ||
|
||
/** | ||
* The line the train belongs to. | ||
*/ | ||
private final String lineId; | ||
|
||
/** | ||
* Contains a list of the next stops of a train. | ||
* Contains a list of the next stops of the vehicle, e.g., train or bus. | ||
*/ | ||
private final List<StoppingPlace> nextStops; | ||
|
||
private PublicTransportData(String lineId, List<StoppingPlace> nextStops) { | ||
private PtVehicleData(String lineId, List<StoppingPlace> nextStops) { | ||
this.lineId = lineId; | ||
this.nextStops = nextStops; | ||
} | ||
|
@@ -61,8 +66,8 @@ public Builder nextStops(List<StoppingPlace> nextStops) { | |
return this; | ||
} | ||
|
||
public PublicTransportData build() { | ||
return new PublicTransportData(lineId, nextStops); | ||
public PtVehicleData build() { | ||
return new PtVehicleData(lineId, nextStops); | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.