public class SimulationPeriod extends AbstractSimulation implements Simulation
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_KEY_LENGTH |
static java.lang.String |
FILE_EXT
Description of the Field
|
static int |
MAX_ALTERNATIVE_NAME_LENGTH |
static java.lang.String |
SIMULATION_DSS_FILE_NAME |
LASTMODIFIED_STRING_description, _index, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT| Constructor and Description |
|---|
SimulationPeriod()
Constructor for the SimulationPeriod object
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptTrial(SimulationRun run,
AltItem altItem,
int modelPos,
java.lang.String trialKey)
Description of the Method
|
boolean |
addModelTrial(java.lang.String program,
java.lang.String id,
int num)
add a new Model Trial to the list.
|
boolean |
compute()
Description of the Method
|
boolean |
computeInit() |
boolean |
computeRun(SimulationRun run,
int lastModel)
compute the ForecastRun run throught model position lastModel.
|
java.lang.String |
createBaseTrialName(java.lang.String name)
Creates the base trial name.
|
TrialRun |
createNewTrialRun(java.lang.String newTrialName,
java.lang.String userName,
java.lang.String trialKey,
SimulationRun parent,
TrialRun baseTrial,
int modelPosition) |
void |
deleting()
called when the Simulation is being deleted, deletes the Simulation directory.
|
Identifier |
findManagerID(java.util.Vector idlist,
java.lang.String idname) |
SimRunInfo[] |
getAlternativeInfo() |
java.lang.String[] |
getAlternatives()
return an array of the Alternatives (SimulationRuns) names
|
SimulationRun |
getCurrentComputingRun()
get the SimulationRun currently being computed.
|
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
Gets the FieldObject attribute of the SimulationPeriod object
|
int |
getKeyLength() |
long |
getLastComputeTime(int index) |
java.lang.String |
getLastComputeTimeString(int index) |
int |
getMaxAlternativeNameLength() |
java.util.Vector |
getModelTrials(java.lang.String program,
java.lang.String id) |
java.lang.String |
getOutputDSSFileName()
Returns only the name of the simulation dss file
|
java.lang.String |
getOutputDSSFilePath()
Returns full path to simulation dss file
|
java.lang.String |
getReferenceResultsPath()
returns the absolute path to where the simulation reference results are
stored
|
java.lang.String |
getSimulationAppType() |
SimulationExtract |
getSimulationExtract(ManagerProxyListContainer wksp) |
java.lang.String |
getSimulationPath()
Returns an absolute path to where the simulation data is stored
|
SimulationRun |
getSimulationRun(java.lang.String simRunName) |
java.lang.String |
getSimulationRunClass() |
java.util.Vector |
getSimulationRuns()
return the list of SimulationRuns
|
StreamAlignment |
getStreamAlignment()
Gets the StreamAlignment attribute of the SimulationPeriod object
|
TrialRun |
getTrialRun(java.lang.String trialName) |
java.util.Vector |
getTrialRunNames()
returns a Vector of the names of the SimulationTrialRuns that this SimulationPeriod holds
|
java.util.Vector |
getTrialRuns()
return a Vector of TrialRuns that this Simulation holds
|
java.util.Vector |
getUnusedModelTrials(java.lang.String program,
java.lang.String id)
return a list of Model trials that have been created but aren't
currently in use.
|
java.lang.String |
getWorkspacePath()
return the path to the workspace.
|
boolean |
isLoaded() |
void |
loadWorkspace(java.lang.String remoteRegistry,
java.lang.String baseDir)
Load the Simulations specific RmiWorkspace
|
void |
reloadManagers() |
boolean |
removeTrial(AltItem altItem,
TrialReference trialRef2Remove) |
boolean |
runExtract(SimulationExtract extract) |
boolean |
saveStreamAlignment() |
void |
setAlternatives(java.lang.String[] alts)
Sets the Alternatives attribute of the SimulationPeriod object.
|
boolean |
setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
This is part of the ascii serializer interaface.
|
void |
setKeyLength(int length) |
void |
setLastComputeTime(int index,
long computeTime) |
void |
setMaxAlternativeNameLength(int length) |
void |
setOutputDSSFileName(java.lang.String fileName)
set the Simulation DSS output filename
|
void |
setSimulationAppType(java.lang.String appType)
Sets the application type that is running the simulation.
|
void |
setSimulationRunClass(java.lang.String className)
Sets the name of the class the will perform the simulation run.
|
void |
setSimulationTypeString(java.lang.String simType)
Set the name type (default is "Simulation") of the string printed to
compute log, etc.
|
java.lang.String |
toString() |
void |
unloading()
called when Manager is being unloaded.
|
void |
writeTrials() |
getAltComputeTime, getComputeAll, getEndDateString, getLookbackDateString, getRunTimeWindow, getStartDateString, getTimeIncrementType, getTimestep, getTimeStepString, getTimeWindow, getTimeWindowString, isModified, readFile, setComputeAll, setComputeDisplay, setEndDate, setLookbackDate, setStartDate, setTaskNumber, setTimestep, setTimeStep, writeFiledataChanged, getChildWorkspace, getCommonDataList, getDataListContainer, getGmtOffset, getManagerIdentifier, getManagerIDList, getManagerIDList, getManagerProxy, getManagerProxy, getManagerProxyList, getManagerProxyList, getManagerRmiWorkspace, getTitleName, getUnitSystem, getWorkspaceConfigFile, getWorkspaceName, init, isNetworked, loadManagerByName, managerChanged, mapAdded, mapRemoved, newManager, newManager, openManager, openManager, openManager, openManager, openManager, openManagerByName, saveAllManagers, saveAllModifiedManagers, saveManager, saveManager, saveManagerAs, saveManagerAs, saveWorkspace, saveWorkspace, setManagerRmiWorkspace, unloadManager, userChangedaddModifiableListener, backupFile, copyFile, deleteFile, finalize, getCallback, getDirectory, getDSSFileManager, getDSSFileManagerWrapper, getFileManager, getFilename, getIdentifier, getInputITSDataSet, getInputTSDataSet, getLastModifiedTime, getLastModifiedTimeString, getOutputITSDataSet, getOutputTSDataSet, getPath, getProxyList, getReadOnly, getRelativePath, getReloadOk, getUserInterface, getWorkspace, hasLock, isCanceled, isForecastManager, loadComplete, loadSaveAsFile, makeAbsolutePath, makeAbsolutePath, makeAbsolutePathFromWatershed, makeRelativePath, makeRelativePathFromWatershed, modifiyForSaveAs, newFile, newTSRecordProxy, newTSRecordProxy, notify, openFile, printErrorMessage, printLogMessage, printMessage, printSeparator, printStatus, printTableRow, printWarningMessage, refreshData, reLoadChildManagers, reLoadFile, reLoadFile, removeCallBack, removeModifiableListener, renamed, saveChildManagers, saveManager, saveManagerAs, saveManagerAs, setIdentifier, setLastModifiedTime, setLastModifiedTime, setLineAttributes, setLocked, setModified, setModifiedFalse, setPath, setProgress, setProxyList, setReadOnly, setReloadOk, setUserInterface, setUserInterface, setWorkspaceclone, compareTo, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isValid, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setName, setValid, update, useRecursiveModifiedTestaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObserversequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getEndDateString, getLookbackDateString, getName, getStartDateString, getTimeWindow, getTimeWindowString, setEndDate, setLookbackDate, setModified, setStartDatemakeAbsolutePath, setModifiedpublic static final int MAX_ALTERNATIVE_NAME_LENGTH
public static final java.lang.String SIMULATION_DSS_FILE_NAME
public static final int DEFAULT_KEY_LENGTH
public static java.lang.String FILE_EXT
public SimulationPeriod()
public java.lang.String getOutputDSSFilePath()
getOutputDSSFilePath in class AbstractSimulationpublic java.lang.String getOutputDSSFileName()
getOutputDSSFileName in class AbstractSimulationpublic void setOutputDSSFileName(java.lang.String fileName)
fileName - public java.util.Vector getTrialRunNames()
getTrialRunNames in interface Simulationpublic TrialRun createNewTrialRun(java.lang.String newTrialName, java.lang.String userName, java.lang.String trialKey, SimulationRun parent, TrialRun baseTrial, int modelPosition)
createNewTrialRun in interface Simulationpublic void setSimulationRunClass(java.lang.String className)
className - The new SimulationRunClass valuepublic java.lang.String getSimulationRunClass()
public java.lang.String getSimulationAppType()
public void setSimulationAppType(java.lang.String appType)
public void setAlternatives(java.lang.String[] alts)
alts - A String array of Simulation Run Names.public boolean saveStreamAlignment()
public java.util.Vector getModelTrials(java.lang.String program,
java.lang.String id)
getModelTrials in interface Simulationpublic java.util.Vector getUnusedModelTrials(java.lang.String program,
java.lang.String id)
getUnusedModelTrials in interface Simulationpublic boolean addModelTrial(java.lang.String program,
java.lang.String id,
int num)
public java.lang.String createBaseTrialName(java.lang.String name)
public java.lang.String getReferenceResultsPath()
public java.lang.String getSimulationPath()
getSimulationPath in class AbstractSimulationpublic java.lang.String getWorkspacePath()
getWorkspacePath in class ManagerProxyListManagerpublic StreamAlignment getStreamAlignment()
getStreamAlignment in interface Simulationpublic void writeTrials()
public TrialRun getTrialRun(java.lang.String trialName)
public java.util.Vector getTrialRuns()
public Identifier findManagerID(java.util.Vector idlist, java.lang.String idname)
public void loadWorkspace(java.lang.String remoteRegistry,
java.lang.String baseDir)
loadWorkspace in class AbstractSimulationremoteRegistry - Description of ParameterbaseDir - Description of Parameterpublic boolean isLoaded()
isLoaded in class AbstractSimulationpublic void unloading()
ManagerProxyListManagerunloading in class ManagerProxyListManagerpublic void acceptTrial(SimulationRun run, AltItem altItem, int modelPos, java.lang.String trialKey)
acceptTrial in interface Simulationrun - Description of ParameteraltItem - Description of ParametermodelPos - Description of ParametertrialKey - Description of Parameterpublic boolean removeTrial(AltItem altItem, TrialReference trialRef2Remove)
removeTrial in interface SimulationremoveTrial in class AbstractSimulationpublic void setSimulationTypeString(java.lang.String simType)
simType - public java.lang.String[] getAlternatives()
getAlternatives in class AbstractSimulationpublic SimRunInfo[] getAlternativeInfo()
public java.util.Vector getSimulationRuns()
getSimulationRuns in class AbstractSimulationpublic SimulationRun getSimulationRun(java.lang.String simRunName)
public boolean compute()
compute in interface Simulationpublic boolean computeRun(SimulationRun run, int lastModel)
run - TrialForecastRun to computelastModel - position of last model to run. -1 runs all modelspublic boolean computeInit()
public SimulationRun getCurrentComputingRun()
public void setLastComputeTime(int index,
long computeTime)
public long getLastComputeTime(int index)
public java.lang.String getLastComputeTimeString(int index)
public boolean runExtract(SimulationExtract extract)
public SimulationExtract getSimulationExtract(ManagerProxyListContainer wksp)
public int getKeyLength()
public void setKeyLength(int length)
public int getMaxAlternativeNameLength()
public void setMaxAlternativeNameLength(int length)
public void reloadManagers()
public void deleting()
deleting in class ManagerManager.deleting()public java.lang.Object getFieldObject(java.lang.reflect.Field fld)
getFieldObject in interface FieldAccessorgetFieldObject in class AbstractSimulationfld - Description of Parameterpublic boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
setFieldObject in interface FieldAccessorsetFieldObject in class AbstractSimulationfld - The field object that describes which field to setfobj - The value that is assigned to the field