Package hec.clientapp.model
Class AbstractSimulation
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.clientapp.model.Manager
hec.clientapp.model.ManagerProxyListManager
hec.clientapp.model.AbstractSimulation
- All Implemented Interfaces:
hec.clientapp.client.WkspCallBack,hec.clientapp.event.ManagerChangedListener,ManagerProxyListContainer,Simulation,AsciiSerializable,FieldAccessor,LockableObject,MessagePrinter,TsRecordContainer,Serializable,Cloneable,Comparable,EventListener,Observer,mil.army.usace.hec.rmi.csinterface.CallBackInterface,rma.lang.Modifiable
- Direct Known Subclasses:
SimulationPeriod
public abstract class AbstractSimulation
extends ManagerProxyListManager
implements AsciiSerializable, Simulation
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected Stringprotected Stringprotected Stringprotected mil.army.usace.hec.rmi.client.RMIProgressDisplayprotected Stringprotected Stringprotected intprotected intFields inherited from class hec.clientapp.model.ManagerProxyListManager
_childWorkspaces, _dataListContainer, _managerGroup, _managerRmiWorkspace, _managerVectorFields inherited from class hec.clientapp.model.Manager
_callBack, _dssFileManagerWrapper, _identifier, _lastModifiedTime, _modifiableListeners, _proxyList, _readOnly, _reloadFailed, _reloadOk, _uiWrapper, _userInterface, _wkspPath, _Workspace, LASTMODIFIED_STRINGFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTFields inherited from interface hec.clientapp.event.ManagerChangedListener
MANAGER_ADDED, MANAGER_DELETED, MANAGER_RENAMED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcomputeModel(ComputeInfo ci, String wkspName) compute a standard model, currently mfp, rss, fia.protected intgetAltCanceledComputeIndex(String altname, String model) given the alternative name and model get its last canceled compute timelonggetAltCanceledComputeTime(String altname, String model) get the alternative's last canceled compute time.protected intgetAltComputeIndex(String altname, String model) given the alternative name and model get its last successful computed timelonggetAltComputeTime(String altname, String model) get the alternative's last compute time.abstract String[]protected intgetAltFailedComputeIndex(String altname, String model) given the alternative name and model get its last failed compute timelonggetAltFailedComputeTime(String altname, String model) get the alternative's last failed compute time.booleanGets the EndDateString attribute of the Simulation objectgetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.Gets the LookbackDateString attribute of the Simulation objectabstract Stringabstract Stringreturn the full path to the output DSS fileabstract StringGets the StartDateString attribute of the Simulation objectintintget the TimeStep String.booleangetTimeWindow(HecTime start, HecTime end) Gets the TimeWindow attribute of the Simulation objectGets the TimeWindowString attribute of the Simulation objectprotected StringbooleanisLoaded()booleanCheck if the object has been modified.abstract voidloadWorkspace(String remoteRegistry, String baseDir) booleanreadFile(Identifier id) booleanremoveTrial(AltItem altItem, TrialReference trialRef2Remove) protected voidsetAltCanceledComputeTime(String altname, String model, long cTime) set the alternative's canceled compute timeprotected voidsetAltComputeTime(String altname, String model, long cTime) set the alternative compute timeprotected voidprotected voidsetAltFailedComputeTime(String altname, String model, long cTime) set the alternative's failed compute timevoidsetComputeAll(boolean b) voidsetComputeDisplay(mil.army.usace.hec.rmi.client.RMIProgressDisplay dlg) voidsetEndDate(String date) Sets the EndDate attribute of the Simulation objectbooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetLookbackDate(String date) Sets the LookbackDate attribute of the Simulation objectvoidsetStartDate(String date) Sets the StartDate attribute of the Simulation objectvoidsetTaskNumber(int i) voidsetTimestep(int ts) This sets the time step in hoursvoidsetTimeStep(int timeStep, int increment) Sets the time step and increment type it is.booleanwriteFile(Identifier id) Saves the Run data to the specified ASCII file.Methods inherited from class hec.clientapp.model.ManagerProxyListManager
closeWorkspace, dataChanged, deleteManager, getChildWorkspace, getCommonDataList, getDataListContainer, getGmtOffset, getManagerIdentifier, getManagerIDList, getManagerIDList, getManagerProxies, getManagerProxy, getManagerProxy, getManagerProxyList, getManagerProxyList, getManagerRmiWorkspace, getTitleName, getUnitSystem, getWorkspaceConfigFile, getWorkspaceName, getWorkspacePath, init, initCallBack, isNetworked, loadManagerByName, managerAdded, managerChanged, managerRemoved, managerRenamed, mapAdded, mapRemoved, newManager, newManager, openManager, openManager, openManager, openManager, openManager, openManagerByName, saveAllManagers, saveAllModifiedManagers, saveManager, saveManager, saveManagerAs, saveManagerAs, saveWorkspace, saveWorkspace, setCallback, setCallback, setManagerRmiWorkspace, unloading, unloadManager, userChangedMethods inherited from class hec.clientapp.model.Manager
addModifiableListener, backupFile, computeComplete, copyFile, deleteFile, deleting, finalize, getCallback, getDirectory, getDSSFileManager, getDSSFileManagerWrapper, getFileManager, getFilename, getIdentifier, getInputITSDataSet, getInputTSDataSet, getLastModifiedTime, getLastModifiedTimeString, getModTime, getModTime, getOutputITSDataSet, getOutputTSDataSet, getPath, getProxyList, getReadOnly, getRelativePath, getReloadOk, getSaveAsId, getSaveAsId, getUserInterface, getWorkspace, hasLock, isCanceled, isForecastManager, loadComplete, loadSaveAsFile, makeAbsolutePath, makeAbsolutePath, makeAbsolutePathFromWatershed, makeRelativePath, makeRelativePathFromWatershed, modifiyForSaveAs, newFile, newTSRecordProxy, newTSRecordProxy, notify, notifyModifiableListeners, openFile, printErrorMessage, printLogMessage, printMessage, printSeparator, printStatus, printTableRow, printWarningMessage, refreshData, reLoadChildManagers, reLoadFile, reLoadFile, removeCallBack, removeModifiableListener, renamed, saveChildManagers, saveManager, saveManagerAs, saveManagerAs, setIdentifier, setLastModifiedTime, setLastModifiedTime, setLineAttributes, setLocked, setManagersModifiedTime, setModified, setModifiedFalse, setPath, setProgress, setProxyList, setReadOnly, setReloadOk, setUserInterface, setUserInterface, setWorkspace, toString, writeLastModTimeMethods inherited from class hec.lang.NamedType
clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isValid, readResolve, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setName, setValid, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.clientapp.model.ManagerProxyListContainer
makeAbsolutePath, setModifiedMethods inherited from interface hec.clientapp.model.Simulation
acceptTrial, compute, createNewTrialRun, getDescription, getModelTrials, getName, getStreamAlignment, getTrialRunNames, getUnusedModelTrials, setModified
-
Field Details
-
_startTimeString
-
_endTimeString
-
_startDate
-
_endDate
-
_lookbackDate
-
_lookbackTime
-
_timeStep
protected int _timeStep -
_timeIncrement
protected int _timeIncrement -
_altComputeTimes
-
_altFailedComputeTimes
-
_altCanceledComputeTimes
-
_computeAll
protected transient boolean _computeAll -
_progressDisplay
protected transient mil.army.usace.hec.rmi.client.RMIProgressDisplay _progressDisplay
-
-
Constructor Details
-
AbstractSimulation
public AbstractSimulation() -
AbstractSimulation
-
-
Method Details
-
getOutputDSSFileName
-
getOutputDSSFilePath
return the full path to the output DSS file- Returns:
-
getStartDateString
Description copied from interface:SimulationGets the StartDateString attribute of the Simulation object- Specified by:
getStartDateStringin interfaceSimulation- Returns:
- The StartDateString value
-
setStartDate
Description copied from interface:SimulationSets the StartDate attribute of the Simulation object- Specified by:
setStartDatein interfaceSimulation- Parameters:
date- The new StartDate value
-
getEndDateString
Description copied from interface:SimulationGets the EndDateString attribute of the Simulation object- Specified by:
getEndDateStringin interfaceSimulation- Returns:
- The EndDateString value
-
setEndDate
Description copied from interface:SimulationSets the EndDate attribute of the Simulation object- Specified by:
setEndDatein interfaceSimulation- Parameters:
date- The new EndDate value
-
setAlternativesModified
protected void setAlternativesModified() -
getLookbackDateString
Description copied from interface:SimulationGets the LookbackDateString attribute of the Simulation object- Specified by:
getLookbackDateStringin interfaceSimulation- Returns:
- The LookbackDateString value
-
setLookbackDate
Description copied from interface:SimulationSets the LookbackDate attribute of the Simulation object- Specified by:
setLookbackDatein interfaceSimulation- Parameters:
date- The new LookbackDate value
-
setTimestep
public void setTimestep(int ts) This sets the time step in hours -
getTimeIncrementType
public int getTimeIncrementType() -
isModified
public boolean isModified()Description copied from class:NamedTypeCheck if the object has been modified.- Specified by:
isModifiedin interfaceManagerProxyListContainer- Specified by:
isModifiedin interfacerma.lang.Modifiable- Overrides:
isModifiedin classNamedType- Returns:
- true if the object has been modified
-
loadWorkspace
-
getAlternatives
-
isLoaded
public boolean isLoaded() -
setTimeStep
public void setTimeStep(int timeStep, int increment) Sets the time step and increment type it is. The increment is defined as HOURS, MINUTES, DAYS, as defined by HecTime- See Also:
-
getTimestep
public int getTimestep() -
getTimeStepString
get the TimeStep String. i.e.1HOUR,1DAY,30MINUTE- Returns:
- the TimeStep String
-
getRunTimeWindow
-
getTimeWindowString
Description copied from interface:SimulationGets the TimeWindowString attribute of the Simulation object- Specified by:
getTimeWindowStringin interfaceSimulation- Returns:
- The TimeWindowString value
-
getTimeWindow
Description copied from interface:SimulationGets the TimeWindow attribute of the Simulation object- Specified by:
getTimeWindowin interfaceSimulation- Parameters:
start- Description of Parameterend- Description of Parameter- Returns:
- The TimeWindow value
-
setComputeDisplay
public void setComputeDisplay(mil.army.usace.hec.rmi.client.RMIProgressDisplay dlg) -
setComputeAll
public void setComputeAll(boolean b) -
getComputeAll
public boolean getComputeAll() -
setAltFailedComputeTime
set the alternative's failed compute time -
setAltCanceledComputeTime
set the alternative's canceled compute time -
setAltComputeTime
set the alternative compute time -
getAltCanceledComputeIndex
given the alternative name and model get its last canceled compute time -
getAltFailedComputeIndex
given the alternative name and model get its last failed compute time -
getAltComputeIndex
given the alternative name and model get its last successful computed time -
getAltFailedComputeTime
get the alternative's last failed compute time. return 0 if the alternative doesn't have a last compute failed time. -
getAltCanceledComputeTime
get the alternative's last canceled compute time. return 0 if the alternative doesn't have a last compute failed time. -
getAltComputeTime
get the alternative's last compute time. return 0 if the alternative doesn't have a last compute time. -
writeFile
Saves the Run data to the specified ASCII file. If no path name is given, the method uses the current pathname of the Run.The file is written using type=param formatting. See the readData method for definition of types and parameters.
-
readFile
-
computeModel
compute a standard model, currently mfp, rss, fia. -
getUserDisplayUrl
-
getSimulationRuns
-
removeTrial
- Specified by:
removeTrialin interfaceSimulation
-
setTaskNumber
public void setTaskNumber(int i) -
getSimulationPath
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Overrides:
getFieldObjectin classManager- 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- Overrides:
setFieldObjectin classManager- 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
-