public class ScenarioInfo
extends java.lang.Object
implements java.io.Serializable
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 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.
|
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
|
private static final long serialVersionUID
private Seed seed
public float prob
public int group
public java.lang.String name
private java.lang.String detail
public int month
public int day
public int statusRL
private java.lang.String demandPatternName
private float demandMultiplier
private final java.util.ArrayList<WeatherEvent> weatherEvents
private final java.util.ArrayList<IncidentEvent> incidentEvents_GP
private final java.util.ArrayList<IncidentEvent> incidentEvents_ML
private final java.util.ArrayList<WorkZone> workZones
public ScenarioInfo()
public ScenarioInfo(float prob)
prob
- Probability of a scenariopublic ScenarioInfo(float prob, int group)
prob
- Probability of a scenariogroup
- Group number of a scenariopublic ScenarioInfo(float prob, int group, java.lang.String name)
prob
- Probability of a scenariogroup
- Group number of a scenarioname
- Name of a scenariopublic java.lang.String getDetail()
public void addWorkZone(WorkZone workZone)
workZone
- public void addWorkZone(WorkZone workZone, int eventIndex)
workZone
- ScenarioEvent instance of the weather eventeventIndex
- Index at which the event is added to the event listpublic void addWeatherEvent(WeatherEvent wEvent)
wEvent
- ScenarioEvent instance of the weather eventpublic void addWeatherEvent(WeatherEvent wEvent, int eventIndex)
wEvent
- ScenarioEvent instance of the weather eventeventIndex
- Index at which the event is added to the event listpublic void addIncidentEventGP(IncidentEvent incEvent)
incEvent
- public void addIncidentEventGP(IncidentEvent incEvent, int eventIndex)
incEvent
- ScenarioEvent instance of the weather eventeventIndex
- Index at which the event is added to the event listpublic void addIncidentEventML(IncidentEvent incEvent)
public boolean hasWeatherEvent()
public boolean hasIncidentGP()
public boolean hasIncidentML()
public boolean hasWorkZone()
public boolean checkWeatherOverlap(WeatherEvent weatherEvent)
weatherEvent
- WeatherEvent instancepublic boolean checkGPIncidentOverlap(IncidentEvent incidentEvent)
incidentEvent
- IncidentEvent instancepublic boolean checkGPIncidentOverlap()
public boolean checkMLIncidentOverlap(IncidentEvent incidentEvent)
incidentEvent
- IncidentEvent instancepublic boolean checkMLIncidentOverlap()
public boolean checkWorkZoneOverlap(WorkZone workZone)
workZone
- WorkZoneData instancepublic void updateName()
public boolean checkIncidentHasAllowableLaneClosure(IncidentEvent newIncident)
newIncident
- public int[] getAvailableGPLanes(int segment, int startPeriod, int duration)
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.public int[] getAvailableMLLanes(int segment, int startPeriod, int duration)
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.public void setSeed(Seed seed)
seed
- public void setDemandPatternName(java.lang.String demandPatternName)
demandPatternName
- name of the demand patternpublic void setDemandMultiplier(float demandMultiplier)
demandMultiplier
- public int getNumberOfWeatherEvents()
public int getNumberOfGPIncidentEvents()
public int getNumberOfMLIncidentEvents()
public int getNumberOfWorkZones()
public java.util.ArrayList<WeatherEvent> getWeatherEventList()
public java.util.ArrayList<WorkZone> getWorkZoneEventList()
public java.util.ArrayList<IncidentEvent> getGPIncidentEventList()
public int getMonth()
public int getDayType()
public float getDemandMultiplier()
public java.lang.String getWorkZoneDetail()
public java.lang.String getWeatherDetail()
public java.lang.String getGPIncidentDetail()
public ATDMScenario generateATDMScenario(ATDMPlan atdmPlan)
atdmPlan
- ATDM plan to be applied to the reliability scenario.public ATDMScenario generateATDMScenarioML(ATDMPlan atdmPlan)
atdmPlan
- ATDM plan to be applied to the reliability scenario.public ATDMScenario[] applyAndGetATDMScenarios(ATDMDatabase atdmDatabase, int planIdx)
atdmDatabase
- planIdx
-