Package hec.rss.model
Class ReleaseOverrides
java.lang.Object
hec.rss.model.ReleaseOverrides
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,AltInputReportInfc,Serializable
public class ReleaseOverrides
extends Object
implements Serializable, AsciiSerializable, AltInputReportInfc
Note. ReleaseOverrides uses an inner class Overrides, which is presently
not AsciiSerializable.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassinner class which holds a hash table and modified flag. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe Constant BEGIN_RELEASE_OVERRIDE.static final intThe Constant CAPACITY.static final intThe Constant CAPACITY_PARAMID.static final StringThe Constant CAPACITY_STR.static final intThe Constant ELEV_STORAGE.static final intThe Constant ELEV_STORAGE_PARAMID.static final StringThe Constant ELEV_STORAGE_STR.static final StringThe Constant END_RELEASE_OVERRIDE.static final intThe Constant GATE_OPENING.static final intThe Constant GATE_OPENING_PARAMID.static final StringThe Constant GATE_OPENING_STR.static final intThe Constant OUTLET_RELEASE.static final intThe Constant OUTLET_RELEASE_PARAMID.static final StringThe Constant OUTLET_RELEASE_STR.static final intThe Constant RESERVOIR_ELEVATION.static final intThe Constant RESERVOIR_ELEVATION_PARAMID.static final StringThe Constant RESERVOIR_ELEVATION_STR.static final intThe Constant STORAGE.static final intThe Constant STORAGE_PARAMID.static final StringThe Constant STORAGE_STR.static final intThe Constant UNDEFINED_OVERRIDE. -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new release overrides.ReleaseOverrides(int startTime, int delt, int numsteps, String[] releases) Instantiates a new release overrides. -
Method Summary
Modifier and TypeMethodDescriptionvoidmore clearing needs to be done here in the reservoirs.intreturns the length of the release arrays.get the hashtable of release time series records dss paths.getFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.intget the number of time steps.intset the type of override (release, reservoir elevation, gate opening.static intgetParamedterId(int type) Gets the paramedter id.static intgetParameterId(int type) Gets the parameter id.getReleaseDssPath(String name) get String DssPath for the specified release name.String[]returns a string array containing the names of all releases.getReleaseValues(String name) get Hashtable of release values for the specified release name.intget the starting time - contains HecTime integer minutes.intget the time step.Gets use other alt collection sequencegetUseOtherAltName(String name) Gets the use other alt name.voidinitReleases(String[] names) initializes the release table with entries matching the given strings.booleanChecks if is modified.booleanisOverrideOutletsForThisReservoir(String resName) voidoutputReport(AlternativeInputReport report, org.jdom.Element elem) Alternative Input Report Interface for data.voidoutputReport(AlternativeInputReport report, org.jdom.Element elem, RssSystem system) booleanReplace all with other alt.voidreplace the hashtable of release time series records dss paths.booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetForceWrite(boolean b) Sets the force write.voidsetOverrideOutletsForThisReservoir(boolean set, String resName) voidsetOverridesType(int type) set the type of override (release, reservoir elevation, gate opening.voidsetReleaseTimes(int startTime, int delt, int numsteps) set release times - allocates date array and maintains any existing release arrays.voidsetReleaseValues(String name, Hashtable ra) set the values for one release override.voidsetReleaseValues(String name, Hashtable ra, boolean useAlt, String selectedAltName, String collection) Sets the release values.voidsetReplaceAll(boolean replace) Sets the replace all.voidSets the run.voidsetUseOtherAlt(boolean set, String key) Set flag for the release overrides to use the other alt results.voidWrite overrides to dss.booleanUpdate alt data.voidupdateReleases(String[] names) updates the release table with entries matching the given strings.voidupdateReleases(String[] names, int type) Update releases.booleanuseOtherAltResults(String name) Use other alt results.
-
Field Details
-
BEGIN_RELEASE_OVERRIDE
The Constant BEGIN_RELEASE_OVERRIDE.- See Also:
-
END_RELEASE_OVERRIDE
The Constant END_RELEASE_OVERRIDE.- See Also:
-
UNDEFINED_OVERRIDE
public static final int UNDEFINED_OVERRIDEThe Constant UNDEFINED_OVERRIDE.- See Also:
-
OUTLET_RELEASE
public static final int OUTLET_RELEASEThe Constant OUTLET_RELEASE.- See Also:
-
RESERVOIR_ELEVATION
public static final int RESERVOIR_ELEVATIONThe Constant RESERVOIR_ELEVATION.- See Also:
-
GATE_OPENING
public static final int GATE_OPENINGThe Constant GATE_OPENING.- See Also:
-
CAPACITY
public static final int CAPACITYThe Constant CAPACITY.- See Also:
-
STORAGE
public static final int STORAGEThe Constant STORAGE.- See Also:
-
ELEV_STORAGE
public static final int ELEV_STORAGEThe Constant ELEV_STORAGE.- See Also:
-
OUTLET_RELEASE_STR
The Constant OUTLET_RELEASE_STR.- See Also:
-
RESERVOIR_ELEVATION_STR
The Constant RESERVOIR_ELEVATION_STR.- See Also:
-
GATE_OPENING_STR
The Constant GATE_OPENING_STR.- See Also:
-
CAPACITY_STR
The Constant CAPACITY_STR.- See Also:
-
STORAGE_STR
The Constant STORAGE_STR.- See Also:
-
ELEV_STORAGE_STR
The Constant ELEV_STORAGE_STR.- See Also:
-
OUTLET_RELEASE_PARAMID
public static final int OUTLET_RELEASE_PARAMIDThe Constant OUTLET_RELEASE_PARAMID. -
RESERVOIR_ELEVATION_PARAMID
public static final int RESERVOIR_ELEVATION_PARAMIDThe Constant RESERVOIR_ELEVATION_PARAMID. -
GATE_OPENING_PARAMID
public static final int GATE_OPENING_PARAMIDThe Constant GATE_OPENING_PARAMID. -
CAPACITY_PARAMID
public static final int CAPACITY_PARAMIDThe Constant CAPACITY_PARAMID.- See Also:
-
STORAGE_PARAMID
public static final int STORAGE_PARAMIDThe Constant STORAGE_PARAMID. -
ELEV_STORAGE_PARAMID
public static final int ELEV_STORAGE_PARAMIDThe Constant ELEV_STORAGE_PARAMID.
-
-
Constructor Details
-
ReleaseOverrides
public ReleaseOverrides()Instantiates a new release overrides. -
ReleaseOverrides
Instantiates a new release overrides.- Parameters:
startTime- the start timedelt- the deltnumsteps- the numstepsreleases- the releases
-
-
Method Details
-
setDssPathTable
replace the hashtable of release time series records dss paths.- Parameters:
rt- the new dss path table
-
getDssPathTable
get the hashtable of release time series records dss paths.- Returns:
- the dss path table
-
setReleaseTimes
public void setReleaseTimes(int startTime, int delt, int numsteps) set release times - allocates date array and maintains any existing release arrays.- Parameters:
startTime- the start timedelt- the deltnumsteps- the numsteps
-
setReplaceAll
public void setReplaceAll(boolean replace) Sets the replace all.- Parameters:
replace- the new replace all
-
setOverrideOutletsForThisReservoir
-
isOverrideOutletsForThisReservoir
-
replaceAllWithOtherAlt
public boolean replaceAllWithOtherAlt()Replace all with other alt.- Returns:
- true, if successful
-
initReleases
initializes the release table with entries matching the given strings.- Parameters:
names- the names
-
updateReleases
Update releases.- Parameters:
names- the namestype- the type
-
updateAltData
public boolean updateAltData()Update alt data. -
updateReleases
updates the release table with entries matching the given strings.- Parameters:
names- the names
-
getArraySize
public int getArraySize()returns the length of the release arrays.- Returns:
- the array size
-
getStartTime
public int getStartTime()get the starting time - contains HecTime integer minutes.- Returns:
- the start time
-
getTimeStep
public int getTimeStep()get the time step.- Returns:
- the time step
-
getNumberOfSteps
public int getNumberOfSteps()get the number of time steps.- Returns:
- the number of steps
-
setOverridesType
public void setOverridesType(int type) set the type of override (release, reservoir elevation, gate opening.- Parameters:
type- the new overrides type
-
getOverridesType
public int getOverridesType()set the type of override (release, reservoir elevation, gate opening.- Returns:
- the overrides type
-
getParamedterId
public static int getParamedterId(int type) Gets the paramedter id.- Parameters:
type- the type- Returns:
- the paramedter id
-
getParameterId
public static int getParameterId(int type) Gets the parameter id.- Parameters:
type- the type- Returns:
- the parameter id
-
getReleaseNames
returns a string array containing the names of all releases.- Returns:
- the release names
-
getReleaseDssPath
get String DssPath for the specified release name.- Parameters:
name- the name- Returns:
- the release dss path
-
useOtherAltResults
Use other alt results.- Parameters:
name- the name- Returns:
- true, if successful
-
setUseOtherAlt
Set flag for the release overrides to use the other alt results.- Parameters:
set- use other alt results if truekey- name the element key name
-
getUseOtherAltName
Gets the use other alt name.- Parameters:
name- the name- Returns:
- the use other alt name
-
getUseOtherAltCollectionSequence
Gets use other alt collection sequence- Parameters:
name- the name- Returns:
- the use other alt collection sequence
-
getReleaseValues
get Hashtable of release values for the specified release name. Hashtable key is an Integer representing a HecTime in minutes for the value- Parameters:
name- the name- Returns:
- the release values
-
setReleaseValues
set the values for one release override.- Parameters:
name- the namera- the ra
-
setReleaseValues
public void setReleaseValues(String name, Hashtable ra, boolean useAlt, String selectedAltName, String collection) Sets the release values.- Parameters:
name- the namera- the rauseAlt- the use altselectedAltName- the selected alt name
-
clearUserOtherAltOverrides
public void clearUserOtherAltOverrides()more clearing needs to be done here in the reservoirs. -
setRun
Sets the run.- Parameters:
run- the new run
-
setForceWrite
public void setForceWrite(boolean b) Sets the force write.- Parameters:
b- the new force write
-
storeOverrides
public void storeOverrides()Write overrides to dss. Pull time and value data from hash table and put into a TimeSeriesContainer. -
isModified
public boolean isModified()Checks if is modified.- Returns:
- true, if is modified
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-
outputReport
Description copied from interface:AltInputReportInfcAlternative Input Report Interface for data.- Specified by:
outputReportin interfaceAltInputReportInfc
-
outputReport
-