Package hec.rss.model

Class HotstartOptions

java.lang.Object
hec.rss.model.HotstartOptions
All Implemented Interfaces:
AltInputReportInfc, Serializable, Cloneable

public class HotstartOptions extends Object implements Serializable, Cloneable, AltInputReportInfc
See Also:
  • Constructor Details

    • HotstartOptions

      public HotstartOptions()
  • Method Details

    • shouldCreateHotstart

      public boolean shouldCreateHotstart()
      get the flag indicating whether a Hotstart file(s) should be created
      Returns:
      true if a Hotstart file should be created.
    • setCreateHotstart

      public void setCreateHotstart(boolean createHotstart)
      set the flag indicating whether a Hotstart file(s) should be created the particular time/interval also needs to be set.
      Parameters:
      createHotstart - true to create a Hotstart file
    • shouldSaveAtEndofSim

      public boolean shouldSaveAtEndofSim()
      flag indicating that a Hotstart file should be created at the end of the simulation. Also need shouldCreateHotstart() to return true
      Returns:
      true if a Hotstart file should be created at the end of the sim.
    • setSaveAtEndofSim

      public void setSaveAtEndofSim(boolean saveAtEndofSim)
      set the flag indicating whether a Hotstart file should be created at the end of the Simulation. Also need shouldCreateHotstart to return true
      Parameters:
      saveAtEndofSim - true to save at the end of the simulation
    • shouldSaveAtInterval

      public boolean shouldSaveAtInterval()
      get the flag indicating whether a Hotstart file should be saved at an interval. Also need shouldCreateHotstart to return true
      Returns:
      true if the Hotstart file should saved at an interval
      See Also:
    • setSaveAtInterval

      public void setSaveAtInterval(boolean saveAtInterval)
      set the flag indicating whether a Hotstart file should be saved at an interval. Also need shouldCreateHotstart to return true
      Parameters:
      saveAtInterval - true to save the file at an interval
    • setIntervalDateTime

      public void setIntervalDateTime(HecTime datetime)
      Parameters:
      datetime -
    • getIntervalDateTime

      public HecTime getIntervalDateTime()
    • getTimeStep

      public int getTimeStep()
      get the time step to save the Hotstart file at. This method is used along with getTimeIncrement()
      Returns:
      the time step (i.e. 1)
      See Also:
    • setTimeStep

      public void setTimeStep(int timeStep)
      set the time step to save the Hotstart file at. This method is used along with setTimeIncrement()
      Parameters:
      timeStep - the time step
    • getTimeIncrement

      public int getTimeIncrement()
      get the time increment (i.e. HecTime.HOUR_INCREMENT) that the file should be save at. Used along with setTimeStep(int).
      to set the hotstart to be saved every hour use:

      setTimeStep(1);
      setTimeIncrement(HecTime.HOUR_INCREMENT);

      Returns:
      the time increment. One of:
      HecTime.SECOND_INCREMENT
      HecTime.MINUTE_INCREMENT
      HecTime.HOUR_INCREMENT
      HecTime.DAY_INCREMENT
    • setTimeIncrement

      public void setTimeIncrement(int timeIncrement)
      set the time increment (i.e. HecTime.HOUR_INCREMENT) that the file should be save at. Used along with setTimeStep(int).
      to set the hotstart to be save every hour use:

      setTimeStep(1);
      setTimeIncrement(HecTime.HOUR_INCREMENT);

      Parameters:
      timeIncrement - the time increment. One of:
      HecTime.SECOND_INCREMENT
      HecTime.MINUTE_INCREMENT
      HecTime.HOUR_INCREMENT
      HecTime.DAY_INCREMENT
    • getDestDir

      public String getDestDir()
    • setDestDir

      public void setDestDir(String destDir)
    • getHoursToSave

      public double getHoursToSave()
      get the number of hours to save the timeseries data
      Returns:
      the number of hours of timeseries data to save
    • setHoursToSave

      public void setHoursToSave(double hoursToSave)
      set the number of hours to save timeseries data back
      Parameters:
      hoursToSave - the number of hours to save timeseries data
    • shouldLoadHotstart

      public boolean shouldLoadHotstart()
      get the flag indicating whether a Hotstart file should be loaded at the start of the Simulation
      Returns:
      true to load a Hotstart file at the start of the simulation
      See Also:
    • setLoadHotstart

      public void setLoadHotstart(boolean loadHotstart)
      set the flag indicating whether a Hotstart file should be loaded at the start of the Simulation
      Parameters:
      loadHotstart - true to load the Hotstart file at the start of the simulation
      See Also:
    • getLoadAltName

      public String getLoadAltName()
      get the name of the alternative to use when creating the Hotstart filename to load.
      Returns:
      the name of the alternative.
    • setLoadAltName

      public void setLoadAltName(String loadAltName)
      set the name of the alternative to use when creating the Hotstart filename to load.
      Parameters:
      loadAltName - the name of the alternative
    • setSaveAtDateTime

      public void setSaveAtDateTime(boolean saveAtDateTime)
      set the flag indicating that a Hotstart file should be created at a particular date and time. Also need shouldCreateHotstart() to return true
      Parameters:
      saveAtDateTime - true to save at a date and time
      See Also:
    • shouldSaveAtDateTime

      public boolean shouldSaveAtDateTime()
      get the flag indicating that a Hotstart file should be created at a particular date and time. Also need shouldCreateHotstart() to return true
      Returns:
      true to save at a date and time
      See Also:
    • setSaveAtDateTime

      public void setSaveAtDateTime(HecTime saveAtDate)
      set the date and time to save a Hotstart file.
      Parameters:
      saveAtDate - the date and time to save the file at
      See Also:
    • getSaveAtDateTime

      public HecTime getSaveAtDateTime()
      get the date and time to save a Hotstart file at
      Returns:
      the date and time to save
      See Also:
    • shouldSaveAtLookback

      public boolean shouldSaveAtLookback()
      get the flag indicating whether a Hotstart file should be created at the end of the lookback period. Also need shouldCreateHotstart() to return true
      Returns:
      true to create a file at the end of the Lookback period
    • setSaveAtLookback

      public void setSaveAtLookback(boolean saveIt)
      set the flag indicating whether a Hotstart file should be created at the end of the lookback period. Also need shouldCreateHotstart() to return true
      Parameters:
      saveIt - true to save at the end of the lookback period
    • writeData

      public boolean writeData(BufferedWriter writer) throws IOException
      write the data for the HotstartOptions to the writer.
      Parameters:
      writer - the writer to save the data to
      Returns:
      true if the write was successful
      Throws:
      IOException - if there is an IO error
    • loadData

      public boolean loadData(BufferedReader reader) throws IOException
      load the data into the HotstartOptions from reader
      Parameters:
      reader - the BufferedReader to read the data from
      Returns:
      true if the read was successful
      Throws:
      IOException - if an IO error occurred
    • clone

      public HotstartOptions clone()
      clone the HotstartOptions Object
      Overrides:
      clone in class Object
      Returns:
      the cloned HotstartOptions
      See Also:
    • 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
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)