coreEngine.reliabilityAnalysis.DataStruct

## Class DemandData

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

-     public class DemandData
      extends java.lang.Object

  Author:
    Lake and tristan

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private boolean[]` | `activeDays` Array indicating which day types are active.
    `private boolean[]` | `activeMonths` Array indicating which months are active in the Reliability Reporting Period.
    `static java.lang.String` | `DEFAULT_AGENCY`
    `static java.lang.String` | `DEFAULT_NATIONAL`
    `private float[][]` | `demands` 2D Array holding demand multipliers for each demand combination (month - day of week).
    `private int` | `endDay` Ending day of the ending month of the Reliability Reporting Period.
    `private int` | `endMonth` Ending month of the Reliability Reporting Period.
    `private float[][]` | `i40DefaultValues`
    `static java.lang.String` | `NATIONAL_RURAL`
    `static java.lang.String` | `NATIONAL_URBAN`
    `private float[][]` | `ruralDefaultValues`
    `private Seed` | `seed` Seed instance for the Reliability Analysis.
    `private int` | `startDay` Starting day of the starting month Reliability Reporting Period.
    `private int` | `startMonth` Starting month of the Reliability Reporting Period.
    `private int` | `type` Type indicating whether the instance is associated with General Purpose (GP) demand or Managed Lane (ML) demand.
    `static int` | `TYPE_GP` Identifier for General Purpose (GP) type.
    `static int` | `TYPE_ML` Identifier for Managed Lane (ML) type.
    `private float[][]` | `urbanDefaultValues`
    `private int` | `year` Year of the Reliability Reporting Period.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DemandData(int type)` Constructor for empty DemandData instance.
    `DemandData(int year, int startMonth, int startDay, int endMonth, int endDay, int type)` Constructor specifying the Reliability Reporting Period.
    `DemandData(Seed seed, int type)` Constructor that pulls any existing demand data from the seed.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean[]` | `getActiveDays()`
    `int` | `getActiveDaysCount()` Returns the number of active days
    `boolean[]` | `getActiveMonths()`
    `boolean` | `getDayActive(int day)`
    `CEDate` | `getEndDate()` Returns a CEDate instance of the Reliability Reporting Period end date.
    `int` | `getEndDay()`
    `int` | `getEndMonth()`
    `float` | `getMaxValue()`
    `float` | `getMinValue()`
    `boolean` | `getMonthActive(int month)`
    `Seed` | `getSeed()` Returns the seed associated with the demand data instance
    `float` | `getSeedTotalVMT()`
    `float[][]` | `getSpecifiedDemand()`
    `CEDate` | `getStartDate()` Returns a CEDate instance of the Reliability Reporting Period start date.
    `int` | `getStartDay()`
    `int` | `getStartMonth()`
    `float` | `getValue(int month, int day)`
    `int` | `getYear()`
    `void` | `setDayActive(int day, boolean active)` Set whether a specified day is active for a reliability analysis.
    `void` | `setEndDay(int day)`
    `void` | `setEndMonth(int month)`
    `void` | `setMonthActive(int month, boolean active)`
    `void` | `setStartDay(int day)`
    `void` | `setStartMonth(int month)`
    `void` | `setValue(int month, int day, float val)`
    `void` | `setYear(int year)`
    `void` | `useAgencyDefault(java.lang.String type)`
    `void` | `useAllDays()`
    `void` | `useAllMonths()`
    `void` | `useFacilitySpecificDefaults()`
    `void` | `useI40Defaults()`
    `void` | `useRuralDefaults()`
    `void` | `useSeedValues()`
    `void` | `useUrbanDefaults()`
    `void` | `useWeekDays()`

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

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

- - ### Field Detail

    - #### demands

          private final float[][] demands

      2D Array holding demand multipliers for each demand combination (month - day of week).

    - #### activeDays

          private final boolean[] activeDays

      Array indicating which day types are active. 0 - Monday, 1 - Tuesday, 2 - Wednesday, 3 - Thursday, 4 - Friday, 5 - Saturday, 6 - Sunday

    - #### activeMonths

          private final boolean[] activeMonths

      Array indicating which months are active in the Reliability Reporting Period. 0 - January to 11 - December

    - #### year

          private int year

      Year of the Reliability Reporting Period.

    - #### startMonth

          private int startMonth

      Starting month of the Reliability Reporting Period.

    - #### startDay

          private int startDay

      Starting day of the starting month Reliability Reporting Period.

    - #### endMonth

          private int endMonth

      Ending month of the Reliability Reporting Period.

    - #### endDay

          private int endDay

      Ending day of the ending month of the Reliability Reporting Period.

    - #### seed

          private Seed seed

      Seed instance for the Reliability Analysis.

    - #### type

          private final int type

      Type indicating whether the instance is associated with General Purpose (GP) demand or Managed Lane (ML) demand.

    - #### TYPE_GP

          public static final int TYPE_GP

      Identifier for General Purpose (GP) type.
      See Also:
        Constant Field Values

    - #### TYPE_ML

          public static final int TYPE_ML

      Identifier for Managed Lane (ML) type.
      See Also:
        Constant Field Values

    - #### urbanDefaultValues

          private final float[][] urbanDefaultValues

    - #### ruralDefaultValues

          private final float[][] ruralDefaultValues

    - #### i40DefaultValues

          private final float[][] i40DefaultValues

    - #### DEFAULT_NATIONAL

          public static final java.lang.String DEFAULT_NATIONAL

      See Also:
        Constant Field Values

    - #### DEFAULT_AGENCY

          public static final java.lang.String DEFAULT_AGENCY

      See Also:
        Constant Field Values

    - #### NATIONAL_URBAN

          public static final java.lang.String NATIONAL_URBAN

      See Also:
        Constant Field Values

    - #### NATIONAL_RURAL

          public static final java.lang.String NATIONAL_RURAL

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DemandData

          public DemandData(int type)

      Constructor for empty DemandData instance. All months and all days of the week (day types) are active.
      Parameters:
        `type` - Indicates GP or ML type.

    - #### DemandData

          public DemandData(int year,
                            int startMonth,
                            int startDay,
                            int endMonth,
                            int endDay,
                            int type)

      Constructor specifying the Reliability Reporting Period. Only weekday day types (Mon - Fri) are active by default.
      Parameters:
        `year` -
        `startMonth` -
        `startDay` -
        `endMonth` -
        `endDay` -
        `type` -

    - #### DemandData

          public DemandData(Seed seed,
                            int type)

      Constructor that pulls any existing demand data from the seed.
      Parameters:
        `seed` -
        `type` - - Designates whether the object is for general purpose (GP) segments or for managed lane (ML) segments.

  - ### Method Detail

    - #### getYear

          public int getYear()

      Returns:

    - #### getStartMonth

          public int getStartMonth()

      Returns:

    - #### getStartDay

          public int getStartDay()

      Returns:

    - #### getStartDate

          public CEDate getStartDate()

      Returns a CEDate instance of the Reliability Reporting Period start date.
      Returns:
        Start date of the Reliability Reporting Period

    - #### getEndMonth

          public int getEndMonth()

      Returns:

    - #### getEndDay

          public int getEndDay()

      Returns:

    - #### getEndDate

          public CEDate getEndDate()

      Returns a CEDate instance of the Reliability Reporting Period end date.
      Returns:
        End date of the Reliability Reporting Period

    - #### getActiveDays

          public boolean[] getActiveDays()

      Returns:

    - #### getActiveDaysCount

          public int getActiveDaysCount()

      Returns the number of active days
      Returns:
        int numDaysActive

    - #### getActiveMonths

          public boolean[] getActiveMonths()

      Returns:

    - #### getDayActive

          public boolean getDayActive(int day)

      Parameters:
        `day` -
      Returns:

    - #### getMaxValue

          public float getMaxValue()

      Returns:

    - #### getMinValue

          public float getMinValue()

      Returns:

    - #### getMonthActive

          public boolean getMonthActive(int month)

      Parameters:
        `month` -
      Returns:

    - #### getValue

          public float getValue(int month,
                                int day)

      Parameters:
        `month` -
        `day` -
      Returns:

    - #### getSpecifiedDemand

          public float[][] getSpecifiedDemand()

      Returns:

    - #### getSeedTotalVMT

          public float getSeedTotalVMT()

      Returns:

    - #### getSeed

          public Seed getSeed()

      Returns the seed associated with the demand data instance
      Returns:
        seed

    - #### setStartMonth

          public void setStartMonth(int month)

      Parameters:
        `month` -

    - #### setStartDay

          public void setStartDay(int day)

      Parameters:
        `day` -

    - #### setEndMonth

          public void setEndMonth(int month)

      Parameters:
        `month` -

    - #### setEndDay

          public void setEndDay(int day)

      Parameters:
        `day` -

    - #### setYear

          public void setYear(int year)

      Parameters:
        `year` -

    - #### setDayActive

          public void setDayActive(int day,
                                   boolean active)

      Set whether a specified day is active for a reliability analysis. 0 - Monday, 1 - Tuesday, 2 - Wednesday, 3 - Thursday, 4 - Friday, 5 - Saturday, 6 - Sunday
      Parameters:
        `day` -
        `active` -

    - #### setMonthActive

          public void setMonthActive(int month,
                                     boolean active)

      Parameters:
        `month` -
        `active` -

    - #### setValue

          public void setValue(int month,
                               int day,
                               float val)

      Parameters:
        `month` -
        `day` -
        `val` -

    - #### useUrbanDefaults

          public void useUrbanDefaults()

    - #### useI40Defaults

          public void useI40Defaults()

    - #### useRuralDefaults

          public void useRuralDefaults()

    - #### useFacilitySpecificDefaults

          public void useFacilitySpecificDefaults()

    - #### useSeedValues

          public void useSeedValues()

    - #### useAllDays

          public final void useAllDays()

    - #### useWeekDays

          public final void useWeekDays()

    - #### useAllMonths

          public final void useAllMonths()

    - #### useAgencyDefault

          public void useAgencyDefault(java.lang.String type)