package org.opentrafficsim.road.network.lane; import java.util.List; import org.djunits.value.vdouble.scalar.Length; import org.opentrafficsim.core.geometry.OTSGeometryException; import org.opentrafficsim.core.network.NetworkException; import nl.tudelft.simulation.dsol.simulators.SimulatorInterface; /** *
* 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 Aug 19, 2014
* @author Alexander Verbraeck
* @author Peter Knoppers
* @author Guus Tamminga
*/
public class Shoulder extends CrossSectionElement
{
/** */
private static final long serialVersionUID = 20140819L;
/**
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs.
* @param id String; the id of the lane. Should be unique within the parentLink.
* @param lateralPositionStart Length; the lateral start position compared to the linear geometry of the Cross Section Link.
* @param lateralPositionEnd Length; the lateral end position compared to the linear geometry of the Cross Section Link
* @param beginWidth Length; start width, positioned <i>symmetrically around</i> the lateral start position.
* @param endWidth Length; end width, positioned <i>symmetrically around</i> the lateral end position.
* @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 Shoulder(final CrossSectionLink parentLink, final String id, final Length lateralPositionStart,
final Length lateralPositionEnd, final Length beginWidth, final Length endWidth,
final boolean fixGradualLateralOffset) throws OTSGeometryException, NetworkException
{
super(parentLink, id, lateralPositionStart, lateralPositionEnd, beginWidth, endWidth, fixGradualLateralOffset);
}
/**
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs.
* @param id String; the id of the lane. Should be unique within the parentLink.
* @param lateralPositionStart Length; the lateral start position compared to the linear geometry of the Cross Section Link.
* @param lateralPositionEnd Length; the lateral end position compared to the linear geometry of the Cross Section Link
* @param beginWidth Length; start width, positioned <i>symmetrically around</i> the lateral start position.
* @param endWidth Length; end width, positioned <i>symmetrically around</i> the lateral end position.
* @throws OTSGeometryException when creation of the center line or contour geometry fails
* @throws NetworkException when id equal to null or not unique
*/
public Shoulder(final CrossSectionLink parentLink, final String id, final Length lateralPositionStart,
final Length lateralPositionEnd, final Length beginWidth, final Length endWidth)
throws OTSGeometryException, NetworkException
{
this(parentLink, id, lateralPositionStart, lateralPositionEnd, beginWidth, endWidth, false);
}
/**
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs.
* @param id String; the id of the lane. Should be unique within the parentLink.
* @param lateralPosition Length; the lateral start position compared to the linear geometry of the Cross Section Link.
* @param width Length; the shoulder width, positioned <i>symmetrically around</i> the lateral start position.
* @throws OTSGeometryException when creation of the center line or contour geometry fails
* @throws NetworkException when id equal to null or not unique
*/
public Shoulder(final CrossSectionLink parentLink, final String id, final Length lateralPosition, final Length width)
throws OTSGeometryException, NetworkException
{
super(parentLink, id, lateralPosition, width);
}
/**
* @param parentLink CrossSectionLink; Cross Section Link to which the element belongs.
* @param id String; the id of the lane. Should be unique within the parentLink.
* @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.
* @throws OTSGeometryException when creation of the center line or contour geometry fails
* @throws NetworkException when id equal to null or not unique
*/
public Shoulder(final CrossSectionLink parentLink, final String id, final List