coreEngine.reliabilityAnalysis.DataStruct

## Class WorkZone

- java.lang.Object
- - coreEngine.reliabilityAnalysis.DataStruct.WorkZone

- All Implemented Interfaces:
    java.io.Serializable

      public class WorkZone
      extends java.lang.Object
      implements java.io.Serializable

  Author:
    Lake Trask
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `float` | `alphaWZ` The percentage drop in pre-breakdown capacity at the work zone due to queuing conditions (%).
    `static int` | `AREA_TYPE_RURAL` Identifier for rural area type for the work zone.
    `static int` | `AREA_TYPE_URBAN` Identifier for urban area type for the work zone.
    `static int` | `BARRIER_TYPE_CONCRETE` Identifier for concrete barriers.
    `static int` | `BARRIER_TYPE_OTHER` Identifier for cone, Type II barricade, or plastic drums barriers
    `protected int` | `duration` Duration (in analysis periods) of the work zone on a daily basis.
    `private CEDate` | `endDate` End date of the work zone in the Reliability Reporting Period.
    `private int` | `endSegment` Ending segment of the Work Zone (Segment indexing starts at 0).
    `private int` | `fA` Work Zone
    `private int` | `fBr` Work zone barrier type
    `private int` | `fDN` Identifier for daylight or night.
    `private float` | `fLAT` Work zone lateral distance.
    `private float` | `fNr` Total Ramp Density of the length of the work zone plus three miles upstream and downstream of the ends of the work zone.
    `private float` | `fS` Work zone speed limit.
    `protected Seed` | `seed` Seed instance to which the work zone is associated.
    `private static long` | `serialVersionUID`
    `private int` | `severity` Severity of the work zone.
    `private CEDate` | `startDate` Start date of the work zone in the Reliability Reporting Period.
    `protected int` | `startPeriod` Analysis period in which the work zone starts.
    `private int` | `startSegment` Starting segment of the Work Zone (Segment indexing starts at 0).
    `private float[]` | `wzCAF` Array to hold the Capacity Adjustment Factors for the work zone.
    `private float[]` | `wzDAF` Array to hold the Demand Adjustment Factors for the work zone.
    `private float[]` | `wzSAF` Array to hold the Speed Adjustment Factors for the work zone.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WorkZone(Seed seed, int severity, int startPeriod, int duration, CEDate[] dates, int[] segments)`
    `WorkZone(Seed seed, int severity, int startPeriod, int duration, CEDate[] dates, java.lang.Integer[] segments)`
    `WorkZone(Seed seed, int severity, int startPeriod, int duration, CEDate startDate, CEDate endDate, int startSegment, int endSegment)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private float` | `calcFFSwz(int segment, int period)`
    `private float` | `calcfNr()`
    `float` | `calcfSr(int segment, int period)`
    `private float` | `calcLCSI(int segment)`
    `private float` | `calcQDR(int segment)`
    `private float` | `calculateCAF(int segment)`
    `private float` | `calculateSAF(int segment)`
    `private float` | `calcWZCapacity(int segment)` Calculates the work zone capacity (or pre-breakdown flow rate) in pc/h/l
    `boolean` | `checkFeasibleLaneClosure()` Checks if the work zone is feasible over the work zone segments.
    `float` | `getAdjFactor(int adjFactorType, int segment)`
    `CEDate[]` | `getDates()`
    `CEDate` | `getEndDate()`
    `int` | `getEndPeriod()` Returns the end period of the WorkZone.
    `int` | `getEndSegment()`
    `float` | `getEventCAF(int segment)`
    `float` | `getEventDAF(int segment)`
    `int` | `getEventLAF(int segment)` Returns Lane Adjustment factor (always less than or equal to 0) for the work zone in the specified period and segment.
    `float` | `getEventOAF(int segment)`
    `float` | `getEventSAF(int segment)`
    `java.lang.String` | `getNoDateString()`
    `int` | `getNumberOfSegments()`
    `int[]` | `getPeriods()`
    `int[]` | `getSegments()`
    `int` | `getSeverity()`
    `java.lang.String` | `getSeverityString()`
    `CEDate` | `getStartDate()`
    `int` | `getStartPeriod()`
    `int` | `getStartSegment()`
    `static java.lang.String` | `getTypeFull(int incType)`
    `boolean` | `hasOverlap(WorkZone wz)`
    `private void` | `initializeWorkZone()`
    `boolean` | `isActiveIn(int period)` Checks if the work zone is active on the facility for a specific period.
    `boolean` | `isActiveIn(int segment, int period)` Checks if the work zone is active in a specified segment and period.
    `boolean` | `isValid()` Checks to see if the event is valid for the seed/scenario in both the spatial and temporal sense.
    `private int` | `segmentMapper(int segment)` Maps the segment of the facility to the index of the segment in the work zone.
    `void` | `setAreaType(int areaType)`
    `void` | `setBarrierType(int barrierType)`
    `void` | `setEventCAF(float val, int segment)`
    `void` | `setEventDAF(float val, int segment)`
    `void` | `setEventSAF(float val, int segment)`
    `void` | `setLateralDistance(float lateralDistance)`
    `void` | `setWorkZoneSpeedLimit(float speed)`
    `java.lang.String` | `toString()`
    `void` | `updateAdjustmentFactors()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

    - #### seed

          protected final Seed seed

      Seed instance to which the work zone is associated.

    - #### severity

          private final int severity

      Severity of the work zone.

    - #### startPeriod

          protected final int startPeriod

      Analysis period in which the work zone starts.

    - #### duration

          protected final int duration

      Duration (in analysis periods) of the work zone on a daily basis.

    - #### startDate

          private final CEDate startDate

      Start date of the work zone in the Reliability Reporting Period.

    - #### endDate

          private final CEDate endDate

      End date of the work zone in the Reliability Reporting Period.

    - #### startSegment

          private final int startSegment

      Starting segment of the Work Zone (Segment indexing starts at 0).

    - #### endSegment

          private final int endSegment

      Ending segment of the Work Zone (Segment indexing starts at 0).

    - #### fBr

          private int fBr

      Work zone barrier type

    - #### fA

          private int fA

      Work Zone

    - #### fLAT

          private float fLAT

      Work zone lateral distance. Distance from the edge of the travel lane adjacent to the work zone to the barrier, barricades, or cones; 0 to 12 feet.

    - #### fDN

          private int fDN

      Identifier for daylight or night.

    - #### fS

          private float fS

      Work zone speed limit.

    - #### fNr

          private float fNr

      Total Ramp Density of the length of the work zone plus three miles upstream and downstream of the ends of the work zone. Number of ramps in over 3+wzLength+3 divided by 6+wzLength. Note that the variable name reflects an earlier concept of number of ramps, but has since been updated.

    - #### alphaWZ

          public float alphaWZ

      The percentage drop in pre-breakdown capacity at the work zone due to queuing conditions (%). The recommended default value for instances when an analyst has little data is 13.4%.

    - #### wzCAF

          private float[] wzCAF

      Array to hold the Capacity Adjustment Factors for the work zone.

    - #### wzDAF

          private float[] wzDAF

      Array to hold the Demand Adjustment Factors for the work zone.

    - #### wzSAF

          private float[] wzSAF

      Array to hold the Speed Adjustment Factors for the work zone.

    - #### BARRIER_TYPE_CONCRETE

          public static final int BARRIER_TYPE_CONCRETE

      Identifier for concrete barriers.
      See Also:
        Constant Field Values

    - #### BARRIER_TYPE_OTHER

          public static final int BARRIER_TYPE_OTHER

      Identifier for cone, Type II barricade, or plastic drums barriers
      See Also:
        Constant Field Values

    - #### AREA_TYPE_URBAN

          public static final int AREA_TYPE_URBAN

      Identifier for urban area type for the work zone.
      See Also:
        Constant Field Values

    - #### AREA_TYPE_RURAL

          public static final int AREA_TYPE_RURAL

      Identifier for rural area type for the work zone.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### WorkZone

          public WorkZone(Seed seed,
                          int severity,
                          int startPeriod,
                          int duration,
                          CEDate[] dates,
                          int[] segments)

      Parameters:
        `seed` -
        `severity` -
        `startPeriod` -
        `duration` -
        `dates` -
        `segments` -

    - #### WorkZone

          public WorkZone(Seed seed,
                          int severity,
                          int startPeriod,
                          int duration,
                          CEDate[] dates,
                          java.lang.Integer[] segments)

      Parameters:
        `seed` -
        `severity` -
        `startPeriod` -
        `duration` -
        `dates` -
        `segments` -

    - #### WorkZone

          public WorkZone(Seed seed,
                          int severity,
                          int startPeriod,
                          int duration,
                          CEDate startDate,
                          CEDate endDate,
                          int startSegment,
                          int endSegment)

      Parameters:
        `seed` -
        `severity` -
        `startPeriod` -
        `duration` -
        `startDate` -
        `endDate` -
        `startSegment` -
        `endSegment` -

  - ### Method Detail

    - #### initializeWorkZone

          private void initializeWorkZone()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getNoDateString

          public java.lang.String getNoDateString()

    - #### isActiveIn

          public boolean isActiveIn(int segment,
                                    int period)

      Checks if the work zone is active in a specified segment and period. Date of the work zone not considered.
      Parameters:
        `segment` - Segment to check if within the work zone.
        `period` - Period to check if during work zone periods.
      Returns:
        True if the work zone is active in the segment and period, false otherwise.

    - #### isActiveIn

          public boolean isActiveIn(int period)

      Checks if the work zone is active on the facility for a specific period. Date of the work zone not considered.
      Parameters:
        `period` - Period to check if during work zone periods.
      Returns:
        True if the work zone is active in the segment and period, false otherwise.

    - #### hasOverlap

          public boolean hasOverlap(WorkZone wz)

      Parameters:
        `wz` -
      Returns:

    - #### checkFeasibleLaneClosure

          public boolean checkFeasibleLaneClosure()

      Checks if the work zone is feasible over the work zone segments. Checks if the lane closures are allowable in all segments.
      Returns:

    - #### isValid

          public boolean isValid()

      Checks to see if the event is valid for the seed/scenario in both the spatial and temporal sense.
      Returns:
        true if the event is valid, false if not valid

    - #### getEventCAF

          public float getEventCAF(int segment)

      Parameters:
        `segment` -
      Returns:

    - #### getEventOAF

          public float getEventOAF(int segment)

      Parameters:
        `segment` -
      Returns:

    - #### getEventDAF

          public float getEventDAF(int segment)

      Parameters:
        `segment` -
      Returns:

    - #### getEventSAF

          public float getEventSAF(int segment)

      Parameters:
        `segment` -
      Returns:

    - #### getEventLAF

          public int getEventLAF(int segment)

      Returns Lane Adjustment factor (always less than or equal to 0) for the work zone in the specified period and segment.
      Parameters:
        `segment` -
      Returns:

    - #### getAdjFactor

          public float getAdjFactor(int adjFactorType,
                                    int segment)

    - #### setEventCAF

          public void setEventCAF(float val,
                                  int segment)

    - #### setEventDAF

          public void setEventDAF(float val,
                                  int segment)

    - #### setEventSAF

          public void setEventSAF(float val,
                                  int segment)

    - #### setBarrierType

          public void setBarrierType(int barrierType)

    - #### setAreaType

          public void setAreaType(int areaType)

    - #### setLateralDistance

          public void setLateralDistance(float lateralDistance)

    - #### setWorkZoneSpeedLimit

          public void setWorkZoneSpeedLimit(float speed)

    - #### calcLCSI

          private float calcLCSI(int segment)

    - #### calcQDR

          private float calcQDR(int segment)

    - #### calcfNr

          private float calcfNr()

    - #### calcWZCapacity

          private float calcWZCapacity(int segment)

      Calculates the work zone capacity (or pre-breakdown flow rate) in pc/h/l
      Parameters:
        `segment` -
      Returns:

    - #### calcfSr

          public float calcfSr(int segment,
                               int period)

    - #### calcFFSwz

          private float calcFFSwz(int segment,
                                  int period)

    - #### calculateCAF

          private float calculateCAF(int segment)

    - #### calculateSAF

          private float calculateSAF(int segment)

    - #### updateAdjustmentFactors

          public void updateAdjustmentFactors()

    - #### segmentMapper

          private int segmentMapper(int segment)

      Maps the segment of the facility to the index of the segment in the work zone.
      Parameters:
        `segment` -

    - #### getStartDate

          public CEDate getStartDate()

      Returns:

    - #### getEndDate

          public CEDate getEndDate()

      Returns:

    - #### getDates

          public CEDate[] getDates()

      Returns:

    - #### getStartSegment

          public int getStartSegment()

      Returns:

    - #### getEndSegment

          public int getEndSegment()

      Returns:

    - #### getNumberOfSegments

          public int getNumberOfSegments()

    - #### getSegments

          public int[] getSegments()

      Returns:

    - #### getStartPeriod

          public int getStartPeriod()

      Returns:

    - #### getEndPeriod

          public int getEndPeriod()

      Returns the end period of the WorkZone. Note that the end period is "inclusive" in that it is the last period in which the work zone is active. If a work zone starts in period 4 and has a duration of 1, then the end period is also 4.
      Returns:
        Last period in which the work zone is active.

    - #### getPeriods

          public int[] getPeriods()

      Returns:

    - #### getSeverity

          public int getSeverity()

    - #### getSeverityString

          public java.lang.String getSeverityString()

      Returns:

    - #### getTypeFull

          public static java.lang.String getTypeFull(int incType)

      Parameters:
        `incType` -
      Returns: