Package hec.rss.model
Class HotstartOptions
java.lang.Object
hec.rss.model.HotstartOptions
- All Implemented Interfaces:
AltInputReportInfc,Serializable,Cloneable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()clone the HotstartOptions Objectdoubleget the number of hours to save the timeseries dataget the name of the alternative to use when creating the Hotstart filename to load.get the date and time to save a Hotstart file atintget the time increment (i.e.intget the time step to save the Hotstart file at.booleanbooleanloadData(BufferedReader reader) load the data into the HotstartOptions from readervoidoutputReport(AlternativeInputReport report, org.jdom.Element elem) Alternative Input Report Interface for data.voidsetCreateHotstart(boolean createHotstart) set the flag indicating whether a Hotstart file(s) should be created the particular time/interval also needs to be set.voidsetDestDir(String destDir) voidsetEnabled(boolean enabled) voidsetHoursToSave(double hoursToSave) set the number of hours to save timeseries data backvoidsetIntervalDateTime(HecTime datetime) voidsetLoadAltName(String loadAltName) set the name of the alternative to use when creating the Hotstart filename to load.voidsetLoadHotstart(boolean loadHotstart) set the flag indicating whether a Hotstart file should be loaded at the start of the SimulationvoidsetSaveAtDateTime(boolean saveAtDateTime) set the flag indicating that a Hotstart file should be created at a particular date and time.voidsetSaveAtDateTime(HecTime saveAtDate) set the date and time to save a Hotstart file.voidsetSaveAtEndofSim(boolean saveAtEndofSim) set the flag indicating whether a Hotstart file should be created at the end of the Simulation.voidsetSaveAtInterval(boolean saveAtInterval) set the flag indicating whether a Hotstart file should be saved at an interval.voidsetSaveAtLookback(boolean saveIt) set the flag indicating whether a Hotstart file should be created at the end of the lookback period.voidsetTimeIncrement(int timeIncrement) set the time increment (i.e.voidsetTimeStep(int timeStep) set the time step to save the Hotstart file at.booleanget the flag indicating whether a Hotstart file(s) should be createdbooleanget the flag indicating whether a Hotstart file should be loaded at the start of the Simulationbooleanget the flag indicating that a Hotstart file should be created at a particular date and time.booleanflag indicating that a Hotstart file should be created at the end of the simulation.booleanget the flag indicating whether a Hotstart file should be saved at an interval.booleanget the flag indicating whether a Hotstart file should be created at the end of the lookback period.booleanwriteData(BufferedWriter writer) write the data for the HotstartOptions to the writer.
-
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 needshouldCreateHotstart()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 needshouldCreateHotstartto 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 needshouldCreateHotstartto 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 needshouldCreateHotstartto return true- Parameters:
saveAtInterval- true to save the file at an interval
-
setIntervalDateTime
- Parameters:
datetime-
-
getIntervalDateTime
-
getTimeStep
public int getTimeStep()get the time step to save the Hotstart file at. This method is used along withgetTimeIncrement()- 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 withsetTimeIncrement()- 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 withsetTimeStep(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 withsetTimeStep(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
-
setDestDir
-
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
get the name of the alternative to use when creating the Hotstart filename to load.- Returns:
- the name of the alternative.
-
setLoadAltName
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 needshouldCreateHotstart()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 needshouldCreateHotstart()to return true- Returns:
- true to save at a date and time
- See Also:
-
setSaveAtDateTime
set the date and time to save a Hotstart file.- Parameters:
saveAtDate- the date and time to save the file at- See Also:
-
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 needshouldCreateHotstart()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 needshouldCreateHotstart()to return true- Parameters:
saveIt- true to save at the end of the lookback period
-
writeData
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
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
clone the HotstartOptions Object -
outputReport
Description copied from interface:AltInputReportInfcAlternative Input Report Interface for data.- Specified by:
outputReportin interfaceAltInputReportInfc
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled)
-