package org.opentrafficsim.road.network.lane; import java.util.List; import java.util.Set; import org.djunits.value.vdouble.scalar.Length; import org.opentrafficsim.core.geometry.OTSGeometryException; import org.opentrafficsim.core.gtu.GTUType; import org.opentrafficsim.core.network.LateralDirectionality; import org.opentrafficsim.core.network.NetworkException; import nl.tudelft.simulation.dsol.simulators.SimulatorInterface; /** * Longitudinal road stripes; simple constructors. *
* Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
* BSD-style license. See OpenTrafficSim License.
*
* $LastChangedDate: 2015-09-03 13:38:01 +0200 (Thu, 03 Sep 2015) $, @version $Revision: 1378 $, by $Author: averbraeck $,
* initial version Oct 25, 2014
* @author Alexander Verbraeck
* @author Peter Knoppers
*/
public class Stripe extends RoadMarkerAlong
{
/** */
private static final long serialVersionUID = 20151025L;
/**
* Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
* the StartNode towards the EndNode as the longitudinal direction.
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs
* @param lateralCenterPositionStart Length; the lateral start position compared to the linear geometry of the Cross Section
* Link
* @param lateralCenterPositionEnd Length; the lateral start position compared to the linear geometry of the Cross Section
* Link
* @param width Length; positioned <i>symmetrically around</i> the center line given by the
* lateralCenterPosition.
* @param fixGradualLateralOffset boolean; true if gradualLateralOffset needs to be fixed
* @throws OTSGeometryException when creation of the center line or contour geometry fails
* @throws NetworkException when id equal to null or not unique
*/
public Stripe(final CrossSectionLink parentLink, final Length lateralCenterPositionStart,
final Length lateralCenterPositionEnd, final Length width, final boolean fixGradualLateralOffset)
throws OTSGeometryException, NetworkException
{
super(parentLink, lateralCenterPositionStart, lateralCenterPositionEnd, width, width, fixGradualLateralOffset);
}
/**
* Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
* the StartNode towards the EndNode as the longitudinal direction.
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs
* @param lateralCenterPositionStart Length; the lateral start position compared to the linear geometry of the Cross Section
* Link
* @param lateralCenterPositionEnd Length; the lateral start position compared to the linear geometry of the Cross Section
* Link
* @param width Length; positioned <i>symmetrically around</i> the center line given by the
* lateralCenterPosition.
* @throws OTSGeometryException when creation of the center line or contour geometry fails
* @throws NetworkException when id equal to null or not unique
*/
public Stripe(final CrossSectionLink parentLink, final Length lateralCenterPositionStart,
final Length lateralCenterPositionEnd, final Length width) throws OTSGeometryException, NetworkException
{
this(parentLink, lateralCenterPositionStart, lateralCenterPositionEnd, width, false);
}
/**
* Helper constructor that immediately provides permeability for a number of GTU classes.
* Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
* the StartNode towards the EndNode as the longitudinal direction.
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs
* @param lateralCenterPositionStart Length; the lateral start position compared to the linear geometry of the Cross Section
* Link
* @param lateralCenterPositionEnd Length; the lateral start position compared to the linear geometry of the Cross Section
* Link
* @param width Length; positioned <i>symmetrically around</i> the center line given by the
* lateralCenterPosition
* @param gtuTypes Set<GTUType>; the GTU types for which the permeability is defined
* @param permeable Permeable; one of the enums of Stripe.Permeable to define the permeability
* @param fixGradualLateralOffset boolean; true if gradualLateralOffset needs to be fixed
* @throws OTSGeometryException when creation of the center line or contour geometry fails
* @throws NetworkException when id equal to null or not unique
*/
public Stripe(final CrossSectionLink parentLink, final Length lateralCenterPositionStart,
final Length lateralCenterPositionEnd, final Length width, final Set
* Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
* the StartNode towards the EndNode as the longitudinal direction.
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs
* @param lateralCenterPositionStart Length; the lateral start position compared to the linear geometry of the Cross Section
* Link
* @param lateralCenterPositionEnd Length; the lateral start position compared to the linear geometry of the Cross Section
* Link
* @param width Length; positioned <i>symmetrically around</i> the center line given by the
* lateralCenterPosition
* @param gtuTypes Set<GTUType>; the GTU types for which the permeability is defined
* @param permeable Permeable; one of the enums of Stripe.Permeable to define the permeability
* @throws OTSGeometryException when creation of the center line or contour geometry fails
* @throws NetworkException when id equal to null or not unique
*/
public Stripe(final CrossSectionLink parentLink, final Length lateralCenterPositionStart,
final Length lateralCenterPositionEnd, final Length width, final Set
* Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
* the StartNode towards the EndNode as the longitudinal direction.
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs
* @param crossSectionSlices List<CrossSectionSlice>; The offsets and widths at positions along the line, relative to
* the design line of the parent link. If there is just one with and offset, there should just be one element in
* the list with Length = 0. If there are more slices, the last one should be at the length of the design line.
* If not, a NetworkException is thrown.
* @param permeable Permeable; one of the enums of Stripe.Permeable to define the permeability
* @throws OTSGeometryException when creation of the center line or contour geometry fails
* @throws NetworkException when id equal to null or not unique
*/
public Stripe(final CrossSectionLink parentLink, final List