public class IndependentVariable extends java.lang.Object implements AsciiSerializable, java.lang.Cloneable, hec.rss.model.reports.AltInputReportInfc
Title: General CWMS Project
Description:
Copyright: Copyright (c) 2002
Company: RMA
| Modifier and Type | Field and Description |
|---|---|
static int |
DATE_TIME_TYPE
type for Date Time Independent Variable
|
static int |
DATE_TYPE
Type for Date Independent Variable
|
static int |
MODEL_VARIABLE_TYPE
type for Model Variable Independent Variable
|
static int |
STATE_VARIABLE_TYPE
type for State Variable Independent Variable
|
static int |
TIME_SERIES_TYPE
type for Time Series Independent Variable
|
static int |
TS_CURRENT_TYPE
type id for Current Value time series function
|
static java.lang.String[] |
TS_FUNCTION_STRINGS
/**
strings corresponding to Time Series Functions
|
static int |
TS_LAGGED_TYPE
type id for Lagged Value time series function
|
static int |
TS_PERAVG_TYPE
type id for Period Average time series function
|
static int |
TS_PERMAX_TYPE
type id for Period Maximum time series function
|
static int |
TS_PERMIN_TYPE
type id for Period Minimum time series function
|
static int |
TS_PREVIOUS_TYPE
type id for Previous Value time series function
|
static int |
TWO_VARIABLE_TYPE
type for State Variable Independent Variable
|
| Constructor and Description |
|---|
IndependentVariable()
Default constructor needed for Ascii Deserialization
|
IndependentVariable(int type)
Create a new IndependentVariable object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areTheSame(IndependentVariable iv)
Test if two IndependentVariable are essentially the same
|
java.lang.String |
buildFunctionOfString(DiversionRule rule)
Build a string for display showing type, location and other info
describing the rule.
|
java.lang.String |
buildFunctionOfString(ReleaseFuncOpRule rule) |
java.lang.String |
buildFunctionOfString(RssSystem network)
Build a string for display showing type, location and other info
describing the rule.
|
java.lang.String |
buildFunctionOfString(StorageZone zone)
Build a string for display showing type, location and other info
describing the rule.
|
java.lang.Object |
clone() |
double |
evaluateTSFunction(RunTimeStep rts)
Computes the value of the independent variable based on the Time Series
Function.
|
double |
evaluateTSFunction(RunTimeStep rts,
double[] tsarray)
Computes the value of the independent variable based on the Time Series
Function
2/12/2010 added logic to support negative lag (positive offset)
|
IndependentVariable |
getColVariable() |
java.lang.String |
getColVariableInterpType() |
double |
getDisplayOnlyTimeSeriesLag()
Gets the TimeSeries Lag with the - showing for display purposes.
|
void |
getElementDependencies(java.util.List<Element> elemList,
Element parentElem)
Add elements that this independent variable depends on for its calculation,
not including the element that holds this variable.
|
int |
getElementId()
Gets the Element of this object
Only valid if type is MODEL_VARIABLE_TYPE |
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
ModelVariable |
getModelVariable() |
int[] |
getModelVariableElementIds() |
int |
getModelVariableId()
Gets the ModelVariable value
Only valid if type is MODEL_VARIABLE_TYPE |
IndependentVariable |
getRowVariable() |
java.lang.String |
getRowVariableInterpType() |
int |
getStateVariableId() |
java.lang.String |
getStateVariableName() |
java.lang.String |
getTimeSeriesFunction()
Gets the TimeSeries Function
only valid if the type is
MODEL_VARIABLE_TYPE or TIME_SERIES_TYPE |
double |
getTimeSeriesLag()
Gets the TimeSeries Lag
only valid if the type is
MODEL_VARIABLE_TYPE or TIME_SERIES_TYPE |
java.lang.String |
getTimeSeriesName()
Gets the TimeSeries Name value
only valid if the type is
TIME_SERIES_TYPE |
double |
getTimeSeriesPeriod()
Gets the TimeSeries Period
only valid if the type is
MODEL_VARIABLE_TYPE or TIME_SERIES_TYPE |
java.lang.String |
getTSProxyName()
Gets the name if the TSRecordProxy
|
java.lang.String[] |
getTwoVariableColumnValues() |
java.lang.String |
getTwoVariableName() |
int |
getType()
Gets the Type of this object
one of:
DATE_TYPE
DATE_TIME_TYPE
MODEL_VARIABLE_TYPE
TIME_SERIES_TYPE |
static boolean |
initializeCompute(IndependentVariable iv,
RssSystem system,
RssTSLocationObject tsLocationObject)
Retrieves data for the _xvalArray of the IndependentVariable iv.
|
boolean |
initializeCompute(RssSystem system,
RssTSLocationObject tsLocationObject)
Retrieves data for the _xvalArray.
|
boolean |
isTSOptChecked() |
void |
outputReport(hec.rss.model.reports.AlternativeInputReport report,
org.jdom.Element elem)
Alternative Input Report Interface for data.
|
void |
setColVariableInterpType(java.lang.String colVarInterpType) |
boolean |
setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
This allows access to fields withing the implementing object to set there data.
|
void |
setModalVariableInfo(TSRecordProxy proxy,
Element elem,
ModelVariable mv)
Sets the ModalVariableInfo information for this object.
|
void |
setModelVariableString(java.lang.String s) |
void |
setRowVariableInterpType(java.lang.String rowVarInterpType) |
void |
setStateVariable(StateVariable st) |
void |
setTimeSeriesLag(double lag) |
void |
setTimeSeriesName(java.lang.String name)
Sets the TimeSeries Name for this object
|
void |
setTimeSeriesOptions(boolean usesTimeSeries)
Sets the TimeSeriesOptions attribute of the IndependentVariable object
|
void |
setTimeSeriesOptions(int function,
double lag,
double period)
Sets the TimeSeriesOptions attribute of the IndependentVariable object
|
void |
setTimeSeriesPeriod(double period) |
void |
setTwoVariableColumnValues(java.lang.String[] columnValues) |
void |
setTwoVariableRule(IndependentVariable rowVar,
IndependentVariable colVar) |
boolean |
timeSeriesOptionsAreTheSame(IndependentVariable iv)
Compare the time series options between two independent variables
|
java.lang.String |
toString() |
public static final int DATE_TYPE
public static final int DATE_TIME_TYPE
public static final int MODEL_VARIABLE_TYPE
public static final int TIME_SERIES_TYPE
public static final int STATE_VARIABLE_TYPE
public static final int TWO_VARIABLE_TYPE
public static final java.lang.String[] TS_FUNCTION_STRINGS
public static final int TS_CURRENT_TYPE
public static final int TS_PREVIOUS_TYPE
public static final int TS_LAGGED_TYPE
public static final int TS_PERAVG_TYPE
public static final int TS_PERMAX_TYPE
public static final int TS_PERMIN_TYPE
public IndependentVariable(int type)
type - the type of IndependentVariablepublic IndependentVariable()
public void getElementDependencies(java.util.List<Element> elemList, Element parentElem)
elemList - parentElem - public double evaluateTSFunction(RunTimeStep rts)
rts - RunTimeStep at which the independent variable is to be evaluatedtsarray - Time Series arrayinitializeCompute( RssSystem system, RssTSLocationObject tsLocationObject )public double evaluateTSFunction(RunTimeStep rts, double[] tsarray)
rts - RunTimeStep at which the independent variable is to be evaluatedtsarray - Time Series arraypublic boolean initializeCompute(RssSystem system, RssTSLocationObject tsLocationObject)
system - RssSystemtsLocationObject - RssTSLocationObject for possibly retrieving a
TIME_SERIES_TYPE datapublic static boolean initializeCompute(IndependentVariable iv, RssSystem system, RssTSLocationObject tsLocationObject)
iv - system - tsLocationObject - public java.lang.String getTSProxyName()
public int[] getModelVariableElementIds()
public void setModalVariableInfo(TSRecordProxy proxy, Element elem, ModelVariable mv)
elem - the Elementmv - the ModelVariablejava.lang.IllegalStateException - if the type isn't MODEL_VARIABLE_TYPEpublic void setTimeSeriesName(java.lang.String name)
name - The new TimeSeries Namejava.lang.IllegalStateException - if the type isn't TIME_SERIES_TYPEpublic void setTimeSeriesOptions(int function,
double lag,
double period)
function - the TimeSeriesOption Functionlag - the TimeSeries lagperiod - the TimeSeries periodjava.lang.IllegalStateException - if the type isn't TIME_SERIES_TYPE
or MODEL_VARIABLE_TYPEpublic void setTimeSeriesOptions(boolean usesTimeSeries)
function - the TimeSeriesOption Functionlag - the TimeSeries lagperiod - the TimeSeries periodjava.lang.IllegalStateException - if the type isn't TIME_SERIES_TYPE
or MODEL_VARIABLE_TYPEpublic java.lang.String getTimeSeriesName()
TIME_SERIES_TYPEpublic java.lang.String getTimeSeriesFunction()
MODEL_VARIABLE_TYPE or TIME_SERIES_TYPEpublic double getTimeSeriesLag()
MODEL_VARIABLE_TYPE or TIME_SERIES_TYPEpublic double getDisplayOnlyTimeSeriesLag()
MODEL_VARIABLE_TYPE or TIME_SERIES_TYPEpublic void setTimeSeriesLag(double lag)
public double getTimeSeriesPeriod()
MODEL_VARIABLE_TYPE or TIME_SERIES_TYPEpublic void setTimeSeriesPeriod(double period)
public int getType()
DATE_TYPE
DATE_TIME_TYPE
MODEL_VARIABLE_TYPE
TIME_SERIES_TYPEpublic int getElementId()
MODEL_VARIABLE_TYPEpublic int getModelVariableId()
MODEL_VARIABLE_TYPEpublic ModelVariable getModelVariable()
public int getStateVariableId()
public java.lang.String getStateVariableName()
public java.lang.String getTwoVariableName()
public void setStateVariable(StateVariable st)
public void setTwoVariableRule(IndependentVariable rowVar, IndependentVariable colVar)
public IndependentVariable getRowVariable()
public IndependentVariable getColVariable()
public boolean areTheSame(IndependentVariable iv)
public boolean timeSeriesOptionsAreTheSame(IndependentVariable iv)
iv - public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String buildFunctionOfString(ReleaseFuncOpRule rule)
public java.lang.String buildFunctionOfString(DiversionRule rule)
rule - public java.lang.String buildFunctionOfString(StorageZone zone)
rule - public java.lang.String buildFunctionOfString(RssSystem network)
RssSystem - networkpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setModelVariableString(java.lang.String s)
public java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorfld - The field to get.public boolean isTSOptChecked()
public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorfld - The java field object representing the member field to be setfobj - The data to set in that fieldpublic void setTwoVariableColumnValues(java.lang.String[] columnValues)
public java.lang.String[] getTwoVariableColumnValues()
public void setRowVariableInterpType(java.lang.String rowVarInterpType)
public void setColVariableInterpType(java.lang.String colVarInterpType)
public java.lang.String getRowVariableInterpType()
public java.lang.String getColVariableInterpType()
public void outputReport(hec.rss.model.reports.AlternativeInputReport report,
org.jdom.Element elem)
hec.rss.model.reports.AltInputReportInfcoutputReport in interface hec.rss.model.reports.AltInputReportInfc