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:
  • Field Details

    • BEGIN_RELEASE_OVERRIDE

      public static final String BEGIN_RELEASE_OVERRIDE
      The Constant BEGIN_RELEASE_OVERRIDE.
      See Also:
    • END_RELEASE_OVERRIDE

      public static final String END_RELEASE_OVERRIDE
      The Constant END_RELEASE_OVERRIDE.
      See Also:
    • UNDEFINED_OVERRIDE

      public static final int UNDEFINED_OVERRIDE
      The Constant UNDEFINED_OVERRIDE.
      See Also:
    • OUTLET_RELEASE

      public static final int OUTLET_RELEASE
      The Constant OUTLET_RELEASE.
      See Also:
    • RESERVOIR_ELEVATION

      public static final int RESERVOIR_ELEVATION
      The Constant RESERVOIR_ELEVATION.
      See Also:
    • GATE_OPENING

      public static final int GATE_OPENING
      The Constant GATE_OPENING.
      See Also:
    • CAPACITY

      public static final int CAPACITY
      The Constant CAPACITY.
      See Also:
    • STORAGE

      public static final int STORAGE
      The Constant STORAGE.
      See Also:
    • ELEV_STORAGE

      public static final int ELEV_STORAGE
      The Constant ELEV_STORAGE.
      See Also:
    • OUTLET_RELEASE_STR

      public static final String OUTLET_RELEASE_STR
      The Constant OUTLET_RELEASE_STR.
      See Also:
    • RESERVOIR_ELEVATION_STR

      public static final String RESERVOIR_ELEVATION_STR
      The Constant RESERVOIR_ELEVATION_STR.
      See Also:
    • GATE_OPENING_STR

      public static final String GATE_OPENING_STR
      The Constant GATE_OPENING_STR.
      See Also:
    • CAPACITY_STR

      public static final String CAPACITY_STR
      The Constant CAPACITY_STR.
      See Also:
    • STORAGE_STR

      public static final String STORAGE_STR
      The Constant STORAGE_STR.
      See Also:
    • ELEV_STORAGE_STR

      public static final String ELEV_STORAGE_STR
      The Constant ELEV_STORAGE_STR.
      See Also:
    • OUTLET_RELEASE_PARAMID

      public static final int OUTLET_RELEASE_PARAMID
      The Constant OUTLET_RELEASE_PARAMID.
    • RESERVOIR_ELEVATION_PARAMID

      public static final int RESERVOIR_ELEVATION_PARAMID
      The Constant RESERVOIR_ELEVATION_PARAMID.
    • GATE_OPENING_PARAMID

      public static final int GATE_OPENING_PARAMID
      The Constant GATE_OPENING_PARAMID.
    • CAPACITY_PARAMID

      public static final int CAPACITY_PARAMID
      The Constant CAPACITY_PARAMID.
      See Also:
    • STORAGE_PARAMID

      public static final int STORAGE_PARAMID
      The Constant STORAGE_PARAMID.
    • ELEV_STORAGE_PARAMID

      public static final int ELEV_STORAGE_PARAMID
      The Constant ELEV_STORAGE_PARAMID.
  • Constructor Details

    • ReleaseOverrides

      public ReleaseOverrides()
      Instantiates a new release overrides.
    • ReleaseOverrides

      public ReleaseOverrides(int startTime, int delt, int numsteps, String[] releases)
      Instantiates a new release overrides.
      Parameters:
      startTime - the start time
      delt - the delt
      numsteps - the numsteps
      releases - the releases
  • Method Details

    • setDssPathTable

      public void setDssPathTable(Hashtable rt)
      replace the hashtable of release time series records dss paths.
      Parameters:
      rt - the new dss path table
    • getDssPathTable

      public Hashtable 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 time
      delt - the delt
      numsteps - the numsteps
    • setReplaceAll

      public void setReplaceAll(boolean replace)
      Sets the replace all.
      Parameters:
      replace - the new replace all
    • setOverrideOutletsForThisReservoir

      public void setOverrideOutletsForThisReservoir(boolean set, String resName)
    • isOverrideOutletsForThisReservoir

      public boolean isOverrideOutletsForThisReservoir(String resName)
    • replaceAllWithOtherAlt

      public boolean replaceAllWithOtherAlt()
      Replace all with other alt.
      Returns:
      true, if successful
    • initReleases

      public void initReleases(String[] names)
      initializes the release table with entries matching the given strings.
      Parameters:
      names - the names
    • updateReleases

      public void updateReleases(String[] names, int type)
      Update releases.
      Parameters:
      names - the names
      type - the type
    • updateAltData

      public boolean updateAltData()
      Update alt data.
    • updateReleases

      public void updateReleases(String[] names)
      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

      public String[] getReleaseNames()
      returns a string array containing the names of all releases.
      Returns:
      the release names
    • getReleaseDssPath

      public String getReleaseDssPath(String name)
      get String DssPath for the specified release name.
      Parameters:
      name - the name
      Returns:
      the release dss path
    • useOtherAltResults

      public boolean useOtherAltResults(String name)
      Use other alt results.
      Parameters:
      name - the name
      Returns:
      true, if successful
    • setUseOtherAlt

      public void setUseOtherAlt(boolean set, String key)
      Set flag for the release overrides to use the other alt results.
      Parameters:
      set - use other alt results if true
      key - name the element key name
    • getUseOtherAltName

      public String getUseOtherAltName(String name)
      Gets the use other alt name.
      Parameters:
      name - the name
      Returns:
      the use other alt name
    • getUseOtherAltCollectionSequence

      public String getUseOtherAltCollectionSequence(String name)
      Gets use other alt collection sequence
      Parameters:
      name - the name
      Returns:
      the use other alt collection sequence
    • getReleaseValues

      public Hashtable getReleaseValues(String name)
      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

      public void setReleaseValues(String name, Hashtable ra)
      set the values for one release override.
      Parameters:
      name - the name
      ra - the ra
    • setReleaseValues

      public void setReleaseValues(String name, Hashtable ra, boolean useAlt, String selectedAltName, String collection)
      Sets the release values.
      Parameters:
      name - the name
      ra - the ra
      useAlt - the use alt
      selectedAltName - the selected alt name
    • clearUserOtherAltOverrides

      public void clearUserOtherAltOverrides()
      more clearing needs to be done here in the reservoirs.
    • setRun

      public void setRun(RssRun run)
      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

      public Object getFieldObject(Field fld)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful
    • outputReport

      public void outputReport(AlternativeInputReport report, org.jdom.Element elem)
      Description copied from interface: AltInputReportInfc
      Alternative Input Report Interface for data.
      Specified by:
      outputReport in interface AltInputReportInfc
    • outputReport

      public void outputReport(AlternativeInputReport report, org.jdom.Element elem, RssSystem system)