public class JythonHms
extends java.lang.Object
Constructor and Description |
---|
JythonHms()
Creates a JythonHms object.
|
JythonHms(ProjectManager manager)
Creates a JythonHms object with the specified ProjectManager.
|
Modifier and Type | Method and Description |
---|---|
static void |
Compute(java.lang.String runName)
Jython method: Computes an HMS run.
|
static void |
ComputeForecast(java.lang.String forecastName) |
static void |
ComputeRun(java.lang.String runName) |
static void |
ComputeTrial(java.lang.String trialName) |
static void |
Exit(int exitCode)
Jython method: Exits the script.
|
static void |
HMSExit(int exitCode)
Jython method: Exits the script.
|
static void |
MoveResults(java.lang.String dssFileName,
java.lang.String fPart)
Jython method: Move results from the current run to the given DSS file
with the given pathname f-part.
|
static void |
OpenBasinModel(java.lang.String basinName)
Jython method: Opens a basin model for the current project.
|
static void |
OpenProject(java.lang.String projectName,
java.lang.String directory)
Jython method: Opens a project.
|
static void |
OpenRun(java.lang.String runName)
Opens the run for the given run name.
|
static void |
Optimize()
Jython method: Optimize the current trial.
|
static void |
RenameStateGridBPart(java.lang.String bPart)
Jython method: Renames B-part for state grid DSS records.
|
int |
runScript() |
static int |
runScript(java.lang.String scriptFileName)
Runs the specified script.
|
static void |
SaveAllProjectComponents()
Jython method: Saves all open components, and data managers.
|
static void |
SaveBasinModel()
Jython method: Saves current basin model.
|
static void |
SaveBasinModelAs(java.lang.String newName)
Jython method: Saves current basin model with a new name.
|
static void |
SelectOptimizationTrial(java.lang.String trialName)
Jython method: Select optimization trial for the current project.
|
static void |
SetBaseflowValue(java.lang.String elementName,
java.lang.String parameterName,
double value)
Jython method: Sets value for a baseflow parameter in a subbasin.
|
static void |
SetBaseflowValue(java.lang.String elementName,
java.lang.String parameterName,
java.lang.String value)
Jython method: Sets value for a baseflow parameter in a subbasin.
|
static void |
SetBasinUnitSystem(java.lang.String unitSystem)
Jython method: Sets unit system for current basin model.
|
static void |
SetBlendMethod(java.lang.String elementName,
java.lang.String blendMethod)
Jython method: Sets blend method for a basin element.
|
static void |
SetBlendMethod(java.lang.String elementName,
java.lang.String blendMethod,
double taperDuration)
Jython method: Sets blend method for a basin element.
|
static void |
SetBlendMethod(java.lang.String elementName,
java.lang.String blendMethod,
java.lang.String taperDuration)
Jython method: Sets blend method for a basin element.
|
static void |
SetDssFile(java.lang.String fileName)
Sets the DSS file name for the current run
|
static void |
SetLossRateValue(java.lang.String elementName,
java.lang.String parameterName,
double value)
Jython method: Sets value for a loss rate parameter in a subbasin.
|
static void |
SetLossRateValue(java.lang.String elementName,
java.lang.String parameterName,
java.lang.String value)
Jython method: Sets value for a loss rate parameter in a subbasin.
|
static void |
SetObjectiveFunctionTime(java.lang.String type,
java.lang.String date,
java.lang.String time)
Jython method: Sets time for evaluating objective function for the
current optimizer.
|
static void |
SetParameterLock(java.lang.String elementName,
java.lang.String parameterName,
java.lang.String lock)
Jython method: Set lock for an optimization parameter
|
static void |
SetPercentMissingAllowed(double percent)
Jython method: Set percent missing observed flow allowed for
optimization.
|
static void |
setProjectManager(ProjectManager manager) |
void |
setScriptFileName(java.lang.String filename) |
static void |
SetTimeWindow(java.lang.String startDate,
java.lang.String startTime,
java.lang.String endDate,
java.lang.String endTime)
Sets the time window in the current Control Specification.
|
static void |
UseOptimizerTrialResults(java.lang.String runName,
java.lang.String location,
int trialNumber)
Jython method: Use optimizer results from the selected trial.
|
public JythonHms()
public JythonHms(ProjectManager manager)
manager
- public static void Compute(java.lang.String runName)
runName
- name of the run to compute.org.python.core.PyException
public static void ComputeForecast(java.lang.String forecastName)
public static void ComputeRun(java.lang.String runName)
public static void ComputeTrial(java.lang.String trialName)
public static void Exit(int exitCode)
exitCode
- exit code numberorg.python.core.PyException
- exception type is Py.SystemExit; exception value is exit codepublic static void HMSExit(int exitCode)
exitCode
- exit code numberorg.python.core.PyException
- exception type is Py.SystemExit; exception value is exit codepublic static void MoveResults(java.lang.String dssFileName, java.lang.String fPart)
dssFileName
- new DSS file namefPart
- version identification (pathname f-part)org.python.core.PyException
public static void OpenBasinModel(java.lang.String basinName)
basinName
- org.python.core.PyException
public static void OpenProject(java.lang.String projectName, java.lang.String directory)
projectName
- directory
- org.python.core.PyException
public static void OpenRun(java.lang.String runName)
runName
- org.python.core.PyException
- if the run is not openedpublic static void Optimize()
org.python.core.PyException
public static void RenameStateGridBPart(java.lang.String bPart)
org.python.core.PyException
public int runScript()
public static int runScript(java.lang.String scriptFileName)
scriptFileName
- public static void SaveAllProjectComponents()
org.python.core.PyException
public static void SaveBasinModel()
org.python.core.PyException
public static void SaveBasinModelAs(java.lang.String newName)
newName
- Stringpublic static void SelectOptimizationTrial(java.lang.String trialName)
runName
- is the run name,location
- is the optimization location name,trialNumber
- is the trial number.org.python.core.PyException
public static void SetBaseflowValue(java.lang.String elementName, java.lang.String parameterName, double value)
subbasinName
- is the subbasin name,parameterName
- is for BoundedRecession method: "InitialBaseflow",
"Flow/AreaRatio", "RecessionFactor"; for Recession method:
"InitialBaseflow", "Flow/AreaRatio", "RecessionFactor",
"ThresholdFlow", or "FlowToPeakRatio"value
- is the parameter valueorg.python.core.PyException
public static void SetBaseflowValue(java.lang.String elementName, java.lang.String parameterName, java.lang.String value)
subbasinName
- is the subbasin name,parameterName
- is the parameter name.value
- is the parameter valueorg.python.core.PyException
public static void SetBasinUnitSystem(java.lang.String unitSystem)
unitSystem
- is "English", "SI", or "Metric"org.python.core.PyException
public static void SetBlendMethod(java.lang.String elementName, java.lang.String blendMethod)
elementName
- the element nameblendMethod
- "Linear Taper", "Step", or "None"org.python.core.PyException
public static void SetBlendMethod(java.lang.String elementName, java.lang.String blendMethod, double taperDuration)
elementName
- is the element nameblendMethod
- is "Linear Taper", "Step", or "None"taperDuration
- is taper duration in mintues for linear taper methodorg.python.core.PyException
public static void SetBlendMethod(java.lang.String elementName, java.lang.String blendMethod, java.lang.String taperDuration)
elementName
- is the element nameblendMethod
- is "Linear Taper", "Step", or "None"taperDuration
- is taper duration in mintues for linear taper methodorg.python.core.PyException
public static void SetDssFile(java.lang.String fileName)
fileName
- PyExcetion
- if run is not definedpublic static void SetLossRateValue(java.lang.String elementName, java.lang.String parameterName, double value)
subbasinName
- is the subbasin name,parameterName
- is for DeficitConstant method: "InitialDeficit",
"MaximumDeficit", "ConstantLossRate", or "RecoveryFactor"; for
GreenAmpt method: "InitialLoss", "MoistureDeficit",
"WettingFrontSuction", or "HydraulicConductivity" for
InitialConstant method: "InitialLoss" or "ConstantLossRate";
for SCSLoss method: "SCSCurveNumber" or
"SCSInitialAbstraction" for all loss methods:
"PercentImperviousArea"value
- is the parameter valueorg.python.core.PyException
public static void SetLossRateValue(java.lang.String elementName, java.lang.String parameterName, java.lang.String value)
subbasinName
- is the subbasin name,parameterName
- is the parameter name.value
- is the parameter valueorg.python.core.PyException
public static void SetObjectiveFunctionTime(java.lang.String type, java.lang.String date, java.lang.String time)
type
- is "Start" or "End"date
- is the datetime
- is time of dayorg.python.core.PyException
public static void SetParameterLock(java.lang.String elementName, java.lang.String parameterName, java.lang.String lock)
elementName
- is the basin element name,parameterName
- is the parameter name,lock
- is "Yes" or "No".org.python.core.PyException
public static void SetPercentMissingAllowed(double percent)
percent
- is percent of missing flow allowed.org.python.core.PyException
public static void setProjectManager(ProjectManager manager)
public void setScriptFileName(java.lang.String filename)
public static void SetTimeWindow(java.lang.String startDate, java.lang.String startTime, java.lang.String endDate, java.lang.String endTime)
startDate
- startTime
- endDate
- endTime
- org.python.core.PyException
- if the control spec is not definedpublic static void UseOptimizerTrialResults(java.lang.String runName, java.lang.String location, int trialNumber)
runName
- is optimization run name,location
- is name of optimization location,trialNumber
- is trial number.org.python.core.PyException