public class WeatherData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
WeatherData.InvalidAdjustmentFactorTypeException |
class |
WeatherData.InvalidWeatherTypeException |
Modifier and Type | Field and Description |
---|---|
static int |
AF_TYPE_CAF |
static int |
AF_TYPE_DAF |
static int |
AF_TYPE_SAF |
private float[] |
averageDuration |
private float[] |
defaultCAF |
static int |
HeavyRain |
static int |
HeavySnow |
static int |
LightMediumSnow |
static int |
LightSnow |
static int |
LowVisibility |
static int |
MediumHeavySnow |
static int |
MediumRain |
static int |
MinimumVisibility |
private boolean[] |
monthActive |
private java.lang.String |
nearestMetroArea |
static int |
NormalWeather |
private int |
seedDefaultFFS |
static int |
SevereCold |
static int |
VeryLowVisibility |
private float[] |
weatherCAFs |
private float[] |
weatherDAFs |
private float[][] |
weatherProbability |
private float[] |
weatherSAFs |
Constructor and Description |
---|
WeatherData() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkNonNegative() |
void |
extractFromWeatherDB(java.lang.String metroAreaName,
CETime startTime,
CETime endTime) |
float |
getAdjustmentFactor(int factorType,
int weatherType)
Returns the adjustment factor of the specified type for the input weather
type/severity.
|
float[] |
getAdjustmentFactorArray(int factorType)
Returns the adjustment factor array of the specified type.
|
float |
getAverageDurationHours(int weatherType) |
float[] |
getAverageDurationMinutes() |
float |
getAverageDurationMinutes(int weatherType) |
float |
getAvgDurRoundedTo15MinIncrHour(int weatherType) |
int |
getAvgDurRoundedTo15MinIncrMinute(int weatherType) |
int |
getAvgDurRoundedTo15MinIncrNumIncr(int weatherType) |
boolean |
getMonthActive(int month) |
java.lang.String |
getNearestMetroArea() |
int |
getNumWeatherTypes() |
float[][] |
getProbability() |
float |
getProbability(int month,
int weatherType) |
float |
getProbabilityDecimal(int month,
int weatherType) |
float |
getWeatherCAF(int weatherType)
Returns the Capacity Adjustment Factor (CAF) for the specified weather
type/severity.
|
float[] |
getWeatherCAFArray()
Returns the array of Capacity Adjustment Factors (CAFs).
|
float |
getWeatherDAF(int weatherType)
Returns the Demand Adjustment Factor (DAF) for the specified weather
type/severity.
|
float[] |
getWeatherDAFArray()
Returns the array of Demand Adjustment Factors (DAFs).
|
float |
getWeatherSAF(int weatherType)
Returns the Speed Adjustment Factor (SAF) for the specified weather
type/severity.
|
float[] |
getWeatherSAFArray()
Returns the array of Speed Adjustment Factors (SAFs).
|
static java.lang.String |
getWeatherTypeAbbrev(int weatherType) |
static java.lang.String |
getWeatherTypeFull(int weatherType) |
void |
initializeBySeed(Seed seed) |
private void |
initializeFields() |
void |
setAdjustmentFactor(int adjFactorType,
int weatherType,
float value)
Sets the adjustment factor for the specified weather type.
|
void |
setAdjustmentFactors(int adjFactorType,
float[] values)
Sets the adjustment factor array for the specified adjustment factor
type.
|
private void |
setAdjustmentFactorsBySeed(Seed seed) |
void |
setAverageDurations(float[] seedDurations) |
private void |
setDefaultCAFs() |
private void |
setDefaultDAFs() |
private void |
setDefaultSAFs(int defaultFFS) |
void |
setMonthActive(int month,
boolean active) |
void |
setNearestMetroArea(java.lang.String location) |
void |
setProbability(float[][] seedWeatherProbabilities) |
void |
setSeedDefaultFFS(int seedDefaultFFS) |
void |
setValue(int month,
int weatherType,
float value) |
void |
setWeatherCAF(int weatherType,
float newCAF)
Sets the Capacity Adjustment Factor (CAF) for the specified weather
type/severity.
|
void |
setWeatherCAFArray(float[] newCAFArray)
Sets the array of Capacity Adjustment Factors (CAFs).
|
void |
setWeatherDAF(int weatherType,
float newDAF)
Sets the Demand Adjustment Factor (DAF) for the specified weather
type/severity.
|
void |
setWeatherDAFArray(float[] newDAFArray)
Sets the array of Demand Adjustment Factors (DAFs).
|
void |
setWeatherSAF(int weatherType,
float newSAF)
Sets the Speed Adjustment Factor (SAF) for the specified weather
type/severity.
|
void |
setWeatherSAFArray(float[] newSAFArray)
Sets the array of Speed Adjustment Factors (CAFs).
|
void |
updateNormalWeather() |
private void |
updateNormalWeather(int month) |
void |
useFacilitySpecific() |
void |
useSeedValues(Seed seed) |
public static final int MediumRain
public static final int HeavyRain
public static final int LightSnow
public static final int LightMediumSnow
public static final int MediumHeavySnow
public static final int HeavySnow
public static final int SevereCold
public static final int LowVisibility
public static final int VeryLowVisibility
public static final int MinimumVisibility
public static final int NormalWeather
public static final int AF_TYPE_CAF
public static final int AF_TYPE_DAF
public static final int AF_TYPE_SAF
private final float[][] weatherProbability
private final float[] averageDuration
private final float[] weatherCAFs
private final float[] weatherDAFs
private final float[] weatherSAFs
private final float[] defaultCAF
private int seedDefaultFFS
private final boolean[] monthActive
private java.lang.String nearestMetroArea
public void initializeBySeed(Seed seed)
public void useSeedValues(Seed seed)
public void useFacilitySpecific()
private void setAdjustmentFactorsBySeed(Seed seed)
public float getProbability(int month, int weatherType)
month
- weatherType
- public float[][] getProbability()
public float getProbabilityDecimal(int month, int weatherType)
month
- weatherType
- public float getAverageDurationMinutes(int weatherType)
weatherType
- public float[] getAverageDurationMinutes()
public float getAverageDurationHours(int weatherType)
weatherType
- public float getAvgDurRoundedTo15MinIncrHour(int weatherType)
weatherType
- public int getAvgDurRoundedTo15MinIncrMinute(int weatherType)
weatherType
- public int getAvgDurRoundedTo15MinIncrNumIncr(int weatherType)
weatherType
- public float getAdjustmentFactor(int factorType, int weatherType)
factorType
- Adjustment factor type identifier (AF_TYPE_CAF,
AF_TYPE_DAF, AF_TYPE_SAF).weatherType
- Weather type/severity identifier.public float[] getAdjustmentFactorArray(int factorType)
factorType
- Adjustment factor type identifier (AF_TYPE_CAF,
AF_TYPE_DAF, AF_TYPE_SAF).public float getWeatherCAF(int weatherType)
weatherType
- Weather event type (also called severity)public float[] getWeatherCAFArray()
public float getWeatherDAF(int weatherType)
weatherType
- Weather event type (also called severity)public float[] getWeatherDAFArray()
public float getWeatherSAF(int weatherType)
weatherType
- Weather event type (also called severity)public float[] getWeatherSAFArray()
public boolean getMonthActive(int month)
month
- public int getNumWeatherTypes()
public static java.lang.String getWeatherTypeAbbrev(int weatherType)
weatherType
- public static java.lang.String getWeatherTypeFull(int weatherType)
weatherType
- public java.lang.String getNearestMetroArea()
public void setSeedDefaultFFS(int seedDefaultFFS)
seedDefaultFFS
- public void setValue(int month, int weatherType, float value)
month
- weatherType
- value
- public void setProbability(float[][] seedWeatherProbabilities)
seedWeatherProbabilities
- public void setAdjustmentFactor(int adjFactorType, int weatherType, float value)
adjFactorType
- Adjustment factor type identifier (AF_TYPE_CAF,
AF_TYPE_DAF, AF_TYPE_SAF).weatherType
- Weather type/severity identifier/value
- New adjustment factor value.public void setAdjustmentFactors(int adjFactorType, float[] values)
adjFactorType
- Adjustment factor type identifier (AF_TYPE_CAF,
AF_TYPE_DAF, AF_TYPE_SAF).values
- New adjustment factor array.public void setWeatherCAF(int weatherType, float newCAF)
weatherType
- Weather event type (also called severity).newCAF
- New capacity adjustment factor for the weather
type/severity.public void setWeatherCAFArray(float[] newCAFArray)
newCAFArray
- public void setWeatherDAF(int weatherType, float newDAF)
weatherType
- Weather event type (also called severity).newDAF
- New demand adjustment factor for the weather type/severity.public void setWeatherDAFArray(float[] newDAFArray)
newDAFArray
- public void setWeatherSAF(int weatherType, float newSAF)
weatherType
- Weather event type (also called severity).newSAF
- New speed adjustment factor for the weather type/severity.public void setWeatherSAFArray(float[] newSAFArray)
newSAFArray
- public void setAverageDurations(float[] seedDurations)
seedDurations
- public void setMonthActive(int month, boolean active)
month
- active
- public void setNearestMetroArea(java.lang.String location)
location
- private void initializeFields()
private void updateNormalWeather(int month)
public void updateNormalWeather()
public void extractFromWeatherDB(java.lang.String metroAreaName, CETime startTime, CETime endTime)
metroAreaName
- startTime
- endTime
- private void setDefaultCAFs()
private void setDefaultSAFs(int defaultFFS)
private void setDefaultDAFs()
public boolean checkNonNegative()