Package hec.clientapp.model
Class SimulationRun
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.clientapp.model.Manager
hec.clientapp.model.SimulationRun
- All Implemented Interfaces:
hec.event.ModifiableListener,AsciiSerializable,FieldAccessor,LockableObject,hec.map.MapObjectInterface,MessagePrinter,ModelConstants,TsRecordContainer,Serializable,Cloneable,Comparable,EventListener,Observer,mil.army.usace.hec.rmi.csinterface.CallBackInterface,rma.lang.Modifiable
- Direct Known Subclasses:
RssSimRun,SimulationTrialRun
public abstract class SimulationRun
extends Manager
implements AsciiSerializable, hec.map.MapObjectInterface, hec.event.ModifiableListener, ModelConstants
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionthis is the list of program (model) alternatives that this ForecastRun has.protected Stringprotected Hashtableprotected Vectorprotected Vectorstatic final Stringstatic final StringFields 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.model.ModelConstants
FDA_MODEL_NAME, FIA_MODEL_NAME, HFP_MODEL_NAME, MFP_MODEL_NAME, RAS_MODEL_NAME, RESPRM_MODEL_NAME, RSS_MODEL_NAME, SUPPLEMENTAL_MODEL_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptTrial(AltItem altItem, int pos, String newTrialKey, boolean propagate) voidbooleancheck to see if any of the managers used by this system is modified.intgetAltItems(String programName) return the list of AltItems that represent all alternatives for the given program.booleanlonghec.map.crs.CoordinateReferenceSystemReturns the coordinate reference system that describes the location of this map.hec.map.WorldRectsatisfy the MapObjectInterfacegetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.getIdForModelAlt(ModelAlt alt) return the ID for the ModelAltaltgetKey()hec.map.MapIdentifiersatisfy the MapObjectInterfacegetModelAlt(AltItem altItem) getModelAlt(String programName) returns the first model in the execution sequence for the programNameGets the name of the class used to group model alternatives.abstract StringGets the ModelAltWorkspaceName attribute of the SimulationRun object.intintgetModelNames(String modelName) return the list of keys (Q1B0R1) for the specified model (rss)protected ModelReferenceget the key (Q1) for the AltItemgetTrialKeys(int modelPos) abstract StringGets the TrialRunClassName attribute of the SimulationRun objectreturn the list of TrialRunsbooleanhasModelAlt(String program, int index) see if this SimulationRun contains a ModelAlt for Programprogramwith manager indexindexvoidinit()booleanbooleanbooleanvoidload()satisfy the MapObjectInterfaceprotected ManagerloadManager(String model, String cls, String name) voidmodifiedStateChanged(rma.lang.Modifiable mgr, boolean modified) protected voidnotifyModifiableListeners(ModelAlt alt, boolean modified) booleanreadFile(Identifier id) booleanreLoadFile(Identifier id) Called when the file gets modified so the manager always has the most current databooleanremoveTrial(SimulationTrialRun trial2Remove) remove the trial from this SimulationRunvoidvoidsetActiveRun(boolean b) voidsetAltList(Vector v) voidsetComputeInundation(boolean compute) voidsetConfigurationId(long configId) static voidsetDefaultModelAltClassName(String classname) voidsetDescription(String forecastDescription) Set the NamedType's description to the argument String.voidsetExpanded(boolean expanded) voidsetExtent(hec.map.WorldRect rect) satisfy the MapObjectInterfacebooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetMapIdentifier(hec.map.MapIdentifier mapId) satisfy the MapObjectInterfacebooleansetModelsLocked(int lockType) voidsetModified(boolean modified) Set the modified flag to true or false.voidSet the NamedTypes's name to the argument String.voidsetSelected(boolean b) voidsetSimulation(Simulation sim) voidsetUserName(String name) toString()voidunload()satisfy the MapObjectInterfacevoidcalled when the manager proxy is unloading the managerbooleanusesModeltAlt(ModelAlt malt) booleanwriteFile(Identifier id) Methods inherited from class hec.clientapp.model.Manager
addModifiableListener, backupFile, computeComplete, copyFile, deleteFile, deleting, finalize, getCallback, getCommonDataList, getDirectory, getDSSFileManager, getDSSFileManagerWrapper, getFileManager, getFilename, getGmtOffset, getIdentifier, getInputITSDataSet, getInputTSDataSet, getLastModifiedTime, getLastModifiedTimeString, getModTime, getModTime, getOutputITSDataSet, getOutputTSDataSet, getPath, getProxyList, getReadOnly, getRelativePath, getReloadOk, getSaveAsId, getSaveAsId, getUnitSystem, getUserInterface, getWorkspace, getWorkspacePath, 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, removeCallBack, removeModifiableListener, renamed, saveChildManagers, saveManager, saveManagerAs, saveManagerAs, setIdentifier, setLastModifiedTime, setLastModifiedTime, setLineAttributes, setLocked, setManagersModifiedTime, setModifiedFalse, setPath, setProgress, setProxyList, setReadOnly, setReloadOk, setUserInterface, setUserInterface, setWorkspace, writeLastModTimeMethods inherited from class hec.lang.NamedType
clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, rename, set, setIgnoreModifiedEvents, setIndex, 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.map.MapObjectInterface
getNameMethods inherited from interface rma.lang.Modifiable
isModified
-
Field Details
-
NO_SELECTION
- See Also:
-
FILE_EXT
- See Also:
-
_baseRunName
-
_altList
this is the list of program (model) alternatives that this ForecastRun has. The order in the list is the order that the program alts are executed, so don't mess with the order. -
_trialList
-
_trials
-
_modelForecastAltMgrs
-
-
Constructor Details
-
SimulationRun
public SimulationRun()Constructor for the SimulationRun object
-
-
Method Details
-
init
public void init() -
toString
-
getAlternativeNameLength
public int getAlternativeNameLength() -
getModelNameLength
public int getModelNameLength() -
getModelAltWorkspaceName
Gets the ModelAltWorkspaceName attribute of the SimulationRun object. This represents the model directory that will be used to store the simulation run.- Returns:
- The ModelAltWorkspaceName value
-
getModelAltClassName
Gets the name of the class used to group model alternatives. Must be overridden by base classes to remove the default model alt class name. The default class name is hec.watershed.model.ModelAlt. -
getRasModelForecastAlt
-
getRasModelReference
-
getTrialRunClassName
Gets the TrialRunClassName attribute of the SimulationRun object- Returns:
- returns the class name used to construct or identify the class to be used for trial runs. Allows different simulations to specify different trial classes. The class must subclass the object hec.clientapp.model.SimulationRun
- See Also:
-
setSimulation
-
getSimulation
-
acceptTrial
-
setName
Description copied from class:NamedTypeSet the NamedTypes's name to the argument String. -
setDescription
Description copied from class:NamedTypeSet the NamedType's description to the argument String.- Overrides:
setDescriptionin classNamedType
-
setConfigurationId
public void setConfigurationId(long configId) -
getConfigurationId
public long getConfigurationId() -
getTrials
return the list of TrialRuns -
setComputeInundation
public void setComputeInundation(boolean compute) -
getComputeInundation
public boolean getComputeInundation() -
getAltItems
return the list of AltItems that represent all alternatives for the given program. -
getModel
-
getModelAlt
returns the first model in the execution sequence for the programName -
usesModeltAlt
-
hasModelAlt
see if this SimulationRun contains a ModelAlt for Programprogramwith manager indexindex- Returns:
- true if this SimulationRun contains the ModelAlt
-
getIdForModelAlt
return the ID for the ModelAltalt -
getModelAlt
-
writeFile
-
reLoadFile
Called when the file gets modified so the manager always has the most current data- Overrides:
reLoadFilein classManager
-
readFile
-
getRunKey
get the key (Q1) for the AltItem- Parameters:
altItem-- Returns:
- the key or null
-
getModelNames
return the list of keys (Q1B0R1) for the specified model (rss) -
loadManager
-
setUserName
-
getUserName
-
getBaseRunName
-
setAltList
-
getAltList
-
getModelCount
public int getModelCount() -
setActiveRun
public void setActiveRun(boolean b) -
isActiveRun
public boolean isActiveRun() -
setSelected
public void setSelected(boolean b) -
isSelected
public boolean isSelected() -
getFileExtension
-
addTrial
-
removeTrial
remove the trial from this SimulationRun -
getTrialKeys
-
areManagersModified
public boolean areManagersModified()check to see if any of the managers used by this system is modified. -
saveManagers
public void saveManagers() -
setModelsLocked
- Throws:
LockFailedException
-
getKey
-
unloading
public void unloading()Description copied from class:Managercalled when the manager proxy is unloading the manager -
unload
public void unload()satisfy the MapObjectInterface- Specified by:
unloadin interfacehec.map.MapObjectInterface
-
getExtent
public hec.map.WorldRect getExtent()satisfy the MapObjectInterface- Specified by:
getExtentin interfacehec.map.MapObjectInterface- Returns:
- The Extent value
-
setExtent
public void setExtent(hec.map.WorldRect rect) satisfy the MapObjectInterface- Specified by:
setExtentin interfacehec.map.MapObjectInterface- Parameters:
rect- The new Extent value
-
getMapIdentifier
public hec.map.MapIdentifier getMapIdentifier()satisfy the MapObjectInterface- Specified by:
getMapIdentifierin interfacehec.map.MapObjectInterface- Returns:
- The MapIdentifier value
-
setMapIdentifier
public void setMapIdentifier(hec.map.MapIdentifier mapId) satisfy the MapObjectInterface- Specified by:
setMapIdentifierin interfacehec.map.MapObjectInterface- Parameters:
mapId- The new MapIdentifier value
-
load
public void load()satisfy the MapObjectInterface- Specified by:
loadin interfacehec.map.MapObjectInterface
-
getProgramOrder
-
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
-
modifiedStateChanged
public void modifiedStateChanged(rma.lang.Modifiable mgr, boolean modified) - Specified by:
modifiedStateChangedin interfacehec.event.ModifiableListener
-
notifyModifiableListeners
-
setExpanded
public void setExpanded(boolean expanded) -
isExpanded
public boolean isExpanded() -
getCoordinateReferenceSystem
public hec.map.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()Description copied from interface:hec.map.MapObjectInterfaceReturns the coordinate reference system that describes the location of this map. Users can return NULL if they don't have CoordinateReferenceSystem.- Specified by:
getCoordinateReferenceSystemin interfacehec.map.MapObjectInterface- Returns:
-
setDefaultModelAltClassName
-
setModified
public void setModified(boolean modified) Description copied from class:NamedTypeSet the modified flag to true or false.- Specified by:
setModifiedin interfacerma.lang.Modifiable- Overrides:
setModifiedin classManager
-