Class Stripe

    • Constructor Detail

      • Stripe

        public Stripe​(CrossSectionLink parentLink,
                      Length lateralCenterPositionStart,
                      Length lateralCenterPositionEnd,
                      Length width,
                      boolean fixGradualLateralOffset)
               throws OTSGeometryException,
                      NetworkException
        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.
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs
        lateralCenterPositionStart - Length; the lateral start position compared to the linear geometry of the Cross Section Link
        lateralCenterPositionEnd - Length; the lateral start position compared to the linear geometry of the Cross Section Link
        width - Length; positioned <i>symmetrically around</i> the center line given by the lateralCenterPosition.
        fixGradualLateralOffset - boolean; true if gradualLateralOffset needs to be fixed
        Throws:
        OTSGeometryException - when creation of the center line or contour geometry fails
        NetworkException - when id equal to null or not unique
      • Stripe

        public Stripe​(CrossSectionLink parentLink,
                      Length lateralCenterPositionStart,
                      Length lateralCenterPositionEnd,
                      Length width)
               throws OTSGeometryException,
                      NetworkException
        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.
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs
        lateralCenterPositionStart - Length; the lateral start position compared to the linear geometry of the Cross Section Link
        lateralCenterPositionEnd - Length; the lateral start position compared to the linear geometry of the Cross Section Link
        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
        NetworkException - when id equal to null or not unique
      • Stripe

        public Stripe​(CrossSectionLink parentLink,
                      Length lateralCenterPositionStart,
                      Length lateralCenterPositionEnd,
                      Length width,
                      Set<GTUType> gtuTypes,
                      Stripe.Permeable permeable,
                      boolean fixGradualLateralOffset)
               throws OTSGeometryException,
                      NetworkException
        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.
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs
        lateralCenterPositionStart - Length; the lateral start position compared to the linear geometry of the Cross Section Link
        lateralCenterPositionEnd - Length; the lateral start position compared to the linear geometry of the Cross Section Link
        width - Length; positioned <i>symmetrically around</i> the center line given by the lateralCenterPosition
        gtuTypes - Set<GTUType>; the GTU types for which the permeability is defined
        permeable - Permeable; one of the enums of Stripe.Permeable to define the permeability
        fixGradualLateralOffset - boolean; true if gradualLateralOffset needs to be fixed
        Throws:
        OTSGeometryException - when creation of the center line or contour geometry fails
        NetworkException - when id equal to null or not unique
      • Stripe

        public Stripe​(CrossSectionLink parentLink,
                      Length lateralCenterPositionStart,
                      Length lateralCenterPositionEnd,
                      Length width,
                      Set<GTUType> gtuTypes,
                      Stripe.Permeable permeable)
               throws OTSGeometryException,
                      NetworkException
        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.
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs
        lateralCenterPositionStart - Length; the lateral start position compared to the linear geometry of the Cross Section Link
        lateralCenterPositionEnd - Length; the lateral start position compared to the linear geometry of the Cross Section Link
        width - Length; positioned <i>symmetrically around</i> the center line given by the lateralCenterPosition
        gtuTypes - Set<GTUType>; the GTU types for which the permeability is defined
        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
        NetworkException - when id equal to null or not unique
      • Stripe

        public Stripe​(CrossSectionLink parentLink,
                      List<CrossSectionSlice> crossSectionSlices,
                      Stripe.Permeable permeable)
               throws OTSGeometryException,
                      NetworkException
        Helper constructor that immediately provides permeability for all 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.
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs
        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.
        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
        NetworkException - when id equal to null or not unique
      • Stripe

        protected Stripe​(CrossSectionLink newParentLink,
                         SimulatorInterface.TimeDoubleUnit newSimulator,
                         Stripe cse)
                  throws NetworkException
        Clone a Stripe for a new network.
        Parameters:
        newParentLink - CrossSectionLink; the new link to which the clone belongs
        newSimulator - SimulatorInterface.TimeDoubleUnit; the new simulator for this network
        cse - Stripe; the element to clone from
        Throws:
        NetworkException - if link already exists in the network, if name of the link is not unique, or if the start node or the end node of the link are not registered in the network.
    • Method Detail

      • addPermeability

        public final void addPermeability​(GTUType gtuType,
                                          Stripe.Permeable permeable)
        Parameters:
        gtuType - GTUType; GTU type to add permeability for.
        permeable - Permeable; direction(s) to add compared to the direction of the design line.