Class TrafficSignLaneAssignment
java.lang.Object
org.eclipse.mosaic.lib.objects.trafficsign.TrafficSign<LaneAssignment>
org.eclipse.mosaic.lib.objects.trafficsign.TrafficSignLaneAssignment
- All Implemented Interfaces:
Serializable
Represents a traffic sign that assigns
VehicleClasses to lanes.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTrafficSignLaneAssignment(String id, Position position, String connectionId, List<LaneAssignment> laneAssignments) Constructs aTrafficSignLaneAssignment. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAllowedVehicleClass(int lane, VehicleClass vehicleClass) Adds aVehicleClassto the allowed list.voidblock(int lane) Blocks the lane(s) for everyVehicleClass.getLaneAssignment(int lane) Gets lane assignments.Get lane assignments of all lanes.Returns the type of the traffic sign.voidopen(int lane) Opens the lane(s) for everyVehicleClass.booleanremoveAllowedVehicleClass(int lane, VehicleClass vehicleClass) Removes aVehicleClassof the allowed list.booleansetAllowedVehicleClasses(int lane, List<VehicleClass> vehicleClasses) Sets the list of allowedVehicleClasses.booleansetAllowedVehicleClasses(List<VehicleClass> vehicleClasses) Sets one speed limit for all lanes.setAngle(double angle) Sets the angle of a traffic sign.setLane(int lane) Sets the lane the sign is valid for.setLaneAssignment(int lane, List<VehicleClass> allowedVehicleClasses) Set a new lane assignment for a specific lane.setVariability(boolean isVariable) Sets whether the traffic sign is variable.setVisibility(double visibility) Sets the visibility of a traffic sign.toString()Methods inherited from class org.eclipse.mosaic.lib.objects.trafficsign.TrafficSign
getAngle, getConnectionId, getGeoPosition, getId, getLane, getPosition, getSignContents, getVisibility, isVariable
-
Field Details
-
TYPE_ID
-
-
Constructor Details
-
TrafficSignLaneAssignment
public TrafficSignLaneAssignment(String id, Position position, String connectionId, List<LaneAssignment> laneAssignments) Constructs aTrafficSignLaneAssignment.- Parameters:
id- The id of the lane assignment sign.position- The position of the sign.connectionId- The corresponding edge.laneAssignments- The lane assignments for all lanes.
-
-
Method Details
-
setLane
Sets the lane the sign is valid for.- Overrides:
setLanein classTrafficSign<LaneAssignment>- Parameters:
lane- The lane index.
-
setVisibility
Sets the visibility of a traffic sign. Range: [0: not visible, 1: very good visible]- Overrides:
setVisibilityin classTrafficSign<LaneAssignment>- Parameters:
visibility- The visibility of the sign.
-
setAngle
Sets the angle of a traffic sign. 0.0 is north, 90.0 is east- Overrides:
setAnglein classTrafficSign<LaneAssignment>- Parameters:
angle- The angle of the sign.
-
setVariability
Sets whether the traffic sign is variable.- Overrides:
setVariabilityin classTrafficSign<LaneAssignment>- Parameters:
isVariable- Whether the sign is variable.
-
setLaneAssignment
Set a new lane assignment for a specific lane.- Parameters:
lane- The lane for which the new lane assignment shall be set.allowedVehicleClasses- List of allowed vehicle classes.
-
getLaneAssignments
Get lane assignments of all lanes. -
getLaneAssignment
Gets lane assignments. -
setAllowedVehicleClasses
Sets the list of allowedVehicleClasses. -
setAllowedVehicleClasses
Sets one speed limit for all lanes. -
addAllowedVehicleClass
Adds aVehicleClassto the allowed list. -
removeAllowedVehicleClass
Removes aVehicleClassof the allowed list. -
block
public void block(int lane) Blocks the lane(s) for everyVehicleClass. -
open
public void open(int lane) Opens the lane(s) for everyVehicleClass. -
getTypeId
Returns the type of the traffic sign.- Specified by:
getTypeIdin classTrafficSign<LaneAssignment>
-
toString
- Overrides:
toStringin classTrafficSign<LaneAssignment>
-