coreEngine.atdm.DataStruct

## Class ATDMDatabase

- java.lang.Object
- - coreEngine.atdm.DataStruct.ATDMDatabase

- All Implemented Interfaces:
    java.io.Serializable

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

  Author:
    Lake Trask
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.ArrayList<ATDMPlan>` | `atdmPlans`
    `private java.util.ArrayList<ATDMStrategy>` | `demandStrat`
    `private java.util.ArrayList<ATDMStrategy>` | `hsrStrat`
    `private java.util.ArrayList<ATDMStrategy>` | `incidentStrat`
    `private java.util.ArrayList<ATDMStrategy>` | `rmStrat`
    `private static long` | `serialVersionUID`
    `private java.util.ArrayList<ATDMStrategy>` | `weatherStrat`
    `private java.util.ArrayList<ATDMStrategy>` | `workZoneStrat`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ATDMDatabase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPlan(ATDMPlan newPlan)`
    `void` | `addStrategy(java.lang.String categoryID, ATDMStrategy newStrategy)`
    `void` | `addStrategy(java.lang.String categoryID, ATDMStrategyMat newStrategy)`
    `int` | `getNumberOfATDMPlans()`
    `int` | `getNumberOfStrategies(java.lang.String categoryID)`
    `ATDMPlan` | `getPlan(int planIdx)`
    `ATDMPlan` | `getPlan(java.lang.String planName)`
    `java.util.ArrayList<ATDMStrategy>` | `getStrategy(java.lang.String categoryID)`
    `ATDMStrategy` | `getStrategy(java.lang.String categoryID, int stratIdx)`
    `private void` | `initATDMPlans()`
    `void` | `initDefaultDatabase()`
    `private void` | `initDemandDefaultStrategies()`
    `private void` | `initIncidentDefaultStrategies()`
    `private void` | `initWeatherDefaultStrategies()`
    `private void` | `initWorkZoneDefaultStrategies()`
    `void` | `removePlan(ATDMPlan atdmPlan)` Removes the specified ATDMPlan (pointers much match)
    `void` | `removePlan(int planIdx)` Removes the plan at index planIdx from the database
    `void` | `removeStrategy(java.lang.String categoryID, ATDMStrategy strategy)` Removes a strategy from the specified category/type.
    `void` | `removeStrategy(java.lang.String categoryID, int strategyIdx)` Removes the strategy at index strategyIdx from the given category/type (Demand, Weather, Incident, Workzone).
    `void` | `validateFacilitySpecificStrategies(Seed seed)` Prepares database for export to binary save file.

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

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

- - ### Field Detail

    - #### demandStrat

          private final java.util.ArrayList<ATDMStrategy> demandStrat

    - #### weatherStrat

          private final java.util.ArrayList<ATDMStrategy> weatherStrat

    - #### incidentStrat

          private final java.util.ArrayList<ATDMStrategy> incidentStrat

    - #### workZoneStrat

          private final java.util.ArrayList<ATDMStrategy> workZoneStrat

    - #### rmStrat

          private final java.util.ArrayList<ATDMStrategy> rmStrat

    - #### hsrStrat

          private final java.util.ArrayList<ATDMStrategy> hsrStrat

    - #### atdmPlans

          private final java.util.ArrayList<ATDMPlan> atdmPlans

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ATDMDatabase

          public ATDMDatabase()

  - ### Method Detail

    - #### initDefaultDatabase

          public void initDefaultDatabase()

    - #### initDemandDefaultStrategies

          private void initDemandDefaultStrategies()

    - #### initWeatherDefaultStrategies

          private void initWeatherDefaultStrategies()

    - #### initIncidentDefaultStrategies

          private void initIncidentDefaultStrategies()

    - #### initWorkZoneDefaultStrategies

          private void initWorkZoneDefaultStrategies()

    - #### initATDMPlans

          private void initATDMPlans()

    - #### addStrategy

          public void addStrategy(java.lang.String categoryID,
                                  ATDMStrategy newStrategy)

      Parameters:
        `categoryID` -
        `newStrategy` -

    - #### addStrategy

          public void addStrategy(java.lang.String categoryID,
                                  ATDMStrategyMat newStrategy)

      Parameters:
        `categoryID` -
        `newStrategy` -

    - #### addPlan

          public void addPlan(ATDMPlan newPlan)

      Parameters:
        `newPlan` -

    - #### getStrategy

          public java.util.ArrayList<ATDMStrategy> getStrategy(java.lang.String categoryID)

      Parameters:
        `categoryID` -
      Returns:

    - #### getStrategy

          public ATDMStrategy getStrategy(java.lang.String categoryID,
                                          int stratIdx)

      Parameters:
        `categoryID` -
        `stratIdx` -
      Returns:

    - #### getPlan

          public ATDMPlan getPlan(int planIdx)

      Parameters:
        `planIdx` -
      Returns:

    - #### getPlan

          public ATDMPlan getPlan(java.lang.String planName)

      Parameters:
        `planName` -
      Returns:

    - #### getNumberOfATDMPlans

          public int getNumberOfATDMPlans()

      Returns:

    - #### getNumberOfStrategies

          public int getNumberOfStrategies(java.lang.String categoryID)

      Parameters:
        `categoryID` -
      Returns:

    - #### removeStrategy

          public void removeStrategy(java.lang.String categoryID,
                                     int strategyIdx)

      Removes the strategy at index strategyIdx from the given category/type (Demand, Weather, Incident, Workzone).
      Parameters:
        `categoryID` -
        `strategyIdx` -

    - #### removeStrategy

          public void removeStrategy(java.lang.String categoryID,
                                     ATDMStrategy strategy)

      Removes a strategy from the specified category/type. Pointers must match.
      Parameters:
        `categoryID` -
        `strategy` -

    - #### removePlan

          public void removePlan(int planIdx)

      Removes the plan at index planIdx from the database
      Parameters:
        `planIdx` -

    - #### removePlan

          public void removePlan(ATDMPlan atdmPlan)

      Removes the specified ATDMPlan (pointers much match)
      Parameters:
        `atdmPlan` -

    - #### validateFacilitySpecificStrategies

          public void validateFacilitySpecificStrategies(Seed seed)

      Prepares database for export to binary save file. Removes ramp metering and hard shoulder running strategies.