coreEngine

## Class GPMLSegment

- java.lang.Object
- - coreEngine.GPMLSegment

- All Implemented Interfaces:
    java.io.Serializable

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

  This class represent a single general purpose (GP) or managed lane (ML) segment. Only used in coreEngine package (no public methods). This class includes 1. Input and output data for a single segment. 2. Both under saturated and over saturated segment calculations.
  Author:
    Shu Liu
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) float` | `capacityDropFactor` Capacity drop factor (for two capacity calculation)
    `CECoordinate` | `coord` Coordinate of the downstream end of the segment
    `(package private) float[]` | `DEF` Deficit (for off ramp calculation), veh
    `(package private) float` | `denyEntry` Number of vehicles deny entry
    `(package private) float` | `ED` Expected demand, vph
    `(package private) float` | `globalDef` Study Period Deficit
    `(package private) int` | `inAccDecLength_ft` Acceleration or deceleration lane length in feet, used for on ramp or off ramp segment only
    `(package private) java.util.ArrayList<java.lang.Float>` | `inATDMCAF`
    `(package private) java.util.ArrayList<java.lang.Float>` | `inCalibCAF`
    `(package private) float` | `inCapacityDropPercentage` Capacity drop percentage for two capacity
    `(package private) float[]` | `inCrossCAF` Cross weaving capacity adjustment factor
    `(package private) int` | `inDecelLength_ft` Deceleration lane length in feet, used for off ramp segment only
    `(package private) GPMLSegment` | `inDownSeg` Adjacent downstream segment
    `(package private) float` | `inET` Truck passenger car equivalent ET
    `(package private) int` | `inGPCrossWeaveLCMin` Cross-weave length (ft)
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inGPCrossWeaveVolume` Cross weave volume
    `(package private) boolean` | `inGPHasCrossWeave` Whether GP has cross weave effect, only possible when ML is used
    `(package private) int` | `inGPMLType` Segment type (General Purpose or Managed Lane)
    `(package private) java.util.ArrayList<java.lang.Float>` | `inIncidentCAF`
    `(package private) int` | `inIndex` Segment index, for debug only, not used for calculation
    `(package private) int` | `inLaneWidth_ft` Lane width in feet
    `(package private) int` | `inLateralClearance_ft` Lateral clearance in feet
    `(package private) int` | `inLCFR` Minimum number of lane change from freeway to ramp
    `(package private) int` | `inLCRF` Minimum number of lane change from ramp to freeway
    `(package private) int` | `inLCRR` Minimum number of lane change from ramp to ramp
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inMainlineDemand_veh` Mainline demand in vph, only required for the first segment
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inMainlineFFS` Mainline free flow speed, mph
    `(package private) float[]` | `inMainlineFHV` Heavy vehicle adjustment factor
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inMainlineNumLanes` Mainline number of lanes
    `(package private) java.util.ArrayList<java.lang.Float>` | `inMainlineTruckSingle` Mainline truck single percentage
    `(package private) java.util.ArrayList<java.lang.Float>` | `inMainlineTruckTrailer` Mainline truck trailer percentage
    `(package private) int` | `inMLMaxLC` ML max lane change
    `(package private) int` | `inMLMinLC` ML min lane change
    `(package private) int` | `inMLSeparation` ML separation type
    `(package private) int` | `inNWL` Number of lanes weave, can only be 2 or 3
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inOffDemand_veh` Off ramp demand in vph
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inOffFFS` Off ramp free flow speed, mph
    `(package private) int` | `inOffNumLanes` Off ramp number of lanes
    `(package private) int` | `inOffSide` Off ramp side
    `(package private) java.util.ArrayList<java.lang.Float>` | `inOFRTruckSingle` Off-ramp truck single percentage
    `(package private) java.util.ArrayList<java.lang.Float>` | `inOFRTruckTrailer` Off-ramp truck trailer percentage
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inOnDemand_veh` On ramp demand in vph
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inOnFFS` On ramp free flow speed, mph
    `(package private) int` | `inOnNumLanes` On ramp number of lanes
    `(package private) int` | `inOnQueueCapacity` On ramp maximum queue capacity (veh/lane)
    `(package private) java.util.ArrayList<java.lang.Float>` | `inONRTruckSingle` On-ramp truck single percentage
    `(package private) java.util.ArrayList<java.lang.Float>` | `inONRTruckTrailer` On-ramp truck trailer percentage
    `(package private) int` | `inOnSide` On ramp side
    `(package private) GPMLSegment` | `inParallelSeg` Parallel GP/ML segment
    `(package private) java.util.ArrayList<java.lang.Integer>` | `inRRDemand_veh` Ramp to ramp demand in vph
    `(package private) int` | `inSegLength_ft` Segment length in feet
    `(package private) int` | `inShort_ft` Short length in feet, used for weave segment only
    `(package private) int` | `inTerrain` Terrain type
    `(package private) int` | `inType` Segment type (Basic, On Ramp, Off Ramp, Weaving, or Overlapping)
    `(package private) java.util.ArrayList<java.lang.Float>` | `inUCAF` User capacity adjustment factor (calibration)
    `(package private) java.util.ArrayList<java.lang.Float>` | `inUDAF` User destination demand adjustment factor (calibration)
    `(package private) java.util.ArrayList<java.lang.Float>` | `inUDPCAF` User driver population capacity adjustment factor
    `(package private) java.util.ArrayList<java.lang.Float>` | `inUDPSAF` User driver population free flow speed adjustment factor
    `(package private) java.util.ArrayList<java.lang.Float>` | `inUOAF` User origin demand adjustment factor (calibration)
    `(package private) GPMLSegment` | `inUpSeg` Adjacent upstream segment
    `(package private) java.util.ArrayList<java.lang.Float>` | `inUSAF` User free flow speed adjustment factor (calibration)
    `(package private) java.util.ArrayList<java.lang.Float>` | `inWZCAF`
    `(package private) float` | `KB` Background density veh/mi
    `(package private) float` | `KC` Ideal density at capacity, veh/mi/ln
    `(package private) float` | `KJ` Facility-wide jam density, veh/mi/ln
    `(package private) float[]` | `KQ` Queue density, veh/mi
    `(package private) float[]` | `MF` Mainline flow, veh
    `(package private) float` | `MF_fix` Offset to fix DEF calculation bug
    `(package private) float[]` | `MI` Mainline input, veh
    `(package private) float[]` | `MO1` Mainline output 1 (based capacity and previous MO2 and MO3), veh
    `(package private) float[]` | `MO2` Mainline output 2 (based on queue density), veh
    `(package private) float[]` | `MO3` Mainline output 3 (based on front clear queue and wave travel speed), veh
    `(package private) static int` | `NUM_STEPS` Number of steps per analysis period
    `(package private) float[]` | `NV` Number of vehicles, veh
    `(package private) float[]` | `OFRF` Off ramp flow, veh
    `(package private) float[]` | `ONRF` On ramp flow, veh
    `(package private) float[]` | `ONRO` On ramp output, veh
    `(package private) float[]` | `ONRQ` On ramp queue, veh
    `(package private) int` | `P` Number of periods
    `(package private) float[]` | `Q` Mainline queue length in ft (at end of each period)
    `(package private) float[]` | `scenAllDensity_veh` Overall density for each segment, in veh/mi/ln
    `(package private) float[]` | `scenDenyQ` Deny entry queue (veh)
    `(package private) float[]` | `scenIADensity_pc` Influence area density for ONR or OFR segment, in pc/mi/ln
    `(package private) boolean[]` | `scenIsFrontClearingQueues` Whether is front clearing queue
    `(package private) float[]` | `scenMainlineCapacity_veh` Mainline capacity in vph
    `(package private) float[]` | `scenMainlineDemand_veh` Mainline demand in vph, only required for the first segment
    `(package private) float[]` | `scenMainlineFFS` Mainline free flow speed, mph
    `(package private) int[]` | `scenMainlineNumLanes` Mainline number of lanes
    `(package private) float[]` | `scenMainlineVolume_veh` Mainline volume served in vph
    `(package private) float` | `scenMaxDC` Max DC for this segment over all periods in one scenario
    `(package private) float` | `scenMaxVC` Max VC for this segment over all periods in one scenario
    `(package private) float[]` | `scenOccupancyPercent` Occupancy Percent
    `(package private) float[]` | `scenOffCapacity_veh` Off ramp capacity in vph
    `(package private) float[]` | `scenOffDemand_veh` Off ramp demand in vph
    `(package private) float[]` | `scenOffFFS` Off ramp free flow speed, mph
    `(package private) float[]` | `scenOffVolume_veh` Off ramp volume served in vph
    `(package private) float[]` | `scenOnCapacity_veh` On ramp capacity in vph
    `(package private) float[]` | `scenOnDemand_veh` On ramp demand in vph
    `(package private) float[]` | `scenOnFFS` On ramp free flow speed, mph
    `(package private) float[]` | `scenONRQ_End_veh` On ramp queue (at end of each period), veh
    `(package private) float[]` | `scenONRQ_Max_veh` On ramp maximum queue (at end of each period), veh
    `(package private) float[]` | `scenOnVolume_veh` On ramp volume served in vph
    `(package private) float[]` | `scenRM_veh` Ramp Metering Rate
    `(package private) float[]` | `scenRRDemand_veh` Ramp to ramp demand in vph
    `(package private) float[]` | `scenSpeed` Overall speed for each segment, mph
    `(package private) int[]` | `scenStepsRampMetered` Number of steps in each period that are metered
    `(package private) float[]` | `scenTotalRM` Average Metering Rate in a period
    `(package private) int[]` | `scenType` Process segment type
    `(package private) float[]` | `scenVC` Volume / capacity ratio
    `(package private) float[]` | `scenVHD` VHD delay / interval (hrs)
    `(package private) float[]` | `scenVHD_M` VHD_M delay / interval (hrs)
    `(package private) float[]` | `scenVHD_R` On ramp delay
    `(package private) float[]` | `scenVHT` VHT travel / interval (hrs)
    `(package private) float[]` | `scenVMTD` VMTD veh-miles / interval
    `(package private) float[]` | `scenVMTV` VMTV veh-miles / interval
    `(package private) float[]` | `scenVNW` Non-weave volume pc/h
    `(package private) float[]` | `scenVW` Weave volume pc/h
    `private Seed` | `seed` Seed instance that contains this segment
    `(package private) java.lang.String` | `segmentName` Segment Name
    `private static long` | `serialVersionUID` serialVersionUID
    `(package private) float[]` | `SF` Segment flow, veh
    `(package private) static int` | `T` Number of steps per hour = 60 * 4
    `(package private) float[]` | `testOnRampDelay` New method for on ramp delay calculation, veh
    `(package private) float` | `totalRampDensity` TRD: total ramp density
    `(package private) int[]` | `unadjustedSegDemand` Unadjusted segment demand for each period
    `(package private) float[]` | `UV` Unserved vehicles, veh
    `(package private) int` | `WTT` Wave travel time (in time step)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GPMLSegment(Seed seed)` Constructor of GPSegment
    `GPMLSegment(Seed seed, int inNumPeriod)` Constructor of GPSegment

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private float` | `calCAF(int scen, int atdm, int period)` Helper Function for Total Capacity Adjustment Factor
    `private void` | `calCapacity(int scen, int atdm)` Calculate adjusted mainline and ramp capacities
    `private void` | `calCrossCAF()` Calculate cross weave CAF
    `private void` | `calDC()` Calculate demand over capacity ratio
    `private void` | `calDemand_Mainline(int scen, int atdm, int period)` Calculate mainline demand
    `private void` | `calDemand(int scen, int atdm)` Calculate adjusted demand based on adjustment factors for one scenario
    `(package private) void` | `calExtendedResults()` Extend output results based on output speed and density
    `private void` | `calFFS(int scen, int atdm)` Calculate adjusted free flow speed based on adjustment factors for one scenario
    `private void` | `calHeavyVehAdj()` Calculate heavy vehicle adjustment factors
    `private void` | `calInitialRM(int scen, int atdm)` Calculate initial ramp metering for each period, only GP segments use ramp metering
    `private void` | `calLane(int scen, int atdm)` Calculate adjusted number of lanes based on adjustment factors for one scenario
    `private float` | `calSAF(int scen, int atdm, int period)` Helper Function for Total Speed Adjustment Factor
    `private void` | `calSpeedAndDensity(int scen, int atdm, int period, int status)` Calculate speed and density using under saturated method
    `private void` | `calTotalRampDensity()` Calculate total ramp density
    `private void` | `calType()` Calculate processing segment type for one scenario
    `private void` | `calUnadjustedEstDemandAndMainlineTruckPCT()` Calculate unadjusted Segment Demand for all segments downstream of the initial mainline segment as well as calculate the mainline SUT and TT % based on mainline/ONR/OFR percentages.
    `private void` | `calWeaving(int period)` Calculate weaving volume for one scenario one period
    `private void` | `checkFrontClearQueue()` Check front clear queue
    `private void` | `checkMainlineQueueLength(int period)` Check whether mainline queue length is less or equal to segment length.
    `(package private) void` | `checkOverlap(int period)` Check adjacent upstream overlapping segment speed and density
    `(package private) void` | `estimateFFS()` Estimate free flow speed if free flow speed is unknown
    `private float` | `funcAccessMainlineCapacity(int scen, int atdm, int period)` Calculate adjusted mainline capacity (vph) for access segment
    `private float` | `funcAdaptiveRampMeteringALINEA(int scen, int atdm, int period, int step)` Adjust ramp metering rate based on traffic conditions and ramp metering rate in the previous 15-sec step using ALINEA method.
    `private float` | `funcAdaptiveRampMeteringFuzzy(int scen, int atdm, int period, int step, int inOverMode)` Adjust ramp metering rate based on traffic conditions and ramp metering rate in the previous 15-sec step using fuzzy method.
    `private float` | `funcBasicDensity(int status, int scen, int atdm, int period)` Calculate density for basic segment using under saturated method
    `float` | `funcBasicIdealMainlineCapacityPC(int scen, int atdm, int period)` Ideal (un-adjusted) capacity in passenger cars per hour per lane (for display purposes only).
    `private float` | `funcBasicIdealMainlineCapacityVPH(int scen, int atdm, int period)` Ideal (un-adjusted) capacity in vehicles per hour.
    `private float` | `funcBasicMainlineCapacity(int scen, int atdm, int period)` Calculate adjusted mainline capacity (vph) for basic segment
    `float` | `funcBasicMainlineHCMIdealCapacity(int period)` HCM Ideal capacity (FFS based) in passenger cars per hour per lane (pcphpln)
    `private float` | `funcBasicSpeed(int status, int scen, int atdm, int period)` Calculate speed for basic segment using under saturated method
    `private float` | `funcDEF_new(int period, int step, int inOverMode)` Calculate DEF for a particular step in a particular period in a particular scenario
    `private float` | `funcDEF(int period, int step, int inOverMode)` Calculate DEF for a particular step in a particular period in a particular scenario
    `(package private) java.lang.String` | `funcDemandLOS(int period)` Calculate demand based level of service
    `private float` | `funcDemandMainline(int period)` Calculate mainline demand
    `(package private) java.lang.String` | `funcDensityLOS(int period)` Calculate density based level of service
    `private float` | `funcDummyMF(int period, int step, int inOverMode, boolean updateDenyEntry)` Calculate Dummy MF (for first segment only) for a particular step in a particular period in a particular scenario
    `private float` | `funcED(int period)` Calculate ED for a particular period in a particular scenario
    `private float` | `funcIdealCapacity(float freeFlowSpeed)` Calculate ideal mainline capacity (pc/h/ln) based on mainline free flow speed
    `private float` | `funcKB(int scen, int atdm, int period)` Calculate KB for a particular period in a particular scenario
    `private float` | `funcKQ(int period, int step, int inOverMode)` Calculate KQ for a particular step in a particular period in a particular scenario
    `private float` | `funcMaxShort(int period)` Calculate maximum short length for weaving segment in ft
    `private float` | `funcMaxSpeed(int period)` Calculate maximum speed based on upstream speed
    `private float` | `funcMF(int period, int step)` Calculate MF for a particular step in a particular period in a particular scenario
    `private float` | `funcMI(int period, int step, int inOverMode)` Calculate MI for a particular step in a particular period in a particular scenario
    `private float` | `funcMLBasicMainlineCapacity(int period)` Calculate ML basic mainline capacity
    `private float` | `funcMO1(int period, int step)` Calculate MO1 for a particular step in a particular period in a particular scenario
    `private float` | `funcMO2(int period, int step, int inOverMode)` Calculate MO2 for a particular step in a particular period in a particular scenario
    `private float` | `funcMO3(int period, int step, int inOverMode)` Calculate MO3 for a particular step in a particular period in a particular scenario
    `private float` | `funcNV(int period, int step, int inOverMode)` Calculate NV for a particular step in a particular period in a particular scenario
    `private float` | `funcOff_PFD_6Lane(int status, int period, float v_F, float v_R)` Calculate off-ramp P_FD for a 6 Lane (3 each direction) highway for the undersaturated method.
    `private float` | `funcOff_vR(int status, int period)` Calculate v_R for off ramp segment using under saturated method
    `private float` | `funcOffAllDensity(int status, int period)` Calculate overall density for off ramp segment using under saturated method
    `private float` | `funcOffFlowRateInLanes1and2(int status, int period)` Calculate off ramp flow rate in lane 1 and 2 using under saturated method
    `private float` | `funcOffIADensity(int status, int period)` Calculate influenced area density for off ramp segment using under saturated method
    `private float` | `funcOffRampCapacity(int period)` Calculate adjusted off ramp capacity (vph)
    `private float` | `funcOffRemainFactor(int status, int period)` Calculate off ramp remain factor using under saturated method
    `private float` | `funcOffSpeed(int status, int period)` Calculate speed for off ramp segment using under saturated method
    `private float` | `funcOFRF(int period, int step)` Calculate OFRF for a particular step in a particular period in a particular scenario
    `private float` | `funcOn_PFM_6Lane(int status, int period, float v_F, float v_R)` Calculate on-ramp P_FM for a 6 Lane (3 each direction) highway for the undersaturated method.
    `private float` | `funcOn_vR(int status, int period)` Calculate v_R for on ramp segment using under saturated method
    `private float` | `funcOnAllDensity(int status, int period)` Calculate overall density for on ramp segment using under saturated method
    `private float` | `funcOnFlowRateInLanes1and2(int status, int period)` Calculate on ramp flow rate in lane 1 and 2 using under saturated method
    `private float` | `funcOnIADensity(int status, int period)` Calculate influenced area density for on ramp segment using under saturated method
    `private float` | `funcOnOff_vF(int status, int period)` Calculate v_F for on ramp or off ramp segment using under saturated method
    `private float` | `funcOnRampCapacity(int period)` Calculate adjusted on ramp capacity (vph)
    `private float` | `funcOnRemainFactor(int status, int period)` Calculate on ramp remain factor using under saturated method
    `private float` | `funcONRF(int scen, int atdm, int period, int step, int inOverMode)` Calculate ONRF for a particular step in a particular period in a particular scenario
    `private float` | `funcONRI(int period, int step)` Calculate ONRI for a particular step in a particular period in a particular scenario
    `private float` | `funcONRO(int scen, int atdm, int period, int step, int inOverMode)` Calculate ONRO for a particular step in a particular period in a particular scenario
    `private float` | `funcOnSpeed(int status, int period)` Calculate speed for on ramp segment using under saturated method
    `private float` | `funcOverlapDensity(int status, int scen, int atdm, int period)` Calculate density for overlapping segment
    `private float` | `funcOverlapSpeed(int status, int scen, int atdm, int period)` Calculate speed for overlapping segment
    `private float` | `funcRampCapacity(int numOfRampLanes, float rampFreeFlowSpeed)` Calculate ramp capacity (pc/h) based on ramp free flow speed and number of ramp lanes
    `private float` | `funcRampMetering(int scen, int atdm, int period, int step, int inOverMode)` Calculate ramp metering for a particular step
    `private float` | `funcSF(int step)` Calculate SF for a particular step in a particular period in a particular scenario
    `private float` | `funcUV(int step)` Calculate UV for a particular step in a particular period in a particular scenario
    `private float` | `funcWeaveDensity(int status, int scen, int atdm, int period)` Calculate density for weaving segment using under saturated method
    `private float` | `funcWeaveMainlineCapacity(int scen, int atdm, int period)` Calculate adjusted mainline capacity (vph) for weaving segment
    `private float` | `funcWeaveSpeed(int status, int scen, int atdm, int period)` Calculate speed for weaving segment using under saturated method
    `private int` | `funcWTT(int period)` Calculate WTT for a particular period in a particular scenario
    `(package private) float` | `getScenActualTime(int period)` Getter for scenario ActualTime
    `(package private) float` | `getScenAllDensity_pc(int period)` Getter for scenario AllDensity_pc
    `(package private) float` | `getScenDC(int period)` Getter for scenario DC
    `(package private) float` | `getScenFFSTime(int period)` Getter for scenario FFSTime
    `(package private) float` | `getScenMainlineDelay(int period)` Getter for scenario MainlineDelay
    `(package private) float` | `getScenTTI(int period)` Getter for scenario TTI
    `private void` | `initInput()` Create memory space for input data
    `(package private) void` | `initMemory()` Create memory space for scenarios (preprocess, output, and over saturated)
    `private boolean` | `isFrontClearQueue(int period, int step)` Check whether it is front clear queue for a particular step in a particular period in a particular scenario
    `private void` | `resetMemory()` Reset memory
    `private void` | `resetOversaturated(boolean isFirstTime)` Reset over saturated data for a particular scenario
    `private float` | `RM_Fuzzy(double DStream_SPD, double UStream_SPD, double DStream_density, double UStream_density, double ONR_Queue_Length, RampMeteringFuzzyData data)` Calculate fuzzy logic adaptive ramp metering
    `(package private) void` | `runOversaturated(int scen, int atdm, int period, int step, int inOverMode)` Run analysis for over saturated cases
    `(package private) void` | `runUndersaturated(int scen, int atdm, int period, int inOverMode)` Run under saturated analysis for one scenario one period
    `(package private) void` | `scenPreprocess(int scen, int atdm)` Create adjusted input data for one scenario

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

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

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      serialVersionUID
      See Also:
        Constant Field Values

    - #### seed

          private Seed seed

      Seed instance that contains this segment

    - #### inType

          int inType

      Segment type (Basic, On Ramp, Off Ramp, Weaving, or Overlapping)

    - #### P

          int P

      Number of periods

    - #### segmentName

          java.lang.String segmentName

      Segment Name

    - #### coord

          public CECoordinate coord

      Coordinate of the downstream end of the segment

    - #### inUpSeg

          GPMLSegment inUpSeg

      Adjacent upstream segment

    - #### inDownSeg

          GPMLSegment inDownSeg

      Adjacent downstream segment

    - #### inParallelSeg

          GPMLSegment inParallelSeg

      Parallel GP/ML segment

    - #### inGPMLType

          int inGPMLType

      Segment type (General Purpose or Managed Lane)

    - #### inCapacityDropPercentage

          float inCapacityDropPercentage

      Capacity drop percentage for two capacity

    - #### inIndex

          int inIndex

      Segment index, for debug only, not used for calculation

    - #### inSegLength_ft

          int inSegLength_ft

      Segment length in feet

    - #### inAccDecLength_ft

          int inAccDecLength_ft

      Acceleration or deceleration lane length in feet, used for on ramp or off ramp segment only

    - #### inDecelLength_ft

          int inDecelLength_ft

      Deceleration lane length in feet, used for off ramp segment only

    - #### inShort_ft

          int inShort_ft

      Short length in feet, used for weave segment only

    - #### inLaneWidth_ft

          int inLaneWidth_ft

      Lane width in feet

    - #### inLateralClearance_ft

          int inLateralClearance_ft

      Lateral clearance in feet

    - #### inTerrain

          int inTerrain

      Terrain type

    - #### inET

          float inET

      Truck passenger car equivalent ET

    - #### inOnSide

          int inOnSide

      On ramp side

    - #### inOffSide

          int inOffSide

      Off ramp side

    - #### inNWL

          int inNWL

      Number of lanes weave, can only be 2 or 3

    - #### inLCRF

          int inLCRF

      Minimum number of lane change from ramp to freeway

    - #### inLCFR

          int inLCFR

      Minimum number of lane change from freeway to ramp

    - #### inLCRR

          int inLCRR

      Minimum number of lane change from ramp to ramp

    - #### T

          static final int T

      Number of steps per hour = 60 * 4
      See Also:
        Constant Field Values

    - #### NUM_STEPS

          static final int NUM_STEPS

      Number of steps per analysis period
      See Also:
        Constant Field Values

    - #### inMainlineNumLanes

          java.util.ArrayList<java.lang.Integer> inMainlineNumLanes

      Mainline number of lanes

    - #### inOnNumLanes

          int inOnNumLanes

      On ramp number of lanes

    - #### inOffNumLanes

          int inOffNumLanes

      Off ramp number of lanes

    - #### inOnQueueCapacity

          int inOnQueueCapacity

      On ramp maximum queue capacity (veh/lane)

    - #### inMainlineDemand_veh

          java.util.ArrayList<java.lang.Integer> inMainlineDemand_veh

      Mainline demand in vph, only required for the first segment

    - #### inOnDemand_veh

          java.util.ArrayList<java.lang.Integer> inOnDemand_veh

      On ramp demand in vph

    - #### inOffDemand_veh

          java.util.ArrayList<java.lang.Integer> inOffDemand_veh

      Off ramp demand in vph

    - #### inRRDemand_veh

          java.util.ArrayList<java.lang.Integer> inRRDemand_veh

      Ramp to ramp demand in vph

    - #### inMainlineFFS

          java.util.ArrayList<java.lang.Integer> inMainlineFFS

      Mainline free flow speed, mph

    - #### inMainlineTruckSingle

          java.util.ArrayList<java.lang.Float> inMainlineTruckSingle

      Mainline truck single percentage

    - #### inMainlineTruckTrailer

          java.util.ArrayList<java.lang.Float> inMainlineTruckTrailer

      Mainline truck trailer percentage

    - #### inONRTruckSingle

          java.util.ArrayList<java.lang.Float> inONRTruckSingle

      On-ramp truck single percentage

    - #### inONRTruckTrailer

          java.util.ArrayList<java.lang.Float> inONRTruckTrailer

      On-ramp truck trailer percentage

    - #### inOFRTruckSingle

          java.util.ArrayList<java.lang.Float> inOFRTruckSingle

      Off-ramp truck single percentage

    - #### inOFRTruckTrailer

          java.util.ArrayList<java.lang.Float> inOFRTruckTrailer

      Off-ramp truck trailer percentage

    - #### inOnFFS

          java.util.ArrayList<java.lang.Integer> inOnFFS

      On ramp free flow speed, mph

    - #### inOffFFS

          java.util.ArrayList<java.lang.Integer> inOffFFS

      Off ramp free flow speed, mph

    - #### inUCAF

          java.util.ArrayList<java.lang.Float> inUCAF

      User capacity adjustment factor (calibration)

    - #### inCalibCAF

          java.util.ArrayList<java.lang.Float> inCalibCAF

    - #### inIncidentCAF

          java.util.ArrayList<java.lang.Float> inIncidentCAF

    - #### inWZCAF

          java.util.ArrayList<java.lang.Float> inWZCAF

    - #### inATDMCAF

          java.util.ArrayList<java.lang.Float> inATDMCAF

    - #### inUOAF

          java.util.ArrayList<java.lang.Float> inUOAF

      User origin demand adjustment factor (calibration)

    - #### inUDAF

          java.util.ArrayList<java.lang.Float> inUDAF

      User destination demand adjustment factor (calibration)

    - #### inUSAF

          java.util.ArrayList<java.lang.Float> inUSAF

      User free flow speed adjustment factor (calibration)

    - #### inUDPCAF

          java.util.ArrayList<java.lang.Float> inUDPCAF

      User driver population capacity adjustment factor

    - #### inUDPSAF

          java.util.ArrayList<java.lang.Float> inUDPSAF

      User driver population free flow speed adjustment factor

    - #### inMLSeparation

          int inMLSeparation

      ML separation type

    - #### inMLMinLC

          int inMLMinLC

      ML min lane change

    - #### inMLMaxLC

          int inMLMaxLC

      ML max lane change

    - #### inGPHasCrossWeave

          boolean inGPHasCrossWeave

      Whether GP has cross weave effect, only possible when ML is used

    - #### inGPCrossWeaveLCMin

          int inGPCrossWeaveLCMin

      Cross-weave length (ft)

    - #### inGPCrossWeaveVolume

          java.util.ArrayList<java.lang.Integer> inGPCrossWeaveVolume

      Cross weave volume

    - #### totalRampDensity

          transient float totalRampDensity

      TRD: total ramp density

    - #### unadjustedSegDemand

          transient int[] unadjustedSegDemand

      Unadjusted segment demand for each period

    - #### inMainlineFHV

          transient float[] inMainlineFHV

      Heavy vehicle adjustment factor

    - #### inCrossCAF

          transient float[] inCrossCAF

      Cross weaving capacity adjustment factor

    - #### scenMainlineNumLanes

          transient int[] scenMainlineNumLanes

      Mainline number of lanes

    - #### scenType

          transient int[] scenType

      Process segment type

    - #### scenMainlineDemand_veh

          transient float[] scenMainlineDemand_veh

      Mainline demand in vph, only required for the first segment

    - #### scenOnDemand_veh

          transient float[] scenOnDemand_veh

      On ramp demand in vph

    - #### scenOffDemand_veh

          transient float[] scenOffDemand_veh

      Off ramp demand in vph

    - #### scenRRDemand_veh

          transient float[] scenRRDemand_veh

      Ramp to ramp demand in vph

    - #### scenRM_veh

          transient float[] scenRM_veh

      Ramp Metering Rate

    - #### scenVW

          transient float[] scenVW

      Weave volume pc/h

    - #### scenVNW

          transient float[] scenVNW

      Non-weave volume pc/h

    - #### scenMainlineFFS

          transient float[] scenMainlineFFS

      Mainline free flow speed, mph

    - #### scenOnFFS

          transient float[] scenOnFFS

      On ramp free flow speed, mph

    - #### scenOffFFS

          transient float[] scenOffFFS

      Off ramp free flow speed, mph

    - #### scenMainlineCapacity_veh

          transient float[] scenMainlineCapacity_veh

      Mainline capacity in vph

    - #### scenOnCapacity_veh

          transient float[] scenOnCapacity_veh

      On ramp capacity in vph

    - #### scenOffCapacity_veh

          transient float[] scenOffCapacity_veh

      Off ramp capacity in vph

    - #### scenVC

          transient float[] scenVC

      Volume / capacity ratio

    - #### scenMaxDC

          transient float scenMaxDC

      Max DC for this segment over all periods in one scenario

    - #### scenMaxVC

          transient float scenMaxVC

      Max VC for this segment over all periods in one scenario

    - #### scenSpeed

          transient float[] scenSpeed

      Overall speed for each segment, mph

    - #### scenAllDensity_veh

          transient float[] scenAllDensity_veh

      Overall density for each segment, in veh/mi/ln

    - #### scenIADensity_pc

          transient float[] scenIADensity_pc

      Influence area density for ONR or OFR segment, in pc/mi/ln

    - #### scenMainlineVolume_veh

          transient float[] scenMainlineVolume_veh

      Mainline volume served in vph

    - #### scenOccupancyPercent

          transient float[] scenOccupancyPercent

      Occupancy Percent

    - #### scenOnVolume_veh

          transient float[] scenOnVolume_veh

      On ramp volume served in vph

    - #### scenOffVolume_veh

          transient float[] scenOffVolume_veh

      Off ramp volume served in vph

    - #### scenIsFrontClearingQueues

          transient boolean[] scenIsFrontClearingQueues

      Whether is front clearing queue

    - #### scenVHD_R

          transient float[] scenVHD_R

      On ramp delay

    - #### scenVMTD

          transient float[] scenVMTD

      VMTD veh-miles / interval

    - #### scenVMTV

          transient float[] scenVMTV

      VMTV veh-miles / interval

    - #### scenVHT

          transient float[] scenVHT

      VHT travel / interval (hrs)

    - #### scenVHD

          transient float[] scenVHD

      VHD delay / interval (hrs)

    - #### scenVHD_M

          transient float[] scenVHD_M

      VHD_M delay / interval (hrs)

    - #### scenDenyQ

          transient float[] scenDenyQ

      Deny entry queue (veh)

    - #### scenStepsRampMetered

          transient int[] scenStepsRampMetered

      Number of steps in each period that are metered

    - #### scenTotalRM

          transient float[] scenTotalRM

      Average Metering Rate in a period

    - #### ED

          transient float ED

      Expected demand, vph

    - #### KB

          transient float KB

      Background density veh/mi

    - #### WTT

          transient int WTT

      Wave travel time (in time step)

    - #### capacityDropFactor

          transient float capacityDropFactor

      Capacity drop factor (for two capacity calculation)

    - #### ONRF

          transient float[] ONRF

      On ramp flow, veh

    - #### ONRO

          transient float[] ONRO

      On ramp output, veh

    - #### OFRF

          transient float[] OFRF

      Off ramp flow, veh

    - #### ONRQ

          transient float[] ONRQ

      On ramp queue, veh

    - #### testOnRampDelay

          transient float[] testOnRampDelay

      New method for on ramp delay calculation, veh

    - #### Q

          transient float[] Q

      Mainline queue length in ft (at end of each period)

    - #### scenONRQ_End_veh

          transient float[] scenONRQ_End_veh

      On ramp queue (at end of each period), veh

    - #### scenONRQ_Max_veh

          transient float[] scenONRQ_Max_veh

      On ramp maximum queue (at end of each period), veh

    - #### UV

          transient float[] UV

      Unserved vehicles, veh

    - #### NV

          transient float[] NV

      Number of vehicles, veh

    - #### KQ

          transient float[] KQ

      Queue density, veh/mi

    - #### DEF

          transient float[] DEF

      Deficit (for off ramp calculation), veh

    - #### globalDef

          transient float globalDef

      Study Period Deficit

    - #### MI

          transient float[] MI

      Mainline input, veh

    - #### MO1

          transient float[] MO1

      Mainline output 1 (based capacity and previous MO2 and MO3), veh

    - #### MO2

          transient float[] MO2

      Mainline output 2 (based on queue density), veh

    - #### MO3

          transient float[] MO3

      Mainline output 3 (based on front clear queue and wave travel speed), veh

    - #### MF

          transient float[] MF

      Mainline flow, veh

    - #### MF_fix

          transient float MF_fix

      Offset to fix DEF calculation bug

    - #### SF

          transient float[] SF

      Segment flow, veh

    - #### KJ

          float KJ

      Facility-wide jam density, veh/mi/ln

    - #### KC

          float KC

      Ideal density at capacity, veh/mi/ln

    - #### denyEntry

          transient float denyEntry

      Number of vehicles deny entry

  - ### Constructor Detail

    - #### GPMLSegment

          GPMLSegment(Seed seed,
                      int inNumPeriod)

      Constructor of GPSegment
      Parameters:
        `seed` - seed that contains this segment
        `inNumPeriod` - number of periods

    - #### GPMLSegment

          GPMLSegment(Seed seed)

      Constructor of GPSegment
      Parameters:
        `seed` - seed that contains this segment

  - ### Method Detail

    - #### initInput

          private void initInput()

      Create memory space for input data

    - #### initMemory

          final void initMemory()

      Create memory space for scenarios (preprocess, output, and over saturated)

    - #### calCAF

          private float calCAF(int scen,
                               int atdm,
                               int period)

      Helper Function for Total Capacity Adjustment Factor
      Parameters:
        `scen` - scenario index
        `atdm` - atdm index
        `period` - period index
      Returns:
        total CAF

    - #### calSAF

          private float calSAF(int scen,
                               int atdm,
                               int period)

      Helper Function for Total Speed Adjustment Factor
      Parameters:
        `scen` - scenario index
        `atdm` - atdm index
        `period` - period index
      Returns:
        total SAF

    - #### estimateFFS

          void estimateFFS()

      Estimate free flow speed if free flow speed is unknown

    - #### scenPreprocess

          void scenPreprocess(int scen,
                              int atdm)

      Create adjusted input data for one scenario
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - atdm index

    - #### resetMemory

          private void resetMemory()

      Reset memory

    - #### calInitialRM

          private void calInitialRM(int scen,
                                    int atdm)

      Calculate initial ramp metering for each period, only GP segments use ramp metering
      Parameters:
        `scen` - scenario index
        `atdm` - ATDM set index

    - #### checkFrontClearQueue

          private void checkFrontClearQueue()

      Check front clear queue

    - #### calUnadjustedEstDemandAndMainlineTruckPCT

          private void calUnadjustedEstDemandAndMainlineTruckPCT()

      Calculate unadjusted Segment Demand for all segments downstream of the initial mainline segment as well as calculate the mainline SUT and TT % based on mainline/ONR/OFR percentages.

    - #### calHeavyVehAdj

          private void calHeavyVehAdj()

      Calculate heavy vehicle adjustment factors

    - #### calTotalRampDensity

          private void calTotalRampDensity()

      Calculate total ramp density

    - #### calDemand

          private void calDemand(int scen,
                                 int atdm)

      Calculate adjusted demand based on adjustment factors for one scenario
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)

    - #### calDemand_Mainline

          private void calDemand_Mainline(int scen,
                                          int atdm,
                                          int period)

      Calculate mainline demand
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - period index (start form 0)

    - #### funcDemandMainline

          private float funcDemandMainline(int period)

      Calculate mainline demand
      Parameters:
        `period` - period index (start form 0)
      Returns:
        mainline demand

    - #### calWeaving

          private void calWeaving(int period)

      Calculate weaving volume for one scenario one period
      Parameters:
        `period` - analysis period index (0 is the first period)

    - #### calFFS

          private void calFFS(int scen,
                              int atdm)

      Calculate adjusted free flow speed based on adjustment factors for one scenario
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)

    - #### calLane

          private void calLane(int scen,
                               int atdm)

      Calculate adjusted number of lanes based on adjustment factors for one scenario
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)

    - #### calType

          private void calType()

      Calculate processing segment type for one scenario

    - #### funcMaxShort

          private float funcMaxShort(int period)

      Calculate maximum short length for weaving segment in ft
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        maximum short length for weaving segment in ft

    - #### calCapacity

          private void calCapacity(int scen,
                                   int atdm)

      Calculate adjusted mainline and ramp capacities
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)

    - #### calCrossCAF

          private void calCrossCAF()

      Calculate cross weave CAF

    - #### funcBasicMainlineCapacity

          private float funcBasicMainlineCapacity(int scen,
                                                  int atdm,
                                                  int period)

      Calculate adjusted mainline capacity (vph) for basic segment
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        adjusted mainline capacity (vph) for basic segment

    - #### funcBasicIdealMainlineCapacityVPH

          private float funcBasicIdealMainlineCapacityVPH(int scen,
                                                          int atdm,
                                                          int period)

      Ideal (un-adjusted) capacity in vehicles per hour.
      Parameters:
        `scen` -
        `atdm` -
        `period` -
      Returns:

    - #### funcBasicIdealMainlineCapacityPC

          public float funcBasicIdealMainlineCapacityPC(int scen,
                                                        int atdm,
                                                        int period)

      Ideal (un-adjusted) capacity in passenger cars per hour per lane (for display purposes only).
      Parameters:
        `scen` -
        `atdm` -
        `period` -
      Returns:

    - #### funcBasicMainlineHCMIdealCapacity

          public float funcBasicMainlineHCMIdealCapacity(int period)

      HCM Ideal capacity (FFS based) in passenger cars per hour per lane (pcphpln)
      Parameters:
        `period` -
      Returns:

    - #### funcMLBasicMainlineCapacity

          private float funcMLBasicMainlineCapacity(int period)

      Calculate ML basic mainline capacity
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        ML basic mainline capacity

    - #### funcOnRampCapacity

          private float funcOnRampCapacity(int period)

      Calculate adjusted on ramp capacity (vph)
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        adjusted on ramp capacity (vph)

    - #### funcOffRampCapacity

          private float funcOffRampCapacity(int period)

      Calculate adjusted off ramp capacity (vph)
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        adjusted off ramp capacity (vph)

    - #### funcWeaveMainlineCapacity

          private float funcWeaveMainlineCapacity(int scen,
                                                  int atdm,
                                                  int period)

      Calculate adjusted mainline capacity (vph) for weaving segment
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        adjusted mainline capacity (vph) for weaving segment

    - #### funcAccessMainlineCapacity

          private float funcAccessMainlineCapacity(int scen,
                                                   int atdm,
                                                   int period)

      Calculate adjusted mainline capacity (vph) for access segment
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        adjusted mainline capacity (vph) for access segment

    - #### funcIdealCapacity

          private float funcIdealCapacity(float freeFlowSpeed)

      Calculate ideal mainline capacity (pc/h/ln) based on mainline free flow speed
      Parameters:
        `freeFlowSpeed` - mainline free flow speed (mph)
      Returns:
        ideal mainline capacity (pc/h/ln)

    - #### funcRampCapacity

          private float funcRampCapacity(int numOfRampLanes,
                                         float rampFreeFlowSpeed)

      Calculate ramp capacity (pc/h) based on ramp free flow speed and number of ramp lanes
      Parameters:
        `numOfRampLanes` - number of ramp lanes
        `rampFreeFlowSpeed` - ramp free flow speed
      Returns:
        ramp capacity (pc/h)

    - #### calDC

          private void calDC()

      Calculate demand over capacity ratio

    - #### runUndersaturated

          void runUndersaturated(int scen,
                                 int atdm,
                                 int period,
                                 int inOverMode)

      Run under saturated analysis for one scenario one period
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)

    - #### calSpeedAndDensity

          private void calSpeedAndDensity(int scen,
                                          int atdm,
                                          int period,
                                          int status)

      Calculate speed and density using under saturated method
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
        `status` - whether under saturated, over saturated, or background density calculation

    - #### funcMaxSpeed

          private float funcMaxSpeed(int period)

      Calculate maximum speed based on upstream speed
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        speed (mph)

    - #### funcBasicSpeed

          private float funcBasicSpeed(int status,
                                       int scen,
                                       int atdm,
                                       int period)

      Calculate speed for basic segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        speed (mph)

    - #### funcBasicDensity

          private float funcBasicDensity(int status,
                                         int scen,
                                         int atdm,
                                         int period)

      Calculate density for basic segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        density (unit depends on status, veh/mi/ln or veh/mi)

    - #### funcOnSpeed

          private float funcOnSpeed(int status,
                                    int period)

      Calculate speed for on ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        speed (mph)

    - #### funcOnFlowRateInLanes1and2

          private float funcOnFlowRateInLanes1and2(int status,
                                                   int period)

      Calculate on ramp flow rate in lane 1 and 2 using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        flow rate

    - #### funcOnRemainFactor

          private float funcOnRemainFactor(int status,
                                           int period)

      Calculate on ramp remain factor using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        remain factor

    - #### funcOnOff_vF

          private float funcOnOff_vF(int status,
                                     int period)

      Calculate v_F for on ramp or off ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        v_F

    - #### funcOn_vR

          private float funcOn_vR(int status,
                                  int period)

      Calculate v_R for on ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        v_R

    - #### funcOn_PFM_6Lane

          private float funcOn_PFM_6Lane(int status,
                                         int period,
                                         float v_F,
                                         float v_R)

      Calculate on-ramp P_FM for a 6 Lane (3 each direction) highway for the undersaturated method.
      Parameters:
        `status` - whether undersaturated, oversaturated, or background density calculation
        `period` - analysis period index (0 is the fist period)
        `v_F` - Total flow rate on freeway immediate upstream of teh on-ramp (merge) influence area (pc/h)
        `v_R` - total on-ramp flow (pc/h)
      Returns:

    - #### funcOnAllDensity

          private float funcOnAllDensity(int status,
                                         int period)

      Calculate overall density for on ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        overall density (unit depends on status, veh/mi/ln or veh/mi)

    - #### funcOnIADensity

          private float funcOnIADensity(int status,
                                        int period)

      Calculate influenced area density for on ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        influenced area density (pc/mi/ln)

    - #### funcOffSpeed

          private float funcOffSpeed(int status,
                                     int period)

      Calculate speed for off ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        speed (mph)

    - #### funcOffAllDensity

          private float funcOffAllDensity(int status,
                                          int period)

      Calculate overall density for off ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        overall density (unit depends on status, veh/mi/ln or veh/mi)

    - #### funcOffIADensity

          private float funcOffIADensity(int status,
                                         int period)

      Calculate influenced area density for off ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        influenced area density (pc/mi/ln)

    - #### funcOffFlowRateInLanes1and2

          private float funcOffFlowRateInLanes1and2(int status,
                                                    int period)

      Calculate off ramp flow rate in lane 1 and 2 using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        flow rate

    - #### funcOffRemainFactor

          private float funcOffRemainFactor(int status,
                                            int period)

      Calculate off ramp remain factor using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        remain factor

    - #### funcOff_vR

          private float funcOff_vR(int status,
                                   int period)

      Calculate v_R for off ramp segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `period` - analysis period index (0 is the first period)
      Returns:
        v_R

    - #### funcOff_PFD_6Lane

          private float funcOff_PFD_6Lane(int status,
                                          int period,
                                          float v_F,
                                          float v_R)

      Calculate off-ramp P_FD for a 6 Lane (3 each direction) highway for the undersaturated method.
      Parameters:
        `status` - whether undersaturated, oversaturated, or background density calculation
        `period` - analysis period index (0 is the fist period)
        `v_F` - Total flow rate on freeway immediate upstream of teh on-ramp (merge) influence area (pc/h)
        `v_R` - total off-ramp flow (pc/h)
      Returns:

    - #### funcWeaveSpeed

          private float funcWeaveSpeed(int status,
                                       int scen,
                                       int atdm,
                                       int period)

      Calculate speed for weaving segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        speed (mph)

    - #### funcWeaveDensity

          private float funcWeaveDensity(int status,
                                         int scen,
                                         int atdm,
                                         int period)

      Calculate density for weaving segment using under saturated method
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        density (unit depends on status, veh/mi/ln or veh/mi)

    - #### funcOverlapSpeed

          private float funcOverlapSpeed(int status,
                                         int scen,
                                         int atdm,
                                         int period)

      Calculate speed for overlapping segment
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        speed (mph)

    - #### funcOverlapDensity

          private float funcOverlapDensity(int status,
                                           int scen,
                                           int atdm,
                                           int period)

      Calculate density for overlapping segment
      Parameters:
        `status` - whether under saturated, over saturated, or background density calculation
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first period)
      Returns:
        density (unit depends on status, veh/mi/ln or veh/mi)

    - #### checkOverlap

          void checkOverlap(int period)

      Check adjacent upstream overlapping segment speed and density
      Parameters:
        `period` - analysis period index (0 is the first period)

    - #### runOversaturated

          void runOversaturated(int scen,
                                int atdm,
                                int period,
                                int step,
                                int inOverMode)

      Run analysis for over saturated cases
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)

    - #### resetOversaturated

          private void resetOversaturated(boolean isFirstTime)

      Reset over saturated data for a particular scenario
      Parameters:
        `isFirstTime` - whether it is first time enter over saturated method

    - #### funcED

          private float funcED(int period)

      Calculate ED for a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
      Returns:
        ED Expect Demand

    - #### funcKB

          private float funcKB(int scen,
                               int atdm,
                               int period)

      Calculate KB for a particular period in a particular scenario
      Parameters:
        `scen` - scenario index (0 is the default scenario, 1 is the first generated scenario)
        `atdm` - ATDM set index (start form 0)
        `period` - analysis period index (0 is the first analysis period)
      Returns:
        KB

    - #### funcWTT

          private int funcWTT(int period)

      Calculate WTT for a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
      Returns:
        WTT

    - #### checkMainlineQueueLength

          private void checkMainlineQueueLength(int period)

      Check whether mainline queue length is less or equal to segment length. If not, add extra to upstream segments
      Parameters:
        `period` - analysis period index (0 is the first analysis period)

    - #### funcMI

          private float funcMI(int period,
                               int step,
                               int inOverMode)

      Calculate MI for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        MI

    - #### funcDummyMF

          private float funcDummyMF(int period,
                                    int step,
                                    int inOverMode,
                                    boolean updateDenyEntry)

      Calculate Dummy MF (for first segment only) for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        Dummy MF

    - #### funcMO1

          private float funcMO1(int period,
                                int step)

      Calculate MO1 for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        MO1

    - #### funcKQ

          private float funcKQ(int period,
                               int step,
                               int inOverMode)

      Calculate KQ for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        KQ

    - #### funcMO2

          private float funcMO2(int period,
                                int step,
                                int inOverMode)

      Calculate MO2 for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        MO2

    - #### funcMO3

          private float funcMO3(int period,
                                int step,
                                int inOverMode)

      Calculate MO3 for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        MO3

    - #### isFrontClearQueue

          private boolean isFrontClearQueue(int period,
                                            int step)

      Check whether it is front clear queue for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        whether it is front clear queue

    - #### funcMF

          private float funcMF(int period,
                               int step)

      Calculate MF for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        MF

    - #### funcONRI

          private float funcONRI(int period,
                                 int step)

      Calculate ONRI for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        ONRI

    - #### funcONRO

          private float funcONRO(int scen,
                                 int atdm,
                                 int period,
                                 int step,
                                 int inOverMode)

      Calculate ONRO for a particular step in a particular period in a particular scenario
      Parameters:
        `scen` - scenario index
        `atdm` - ATDM index
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        ONRO

    - #### funcONRF

          private float funcONRF(int scen,
                                 int atdm,
                                 int period,
                                 int step,
                                 int inOverMode)

      Calculate ONRF for a particular step in a particular period in a particular scenario
      Parameters:
        `scen` - scenario index
        `atdm` - ATDM index
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        ONRF

    - #### funcDEF_new

          private float funcDEF_new(int period,
                                    int step,
                                    int inOverMode)

      Calculate DEF for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        DEF

    - #### funcDEF

          private float funcDEF(int period,
                                int step,
                                int inOverMode)

      Calculate DEF for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        DEF

    - #### funcOFRF

          private float funcOFRF(int period,
                                 int step)

      Calculate OFRF for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        OFRF

    - #### funcSF

          private float funcSF(int step)

      Calculate SF for a particular step in a particular period in a particular scenario
      Parameters:
        `step` - time step index (0 is the first step)
      Returns:
        SF

    - #### funcNV

          private float funcNV(int period,
                               int step,
                               int inOverMode)

      Calculate NV for a particular step in a particular period in a particular scenario
      Parameters:
        `period` - analysis period index (0 is the first analysis period)
        `step` - time step index (0 is the first step)
      Returns:
        NV

    - #### funcUV

          private float funcUV(int step)

      Calculate UV for a particular step in a particular period in a particular scenario
      Parameters:
        `step` - time step index (0 is the first step)
      Returns:
        UV

    - #### calExtendedResults

          void calExtendedResults()

      Extend output results based on output speed and density

    - #### funcDensityLOS

          java.lang.String funcDensityLOS(int period)

      Calculate density based level of service
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        density based level of service

    - #### funcDemandLOS

          java.lang.String funcDemandLOS(int period)

      Calculate demand based level of service
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        demand based level of service

    - #### getScenDC

          float getScenDC(int period)

      Getter for scenario DC
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        DC

    - #### getScenActualTime

          float getScenActualTime(int period)

      Getter for scenario ActualTime
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        ActualTime

    - #### getScenFFSTime

          float getScenFFSTime(int period)

      Getter for scenario FFSTime
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        FFSTime

    - #### getScenMainlineDelay

          float getScenMainlineDelay(int period)

      Getter for scenario MainlineDelay
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        MainlineDelay

    - #### getScenTTI

          float getScenTTI(int period)

      Getter for scenario TTI
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        TTI

    - #### getScenAllDensity_pc

          float getScenAllDensity_pc(int period)

      Getter for scenario AllDensity_pc
      Parameters:
        `period` - analysis period index (0 is the first period)
      Returns:
        AllDensity_pc

    - #### funcRampMetering

          private float funcRampMetering(int scen,
                                         int atdm,
                                         int period,
                                         int step,
                                         int inOverMode)

      Calculate ramp metering for a particular step
      Parameters:
        `scen` - scenario index
        `atdm` - ATDM index
        `period` - period index
        `step` - step index
        `inOverMode` - number of steps in over saturated mode
      Returns:
        ramp metering for a particular step

    - #### funcAdaptiveRampMeteringALINEA

          private float funcAdaptiveRampMeteringALINEA(int scen,
                                                       int atdm,
                                                       int period,
                                                       int step)

      Adjust ramp metering rate based on traffic conditions and ramp metering rate in the previous 15-sec step using ALINEA method.
      Parameters:
        `scen` - scenario index
        `atdm` - atdm index
        `period` - analysis period index
        `step` - step index
      Returns:
        adjusted ramp metering rate

    - #### funcAdaptiveRampMeteringFuzzy

          private float funcAdaptiveRampMeteringFuzzy(int scen,
                                                      int atdm,
                                                      int period,
                                                      int step,
                                                      int inOverMode)

      Adjust ramp metering rate based on traffic conditions and ramp metering rate in the previous 15-sec step using fuzzy method.
      Parameters:
        `scen` - scenario index
        `atdm` - atdm index
        `period` - analysis period index
        `step` - step index
        `inOverMode` - number of steps in over saturated mode
      Returns:
        adjusted ramp metering rate

    - #### RM_Fuzzy

          private float RM_Fuzzy(double DStream_SPD,
                                 double UStream_SPD,
                                 double DStream_density,
                                 double UStream_density,
                                 double ONR_Queue_Length,
                                 RampMeteringFuzzyData data)

      Calculate fuzzy logic adaptive ramp metering
      Parameters:
        `DStream_SPD` - Down stream segment speed (pc/mi/ln)
        `UStream_SPD` - Up stream segment speed (pc/mi/ln)
        `DStream_density` - Down stream segment density (pc/mi/ln)
        `UStream_density` - Up stream segment density (pc/mi/ln)
        `ONR_Queue_Length` - on ramp queue length, equals number of unserved vehicles in each time step
        `data` - parameters used for fuzzy logic adaptive ramp metering calculation
      Returns:
        adaptive ramp metering rate