public class WorkZone
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
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
Number of on-ramps and off-ramps within three miles upstream and
downstream of the work zone area.
|
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 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) |
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() |
private static final long serialVersionUID
protected final Seed seed
private final int severity
protected final int startPeriod
protected final int duration
private final CEDate startDate
private final CEDate endDate
private final int startSegment
private final int endSegment
private int fBr
private int fA
private float fLAT
private int fDN
private float fS
private float fNr
private float[] wzCAF
private float[] wzDAF
private float[] wzSAF
public static final int BARRIER_TYPE_CONCRETE
public static final int BARRIER_TYPE_OTHER
public static final int AREA_TYPE_URBAN
public static final int AREA_TYPE_RURAL
public WorkZone(Seed seed, int severity, int startPeriod, int duration, CEDate[] dates, int[] segments)
seed
- severity
- startPeriod
- duration
- dates
- segments
- public WorkZone(Seed seed, int severity, int startPeriod, int duration, CEDate[] dates, java.lang.Integer[] segments)
seed
- severity
- startPeriod
- duration
- dates
- segments
- private void initializeWorkZone()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getNoDateString()
public boolean isActiveIn(int segment, int period)
segment
- Segment to check if within the work zone.period
- Period to check if during work zone periods.public boolean isActiveIn(int period)
period
- Period to check if during work zone periods.public boolean hasOverlap(WorkZone wz)
wz
- public boolean checkFeasibleLaneClosure()
public boolean isValid()
public float getEventCAF(int segment)
segment
- public float getEventOAF(int segment)
segment
- public float getEventDAF(int segment)
segment
- public float getEventSAF(int segment)
segment
- public int getEventLAF(int segment)
segment
- public float getAdjFactor(int adjFactorType, int segment)
public void setEventCAF(float val, int segment)
public void setEventDAF(float val, int segment)
public void setEventSAF(float val, int segment)
public void setBarrierType(int barrierType)
public void setAreaType(int areaType)
public void setLateralDistance(float lateralDistance)
public void setWorkZoneSpeedLimit(float speed)
private float calcLCSI(int segment)
private float calcQDR(int segment)
private float calcfNr()
private float calcWZCapacity(int segment)
segment
- public float calcfSr(int segment, int period)
private float calcFFSwz(int segment, int period)
private float calculateCAF(int segment)
private float calculateSAF(int segment)
public void updateAdjustmentFactors()
private int segmentMapper(int segment)
segment
- public CEDate getStartDate()
public CEDate getEndDate()
public CEDate[] getDates()
public int getStartSegment()
public int getEndSegment()
public int getNumberOfSegments()
public int[] getSegments()
public int getStartPeriod()
public int getEndPeriod()
public int[] getPeriods()
public int getSeverity()
public java.lang.String getSeverityString()
public static java.lang.String getTypeFull(int incType)
incType
-