coreEngine.reliabilityAnalysis.DataStruct

## Class ScenarioInfo

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

- All Implemented Interfaces:
    java.io.Serializable

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

  This class contains information for each Reliability Analysis scenario. Should be 1-D array in Seed class only.
  Author:
    Shu Liu, Lake Trask
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `day` Day of week represented by the scenario.
    `private float` | `demandMultiplier` Demand Multiplier corresponding to the Scenario demand pattern.
    `private java.lang.String` | `demandPatternName` Name of demand pattern.
    `private java.lang.String` | `detail` Detail containing event summary of a scenario.
    `int` | `group` Group number of a scenario.
    `private java.util.ArrayList<IncidentEvent>` | `incidentEvents_GP` List of GP incident events
    `private java.util.ArrayList<IncidentEvent>` | `incidentEvents_ML` List of GP incident events
    `int` | `month` Month of the scenario.
    `java.lang.String` | `name` Name of the scenario.
    `float` | `prob` Probability of a scenario
    `private Seed` | `seed` Seed instance from which the scenarios have been created.
    `private static long` | `serialVersionUID`
    `int` | `statusRL` Input/Output status of a scenario.
    `private java.util.ArrayList<WeatherEvent>` | `weatherEvents` List of weather events
    `private java.util.ArrayList<WorkZone>` | `workZones` List of work zones.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScenarioInfo()` Constructor of ScenarioInfo class.
    `ScenarioInfo(float prob)` Constructor of ScenarioInfo class.
    `ScenarioInfo(float prob, int group)` Constructor of ScenarioInfo class.
    `ScenarioInfo(float prob, int group, java.lang.String name)` Constructor of ScenarioInfo class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addIncidentEventGP(IncidentEvent incEvent)` Add an incident event to a scenario.
    `void` | `addIncidentEventGP(IncidentEvent incEvent, int eventIndex)` Add an incident event to a scenario at a specific event index (DSS ONLY).
    `void` | `addIncidentEventML(IncidentEvent incEvent)`
    `void` | `addWeatherEvent(WeatherEvent wEvent)` Add a weather event to a scenario.
    `void` | `addWeatherEvent(WeatherEvent wEvent, int eventIndex)` Add a weather event to a scenario at a specific event index (DSS ONLY).
    `void` | `addWorkZone(WorkZone workZone)`
    `void` | `addWorkZone(WorkZone workZone, int eventIndex)` Add a work zone event to a scenario at a specific event index (DSS ONLY).
    `ATDMScenario[]` | `applyAndGetATDMScenarios(ATDMDatabase atdmDatabase, int planIdx)`
    `boolean` | `checkGPIncidentOverlap()` Checks to see if there are any overlaps in existing GP incidents assigned to the scenario.
    `boolean` | `checkGPIncidentOverlap(IncidentEvent incidentEvent)` Check whether a GP incident event overlaps any previously assigned incident event
    `boolean` | `checkIncidentHasAllowableLaneClosure(IncidentEvent newIncident)` Deprecated. Replaced by methods with IncidentEvent
    `boolean` | `checkMLIncidentOverlap()` Checks to see if there are any overlaps in existing ML incidents assigned to the scenario.
    `boolean` | `checkMLIncidentOverlap(IncidentEvent incidentEvent)` Check whether an ML incident event overlaps any previously assigned incident event
    `boolean` | `checkWeatherOverlap(WeatherEvent weatherEvent)` Check whether weather event overlap previously assigned weather event
    `boolean` | `checkWorkZoneOverlap(WorkZone workZone)` Check whether a work zone event overlaps any previously assigned work zone event.
    `ATDMScenario` | `generateATDMScenario(ATDMPlan atdmPlan)` Returns an ATDMScenario object that reflects the application of the strategies in the specified ATDM plan for GP segments.
    `ATDMScenario` | `generateATDMScenarioML(ATDMPlan atdmPlan)` Returns an ATDMScenario object that reflects the application of the strategies in the specified ATDM plan for ML segments.
    `int[]` | `getAvailableGPLanes(int segment, int startPeriod, int duration)` Returns an array of the number of lanes available in the input GP segment for the specified periods.
    `int[]` | `getAvailableMLLanes(int segment, int startPeriod, int duration)` Returns an array of the number of lanes available in the input ML segment for the specified periods.
    `int` | `getDayType()` Returns the day type (day of week) of the demand combination of the scenario.
    `float` | `getDemandMultiplier()`
    `java.lang.String` | `getDetail()`
    `java.lang.String` | `getGPIncidentDetail()`
    `java.util.ArrayList<IncidentEvent>` | `getGPIncidentEventList()` Getter for the list of incident events for the scenario.
    `int` | `getMonth()` Returns the month of the demand combination of the scenario.
    `int` | `getNumberOfGPIncidentEvents()` Getter for number of GP incident events
    `int` | `getNumberOfMLIncidentEvents()` Getter for number of ML incident events
    `int` | `getNumberOfWeatherEvents()` Getter for number of weather events
    `int` | `getNumberOfWorkZones()` Getter for number of work zones
    `java.lang.String` | `getWeatherDetail()`
    `java.util.ArrayList<WeatherEvent>` | `getWeatherEventList()` Getter for the list of weather events for the scenario.
    `java.lang.String` | `getWorkZoneDetail()`
    `java.util.ArrayList<WorkZone>` | `getWorkZoneEventList()` Getter for the list of work zone events for the scenario.
    `boolean` | `hasIncidentGP()` Whether this scenario has any GP incident events
    `boolean` | `hasIncidentML()` Whether this scenario has any ML incident events
    `boolean` | `hasWeatherEvent()` Whether this scenario has weather event
    `boolean` | `hasWorkZone()`
    `void` | `setDemandMultiplier(float demandMultiplier)`
    `void` | `setDemandPatternName(java.lang.String demandPatternName)` Setter for demand pattern name
    `void` | `setSeed(Seed seed)` Setter for seed
    `void` | `updateName()` Update scenario name

    - ### 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

      See Also:
        Constant Field Values

    - #### seed

          private Seed seed

      Seed instance from which the scenarios have been created.

    - #### prob

          public float prob

      Probability of a scenario

    - #### group

          public int group

      Group number of a scenario. Also the scenario index

    - #### name

          public java.lang.String name

      Name of the scenario.

    - #### detail

          private java.lang.String detail

      Detail containing event summary of a scenario.

    - #### month

          public int month

      Month of the scenario. (1 - Jan, 2 - Feb, etc.)

    - #### day

          public int day

      Day of week represented by the scenario. (0 - Mon, 1 - Tue, 2 - Wed, 3 - Thu, 4 - Fri, 5 - Sat, 6 - Sun)

    - #### statusRL

          public int statusRL

      Input/Output status of a scenario.

    - #### demandPatternName

          private java.lang.String demandPatternName

      Name of demand pattern. (i.e. Jan - Mon)

    - #### demandMultiplier

          private float demandMultiplier

      Demand Multiplier corresponding to the Scenario demand pattern.

    - #### weatherEvents

          private final java.util.ArrayList<WeatherEvent> weatherEvents

      List of weather events

    - #### incidentEvents_GP

          private final java.util.ArrayList<IncidentEvent> incidentEvents_GP

      List of GP incident events

    - #### incidentEvents_ML

          private final java.util.ArrayList<IncidentEvent> incidentEvents_ML

      List of GP incident events

    - #### workZones

          private final java.util.ArrayList<WorkZone> workZones

      List of work zones.

  - ### Constructor Detail

    - #### ScenarioInfo

          public ScenarioInfo()

      Constructor of ScenarioInfo class.

    - #### ScenarioInfo

          public ScenarioInfo(float prob)

      Constructor of ScenarioInfo class.
      Parameters:
        `prob` - Probability of a scenario

    - #### ScenarioInfo

          public ScenarioInfo(float prob,
                              int group)

      Constructor of ScenarioInfo class.
      Parameters:
        `prob` - Probability of a scenario
        `group` - Group number of a scenario

    - #### ScenarioInfo

          public ScenarioInfo(float prob,
                              int group,
                              java.lang.String name)

      Constructor of ScenarioInfo class.
      Parameters:
        `prob` - Probability of a scenario
        `group` - Group number of a scenario
        `name` - Name of a scenario

  - ### Method Detail

    - #### getDetail

          public java.lang.String getDetail()

    - #### addWorkZone

          public void addWorkZone(WorkZone workZone)

      Parameters:
        `workZone` -

    - #### addWorkZone

          public void addWorkZone(WorkZone workZone,
                                  int eventIndex)

      Add a work zone event to a scenario at a specific event index (DSS ONLY).
      Parameters:
        `workZone` - ScenarioEvent instance of the weather event
        `eventIndex` - Index at which the event is added to the event list

    - #### addWeatherEvent

          public void addWeatherEvent(WeatherEvent wEvent)

      Add a weather event to a scenario.
      Parameters:
        `wEvent` - ScenarioEvent instance of the weather event

    - #### addWeatherEvent

          public void addWeatherEvent(WeatherEvent wEvent,
                                      int eventIndex)

      Add a weather event to a scenario at a specific event index (DSS ONLY).
      Parameters:
        `wEvent` - ScenarioEvent instance of the weather event
        `eventIndex` - Index at which the event is added to the event list

    - #### addIncidentEventGP

          public void addIncidentEventGP(IncidentEvent incEvent)

      Add an incident event to a scenario.
      Parameters:
        `incEvent` -

    - #### addIncidentEventGP

          public void addIncidentEventGP(IncidentEvent incEvent,
                                         int eventIndex)

      Add an incident event to a scenario at a specific event index (DSS ONLY).
      Parameters:
        `incEvent` - ScenarioEvent instance of the weather event
        `eventIndex` - Index at which the event is added to the event list

    - #### addIncidentEventML

          public void addIncidentEventML(IncidentEvent incEvent)

    - #### hasWeatherEvent

          public boolean hasWeatherEvent()

      Whether this scenario has weather event
      Returns:
        Whether this scenario has weather event

    - #### hasIncidentGP

          public boolean hasIncidentGP()

      Whether this scenario has any GP incident events
      Returns:
        Whether this scenario has incident event

    - #### hasIncidentML

          public boolean hasIncidentML()

      Whether this scenario has any ML incident events
      Returns:
        Whether this scenario has incident event

    - #### hasWorkZone

          public boolean hasWorkZone()

      Returns:

    - #### checkWeatherOverlap

          public boolean checkWeatherOverlap(WeatherEvent weatherEvent)

      Check whether weather event overlap previously assigned weather event
      Parameters:
        `weatherEvent` - WeatherEvent instance
      Returns:
        boolean overlap: false if event does not overlap any previously assigned event, true otherwise.

    - #### checkGPIncidentOverlap

          public boolean checkGPIncidentOverlap(IncidentEvent incidentEvent)

      Check whether a GP incident event overlaps any previously assigned incident event
      Parameters:
        `incidentEvent` - IncidentEvent instance
      Returns:
        boolean overlap: false if event does not overlap any previously assigned event, true otherwise.

    - #### checkGPIncidentOverlap

          public boolean checkGPIncidentOverlap()

      Checks to see if there are any overlaps in existing GP incidents assigned to the scenario.
      Returns:
        True if there is overlap, false otherwise.

    - #### checkMLIncidentOverlap

          public boolean checkMLIncidentOverlap(IncidentEvent incidentEvent)

      Check whether an ML incident event overlaps any previously assigned incident event
      Parameters:
        `incidentEvent` - IncidentEvent instance
      Returns:
        boolean overlap: false if event does not overlap any previously assigned event, true otherwise.

    - #### checkMLIncidentOverlap

          public boolean checkMLIncidentOverlap()

      Checks to see if there are any overlaps in existing ML incidents assigned to the scenario.
      Returns:
        True if there is overlap, false otherwise.

    - #### checkWorkZoneOverlap

          public boolean checkWorkZoneOverlap(WorkZone workZone)

      Check whether a work zone event overlaps any previously assigned work zone event.
      Parameters:
        `workZone` - WorkZoneData instance
      Returns:

    - #### updateName

          public void updateName()

      Update scenario name

    - #### checkIncidentHasAllowableLaneClosure

          public boolean checkIncidentHasAllowableLaneClosure(IncidentEvent newIncident)

      Deprecated. Replaced by methods with IncidentEvent
      Checks if the incident is valid for the scenario. An incident is valid only if its severity (lane closure) is less than the number of open lanes in the segment for each period in the duration of the incident.
      Parameters:
        `newIncident` -
      Returns:
        True if the incident is valid, False otherwise

    - #### getAvailableGPLanes

          public int[] getAvailableGPLanes(int segment,
                                           int startPeriod,
                                           int duration)

      Returns an array of the number of lanes available in the input GP segment for the specified periods.
      Parameters:
        `segment` - Segment number in which to count lane availability.
        `startPeriod` - First period in which to count lane availability.
        `duration` - Duration for which to count lane availability.
      Returns:
        Array containing the number of lanes available in segment for the time period.

    - #### getAvailableMLLanes

          public int[] getAvailableMLLanes(int segment,
                                           int startPeriod,
                                           int duration)

      Returns an array of the number of lanes available in the input ML segment for the specified periods.
      Parameters:
        `segment` - Segment number in which to count lane availability.
        `startPeriod` - First period in which to count lane availability.
        `duration` - Duration for which to count lane availability.
      Returns:
        Array containing the number of lanes available in segment for the time period.

    - #### setSeed

          public void setSeed(Seed seed)

      Setter for seed
      Parameters:
        `seed` -

    - #### setDemandPatternName

          public void setDemandPatternName(java.lang.String demandPatternName)

      Setter for demand pattern name
      Parameters:
        `demandPatternName` - name of the demand pattern

    - #### setDemandMultiplier

          public void setDemandMultiplier(float demandMultiplier)

      Parameters:
        `demandMultiplier` -

    - #### getNumberOfWeatherEvents

          public int getNumberOfWeatherEvents()

      Getter for number of weather events
      Returns:
        number of weather events

    - #### getNumberOfGPIncidentEvents

          public int getNumberOfGPIncidentEvents()

      Getter for number of GP incident events
      Returns:
        number of incident events

    - #### getNumberOfMLIncidentEvents

          public int getNumberOfMLIncidentEvents()

      Getter for number of ML incident events
      Returns:
        number of incident events

    - #### getNumberOfWorkZones

          public int getNumberOfWorkZones()

      Getter for number of work zones
      Returns:
        number of incident events

    - #### getWeatherEventList

          public java.util.ArrayList<WeatherEvent> getWeatherEventList()

      Getter for the list of weather events for the scenario.
      Returns:
        List of WeatherEvent instances.

    - #### getWorkZoneEventList

          public java.util.ArrayList<WorkZone> getWorkZoneEventList()

      Getter for the list of work zone events for the scenario.
      Returns:

    - #### getGPIncidentEventList

          public java.util.ArrayList<IncidentEvent> getGPIncidentEventList()

      Getter for the list of incident events for the scenario.
      Returns:
        List of IncidentEvent instances.

    - #### getMonth

          public int getMonth()

      Returns the month of the demand combination of the scenario. Indexing starts at 0;
      Returns:

    - #### getDayType

          public int getDayType()

      Returns the day type (day of week) of the demand combination of the scenario. 0 - Monday, 1 - Tuesday, 2 - Wednesday, 3 - Thursday, 4 - Friday, 5 - Saturday, 6 - Sunday.
      Returns:

    - #### getDemandMultiplier

          public float getDemandMultiplier()

      Returns:

    - #### getWorkZoneDetail

          public java.lang.String getWorkZoneDetail()

      Returns:

    - #### getWeatherDetail

          public java.lang.String getWeatherDetail()

      Returns:

    - #### getGPIncidentDetail

          public java.lang.String getGPIncidentDetail()

      Returns:

    - #### generateATDMScenario

          public ATDMScenario generateATDMScenario(ATDMPlan atdmPlan)

      Returns an ATDMScenario object that reflects the application of the strategies in the specified ATDM plan for GP segments.
      Parameters:
        `atdmPlan` - ATDM plan to be applied to the reliability scenario.
      Returns:
        ATDMScenario instance with the ATDM plan strategies applied.

    - #### generateATDMScenarioML

          public ATDMScenario generateATDMScenarioML(ATDMPlan atdmPlan)

      Returns an ATDMScenario object that reflects the application of the strategies in the specified ATDM plan for ML segments.
      Parameters:
        `atdmPlan` - ATDM plan to be applied to the reliability scenario.
      Returns:
        ATDMScenario instance with the ATDM plan strategies applied.

    - #### applyAndGetATDMScenarios

          public ATDMScenario[] applyAndGetATDMScenarios(ATDMDatabase atdmDatabase,
                                                         int planIdx)

      Parameters:
        `atdmDatabase` -
        `planIdx` -
      Returns: