Package hec.rss.model
Class YieldAnalysis
java.lang.Object
hec.rss.model.YieldAnalysis
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ReservoirYieldAnalysis,ReverseYieldAnalysisBase,WaterAccountYieldAnalysis
The Class YieldAnalysis.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclone()intGets the max heuristic iterations.intGets the max iterations.static double[]getOpRuleLimitTS(RssRun run, OpRule opRule, RunTimeWindow rtw) static double[]getOpRuleResultTS(RssRun run, OpRule opRule, RunTimeWindow rtw) static double[]getResPoolStorTS(RssRun run, ReservoirElement res, RunTimeWindow rtw) static double[]getResZoneElevTS(RssRun run, StorageZone zone, RunTimeWindow rtw) static double[]getResZoneStorTS(RssRun run, StorageZone zone, RunTimeWindow rtw) static int[]getSimulationTimeArray(RssRun run, ReservoirElement res, RunTimeWindow rtw) intstatic double[]getWAMaxStorTS(RssRun run, WaterAccount wa, RunTimeWindow rtw) static double[]getWARuleLimitTS(RssRun run, WaterAccount wa, RunTimeWindow rtw) static double[]getWARuleResultTS(RssRun run, WaterAccount wa, RunTimeWindow rtw) static int[]getWASimulationTimeArray(RssRun run, WaterAccount wa, RunTimeWindow rtw) static double[]getWAStorTS(RssRun run, WaterAccount wa, RunTimeWindow rtw) getWaterAccount(RssAlt alt) Gets the yield analysis rule refs.intinitializeCompute(RssRun run) voidvoidinitializeRuleRefs(RssAlt alt) intintloadWaterAccountData(RssRun run, WaterAccount wa, int iter) booleanmakeDecisionUseBisection(int iterationNumber, int useBisectionAfterIts) booleanreadFile(BufferedReader reader) Read file.voidsetMaxHeuristicIterations(int iter) Sets the max heuristic iterations.voidsetMaxIterations(int maxIterations) Sets the max iterations.voidsetNextBisectionScaleBracketed(int currentIterationNumber) voidsetNextBisectionScaleNotBracketed(int currentIterationNumber) voidsetNextHeuristicsScaleWA(int currentIterationNumber) voidsetNumLagSteps(StorageZoneRef szRef) voidvoidvoidsetNumRoutingSteps(List<OpRule> ruleList) voidsetRuleRefs(List<YieldAnalysisRuleRef> rules) Sets the rule refs.voidsetUseBisectionOnly(boolean set) Sets the use bisection only.voidsetUseHydropowerRules(boolean useHydropowerRules) Sets the use hydropower rules.voidsetYieldAnalysisRuleDemandScale(double demandScale) voidsetYieldAnalysisRuleUseDemandScale(boolean useDemandScale) inttestRule(RssRun run, YieldAnalysisRuleRef yarr, int iter) inttestStorage(RssRun run, YieldAnalysisRuleRef yarr, int iter) inttestWaterAccountRule(RssRun run, int iter) inttestWaterAccountStorage(RssRun run, int iter, double storageTolerance) voidupdateByDemandScale(double demandScale) booleanUse bisection only.booleanUse hydropower rules.booleanwriteFile(BufferedWriter writer, RssAlt alt) Write file.
-
Field Details
-
STORAGE_EPSILON
public static final double STORAGE_EPSILON- See Also:
-
-
Constructor Details
-
YieldAnalysis
public YieldAnalysis()Instantiates a new yield analysis.
-
-
Method Details
-
initializeCompute
-
initializeRuleRefs
-
initializeOutputArrays
public void initializeOutputArrays() -
getYieldAnalysisData
-
getWaterAccount
-
loadData
-
loadWaterAccountData
-
setNumRoutingSteps
-
setNumRoutingSteps
public void setNumRoutingSteps() -
setNumRoutingSteps
-
setNumLagSteps
-
testRule
-
testWaterAccountRule
-
testStorage
-
testWaterAccountStorage
-
calcAvgStartingRuleDemand
-
getUseBisectionAfterIts
-
makeDecisionUseBisection
public boolean makeDecisionUseBisection(int iterationNumber, int useBisectionAfterIts) -
setYieldAnalysisRuleUseDemandScale
public void setYieldAnalysisRuleUseDemandScale(boolean useDemandScale) -
setYieldAnalysisRuleDemandScale
public void setYieldAnalysisRuleDemandScale(double demandScale) -
updateByDemandScale
public void updateByDemandScale(double demandScale) -
setNextBisectionScaleBracketed
public void setNextBisectionScaleBracketed(int currentIterationNumber) -
setNextBisectionScaleNotBracketed
public void setNextBisectionScaleNotBracketed(int currentIterationNumber) -
setNextHeuristicsScaleWA
public void setNextHeuristicsScaleWA(int currentIterationNumber) -
getYieldAnalysisRuleRefs
Gets the yield analysis rule refs.- Returns:
- the yield analysis rule refs
-
getYieldAnalysisRuleRefs
-
setMaxIterations
public void setMaxIterations(int maxIterations) Sets the max iterations.- Parameters:
maxIterations- the new max iterations
-
getMaxIterations
public int getMaxIterations()Gets the max iterations.- Returns:
- the max iterations
-
setUseBisectionOnly
public void setUseBisectionOnly(boolean set) Sets the use bisection only.- Parameters:
set- the new use bisection only
-
useBisectionOnly
public boolean useBisectionOnly()Use bisection only.- Returns:
- true, if successful
-
setMaxHeuristicIterations
public void setMaxHeuristicIterations(int iter) Sets the max heuristic iterations.- Parameters:
iter- the new max heuristic iterations
-
getMaxHeuristicIterations
public int getMaxHeuristicIterations()Gets the max heuristic iterations.- Returns:
- the max heuristic iterations
-
setUseHydropowerRules
public void setUseHydropowerRules(boolean useHydropowerRules) Sets the use hydropower rules.- Parameters:
useHydropowerRules- the new use hydropower rules
-
useHydropowerRules
public boolean useHydropowerRules()Use hydropower rules.- Returns:
- true, if successful
-
setRuleRefs
Sets the rule refs.- Parameters:
rules- the new rule refs
-
getOpRuleLimitTS
public static double[] getOpRuleLimitTS(RssRun run, OpRule opRule, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getWARuleLimitTS
public static double[] getWARuleLimitTS(RssRun run, WaterAccount wa, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getOpRuleResultTS
public static double[] getOpRuleResultTS(RssRun run, OpRule opRule, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getWARuleResultTS
public static double[] getWARuleResultTS(RssRun run, WaterAccount wa, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getResZoneStorTS
public static double[] getResZoneStorTS(RssRun run, StorageZone zone, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getResZoneElevTS
public static double[] getResZoneElevTS(RssRun run, StorageZone zone, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getResPoolStorTS
public static double[] getResPoolStorTS(RssRun run, ReservoirElement res, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getWAStorTS
public static double[] getWAStorTS(RssRun run, WaterAccount wa, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getWAMaxStorTS
public static double[] getWAMaxStorTS(RssRun run, WaterAccount wa, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getSimulationTimeArray
public static int[] getSimulationTimeArray(RssRun run, ReservoirElement res, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
getWASimulationTimeArray
public static int[] getWASimulationTimeArray(RssRun run, WaterAccount wa, RunTimeWindow rtw) throws RemoteException, FileNotFoundException - Throws:
RemoteExceptionFileNotFoundException
-
writeFile
Write file.- Parameters:
writer- the writeralt- the alt- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
readFile
Read file.- Parameters:
reader- the reader- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
clone
-