public class WaterAccount extends RssTSLocationObject implements java.lang.Cloneable, AsciiSerializable
defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTRTN_CANCELED, RTN_NOPROBLEM, RTN_OPCHANGE, RTN_PROBLEMCUMLOC_OUTPUT_DATA, GRPID_DIVERSION, GRPID_JUNCTION, GRPID_REACH, GRPID_RESERVOIR, HINDCAST_IDS, HOLDOUT_OUTPUT_DATA, INPUT_DATA, OUTPUT_DATA, PULSE_OUTPUT_DATA, UNREG_OUTPUT_DATA, VID_ADJPARAM_FLOW, VID_CAPACITY_FACTOR, VID_CTRLOUT_HINDFLW, VID_CTRLOUT_RELEASE, VID_DAM_LEAK, VID_DAM_RELEASE, VID_DIV_FLOW, VID_DIV_FLOW_ROUTED, VID_DIV_HINDFLW, VID_DIV_RELEASE, VID_DIVOUT_FLOW, VID_DIVOUT_FLOW_ROUTED, VID_ENERGYREQUIRED_TSINPUT, VID_FIRST, VID_FOREBAY_ELEV, VID_FOREBAY_HEADLOSS, VID_GATE_OPENING, VID_GATE_PERCENTOPEN, VID_JUNC_ELEV, VID_JUNC_FLOW_CUMLOC, VID_JUNC_FLOW_DIV, VID_JUNC_FLOW_HOLD, VID_JUNC_FLOW_IN, VID_JUNC_FLOW_LIMIT, VID_JUNC_FLOW_LOCAL, VID_JUNC_FLOW_PULSE, VID_JUNC_FLOW_REG, VID_JUNC_FLOW_UNREG, VID_JUNC_FLOW_VIOL, VID_JUNC_HINDFLOW, VID_JUNC_INFLOW, VID_JUNC_INFLOW_LOCAL_TOTAL, VID_JUNC_STAGE, VID_JUNC_STAGE_LIMIT, VID_JUNC_STAGE_REG, VID_JUNC_STAGE_UNREG, VID_JUNC_STAGE_VIOL, VID_LAST, VID_NODE_FLOW, VID_NODE_HINDFLW, VID_NODE_HINDSTG, VID_NODE_KNOWNFLOW, VID_NODE_STAGE, VID_OPCTRL_CONSTRAINTID, VID_OPCTRL_DECISION, VID_OPCTRL_MAXLIMIT, VID_OPCTRL_MINLIMIT, VID_OPCTRL_RULEID, VID_OPCTRL_ZONEID, VID_OPRULE_FLOW_SPACE, VID_OPRULE_MAX, VID_OPRULE_MAX_STAGE, VID_OPRULE_MIN, VID_OPRULE_MIN_STAGE, VID_OPRULE_ROUTE_LAG, VID_OPRULE_ROUTE_MAXOFFSET, VID_OPRULE_ROUTE_MINOFFSET, VID_OPRULE_SPEC, VID_OPRULE_STOR_BAL, VID_OPRULE_STOR_BAL_INDEX, VID_OPRULE_VIOL_ELEV, VID_OPRULE_VIOL_FLOW, VID_OPRULE_VIOL_STAGE, VID_OPRULE_VIOL_STOR, VID_OPRULEFL_CUMLOC, VID_OPRULETS_TSINPUT, VID_OPSET_ACTIVEZONE, VID_OPSET_GC_ELEV, VID_OPSET_GC_STOR, VID_OPSET_KNOWNZONEELEV, VID_OPSET_PROJECTEDELEV, VID_OPSET_ZONEELEV, VID_OPSET_ZONESTOR, VID_OUTGRP_RELEASE, VID_POOL_AREA, VID_POOL_ELEV, VID_POOL_ELEVROC, VID_POOL_EVAP, VID_POOL_HINDELEV, VID_POOL_HINDSTOR, VID_POOL_HOLDOUT, VID_POOL_INFLOW, VID_POOL_INPUTEVAP, VID_POOL_NETINFLOW, VID_POOL_OUTFLOW, VID_POOL_SEEP, VID_POOL_STOR, VID_PULSE_BACKQ, VID_PULSE_PULSEQ, VID_PUMP_FLOWAVG, VID_PUMP_VOL, VID_PUMPRULE_FLOWAVG, VID_PUMPRULE_FLOWAVG_CAP, VID_PUMPRULE_FLOWINST, VID_PUMPRULE_FLOWINST_CAP, VID_PUMPRULE_HOURS, VID_PUMPRULE_HOURS_CAP, VID_PUMPRULE_NUMPUMP, VID_PUMPRULE_NUMPUMP_CAP, VID_PUMPRULE_UNITHOURS, VID_PUMPRULE_UNITHOURS_CAP, VID_PUMPRULE_VOL, VID_PUMPRULE_VOL_CAP, VID_PWR_CAPABILITY, VID_PWR_EFF, VID_PWR_ENGYGEN, VID_PWR_ENGYPATTERN, VID_PWR_ENGYPERGEN, VID_PWR_ENGYPERREQD, VID_PWR_ENGYREQD, VID_PWR_ENGYVIOL, VID_PWR_FLWPWR, VID_PWR_HDPWR, VID_PWR_HYDLSS, VID_PWR_MAXCAPACITY, VID_PWR_PER_BALGEN, VID_PWR_PER_GCGEN, VID_PWR_PER_MINPUMPGEN, VID_PWR_PER_MINRELGEN, VID_PWR_PER_POWGEN, VID_PWR_PER_PUMPGEN, VID_PWR_PLNTFAC, VID_PWR_PWRCAP, VID_PWR_REQUIRED, VID_PWR_SPILL, VID_PWR_VIOL, VID_RCH_SEEP, VID_REACH_FLOW_CUMLOC, VID_REACH_FLOW_IN, VID_REACH_FLOW_REG, VID_REACH_FLOW_UNREG, VID_RES_GCRELEASE, VID_RES_HOLDOUT, VID_RES_RELEASE, VID_SPILL_FLOW, VID_SPILL_HINDFLOW, VID_STATE_VAR, VID_STATE_VAR_HIND, VID_TAIL_ELEV, VID_UNCTOUT_FLOW, VID_UNCTOUT_HINDFLW, VID_WA_ACCOUNT_DEMAND, VID_WA_ACCOUNT_INFLOW, VID_WA_CURRENT_MAX_VOLUME, VID_WA_CURRENT_VOLUME, VID_WA_HINDSTOR, VID_WA_RULE_DEMAND| Constructor and Description |
|---|
WaterAccount()
Instantiates a new water account.
|
WaterAccount(java.lang.String name,
java.lang.String description,
int setIndex,
int waIndex)
Instantiates a new water account.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allAccountsEmpty()
Returns whether all water accts associated with a res are empty.
|
boolean |
allAccountsFull()
Returns whether all water accts associated with a res are full.
|
void |
applyHindcastData(HindcastData hd)
Apply hindcast data.
|
void |
calcInflow(RunTimeStep rts)
Calc inflow to water account.
|
boolean |
checkAndSetAllAccountsFull(RunTimeStep rts,
double delStor)
Checks whether the reservoir is at or above top of cons and then sets all accounts
as full if necessary
Performed only on the default water account
|
void |
checkStep(RunTimeStep rts) |
boolean |
checkUsesRule(java.util.List<YieldAnalysisRuleRef> yarrList) |
boolean |
checkUsesRule(OpRule opRule) |
java.lang.Object |
clone()
clone method
|
int |
computeDefaultWAhindcastStep(RunTimeStep runtime)
Compute hindcast step for a default water account.
|
int |
computeHindcastStep(RunTimeStep rts)
Compute hindcast step.
|
java.util.Vector |
getActiveTSProxies(java.util.Vector vec,
int iotype)
returns a vector of required input, or generated output TSRecordProxies
used in the current water account
default implementation function, assume all records are active.
|
double |
getAvailableVolume(RunTimeStep rts)
Gets the available volume.
|
double |
getCurrentFractionOfCon() |
double |
getCurrentInflow(RunTimeStep rts)
Gets the current inflow.
|
double |
getCurrentVolume(RunTimeStep rts)
Gets the current volume.
|
boolean |
getDefaultFlag()
Gets the default flag.
|
double |
getDemand(RunTimeStep rts)
Gets the demand.
|
java.lang.String |
getDescription()
Gets the description.
|
double |
getExcessInflowVol()
Gets the excess inflow vol.
|
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
double |
getGcOpDemands() |
java.util.Vector |
getHindcastDataList(java.util.Vector hvec)
Gets the hindcast data list.
|
int |
getIndex()
Return the index of the NamedType as an int.
|
double |
getInitialStorage()
Gets the initial storage.
|
double |
getLowerStorageLimit()
Gets the lower storage limit.
|
double |
getMaxStorage()
Gets the max storage.
|
double |
getMaxVolTS(RunTimeStep rts) |
java.lang.String |
getName()
Gets the name.
|
int |
getNumFullAccts() |
double |
getPercentOfCon()
Gets the percent of con.
|
double |
getPhysicalDemands() |
double |
getPrevVolume(RunTimeStep rts)
Gets the prev volume.
|
ReservoirElement |
getReservoir()
Gets the reservoir.
|
double |
getResExcessInflowVol() |
double |
getRuleDemand(RunTimeStep rts) |
java.util.List<YieldAnalysisRuleRef> |
getRuleRefs()
Gets the rule refs.
|
StorageZone |
getStorageZone()
Gets the storage zone.
|
RssSystem |
getSystem()
Each subclass must provide a method to return its parent RssSystem
|
int |
getWaterAccountSetIndex()
Gets the water account set index.
|
boolean |
hasYieldAnalysis() |
boolean |
inflowEvaled() |
void |
initialize()
Initialize.
|
void |
initializeDefault()
Initialize default account.
|
void |
initializeInflow(RunTimeStep rts)
Initialize inflow.
|
int |
initializeResInflow(RunTimeStep rts) |
boolean |
initializeRules(RssSystem system)
Initialize rules.
|
void |
initializeWADemands(RunTimeStep rts) |
boolean |
isEmpty()
Checks if is empty.
|
boolean |
isFull()
Checks if is full.
|
boolean |
isInitialized() |
boolean |
isnowEmpty()
Checks if WA is now empty.
|
boolean |
isnowFull()
Checks if WA is now full.
|
boolean |
readFile(java.io.BufferedReader reader)
Read file.
|
int |
setAccountFractions(RunTimeStep rts)
Method to set account fractions - should be called only for default water account on reservoir
|
void |
setAllAccountsFull(RunTimeStep rts)
Sets all water accounts full (default acct only)
Done when end of step elevation above the top of conservation
Note: will cause problems when water accounts span multiple reservoirs
|
void |
setCurrentFractionOfCon(double fracOfCon) |
void |
setCurrentInflow(RunTimeStep rts,
double inflow)
Sets the current inflow.
|
void |
setCurrentVolume(RunTimeStep rts,
double currentVol)
Sets the current volume.
|
void |
setDefaultFlag(boolean defaultFlag)
Sets the default flag.
|
void |
setDemand(double demand,
double requestedDemand,
RunTimeStep rts,
OpRule rule)
Sets the demand.
|
void |
setDescription(java.lang.String description)
Sets the description.
|
void |
setEmpty(boolean emptyornot)
Sets WA empty
|
void |
setExcessInflowVol(double excessInflowVol)
Sets the excess inflow vol.
|
boolean |
setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
This allows access to fields withing the implementing object to set there data.
|
void |
setFull(boolean fullornot)
Sets WA full
|
void |
setGcOpDemands(double gcOpDemands) |
void |
setInitialStorage(double s)
Sets the initial storage.
|
void |
setLowerStorageLimit(RunTimeStep rts)
Sets the lower storage limit.
|
void |
setMaxStorage(double maxStorage)
Sets the max storage.
|
void |
setMaxVolTS(RunTimeStep rts,
double maxStor)
Sets the max vol ts.
|
void |
setName(java.lang.String name)
Sets the name.
|
void |
setNumFullAccts(int nFullAccts) |
void |
setPercentOfCon(double percentOfCon)
Sets the percent of con.
|
void |
setPhysicalDemands(double physicalDemands) |
void |
setReservoir(ReservoirElement res)
Sets the reservoir.
|
void |
setReservoir(ReservoirElement res,
RunTimeStep rts)
Sets the reservoir.
|
void |
setResExcessInflowVol(double excessQinVol) |
void |
setRuleDemand(RunTimeStep rts,
double demand) |
void |
setRuleRefs(java.util.List<YieldAnalysisRuleRef> ruleRefs)
Sets the rule refs.
|
void |
setStorageZone()
Sets the storage zone.
|
void |
setSystem(RssSystem sys)
Sets the system.
|
void |
setUsePercentOfCon(boolean usePercentOfCon)
Sets the use percent of con.
|
void |
sumResExcessInflowVol()
Sum all water account excess inflow volumes for a reservoir (default acct only)
|
java.lang.String |
toString() |
void |
updateCurrentVolume(double requestedDemand,
double availFlow,
RunTimeStep rts)
Update current volume.
|
void |
updateDefaultWA(RunTimeStep rts,
ReservoirElement res)
Updates default water account when no rule has been applied that time step
|
void |
updateTSProxyList()
Regenerates the list of all TSProxies required for this location.
|
void |
updateTSProxyList(boolean createYield)
Update ts proxy list.
|
void |
updateWAfullemptytags()
Update all water account full/empty tags at end of water account iteration step
Used on default water account only
|
boolean |
usePercentOfCon()
Use percent of con.
|
boolean |
usesReservoir(ReservoirElement res)
Check if water account uses a particular reservoir.
|
boolean |
writeFile(java.io.BufferedWriter writer)
Write file.
|
addTSRecord, addTSRecordProxy, addTSRecordProxy, addTSRecordProxy, clearTSProxyList, copyInto, getActiveTSRecordProxies, getComputedTSRecordProxies, getTSArray, getTSArray, getTSArray, getTSArray, getTSContainer, getTSContainer, getTSDataSet, getTSRecordProxies, getTSRecordProxy, getTSRecordProxy, getTSRecordProxy, getTSRecordProxy, getTSRecordProxy, getTSRecordProxyVec, removeTSRecord, removeTSRecordProxy, removeTSRecordProxyaddModifiableListener, compareTo, getDisplayName, getIgnoreModifiedEvents, isModified, isValid, removeModifiableListener, rename, set, setIgnoreModifiedEvents, setIndex, setModified, setValid, update, useRecursiveModifiedTestpublic WaterAccount()
public WaterAccount(java.lang.String name,
java.lang.String description,
int setIndex,
int waIndex)
name - the namedescription - the descriptionsetIndex - the set indexwaIndex - the wa indexpublic int getIndex()
NamedTypepublic void setDefaultFlag(boolean defaultFlag)
public boolean getDefaultFlag()
public int getWaterAccountSetIndex()
public void setReservoir(ReservoirElement res)
res - the respublic void setReservoir(ReservoirElement res, RunTimeStep rts)
res - the resrts - the rtspublic ReservoirElement getReservoir()
public void setStorageZone()
public StorageZone getStorageZone()
public void setLowerStorageLimit(RunTimeStep rts)
rts - the new lower storage limitpublic double getLowerStorageLimit()
public void initialize()
public boolean isInitialized()
public void initializeDefault()
public java.util.Vector getHindcastDataList(java.util.Vector hvec)
hvec - the hvecpublic boolean initializeRules(RssSystem system)
system - the systempublic void initializeInflow(RunTimeStep rts)
public boolean isFull()
public boolean isEmpty()
public void setFull(boolean fullornot)
public void setEmpty(boolean emptyornot)
public boolean isnowFull()
public boolean isnowEmpty()
public double getExcessInflowVol()
public boolean allAccountsFull()
public boolean allAccountsEmpty()
public void setExcessInflowVol(double excessInflowVol)
excessInflowVol - the new excess inflow volpublic void calcInflow(RunTimeStep rts)
rts - the rtspublic double getCurrentInflow(RunTimeStep rts)
rts - the rtspublic void setCurrentInflow(RunTimeStep rts, double inflow)
rts - the rtsinflow - the inflowpublic double getAvailableVolume(RunTimeStep rts)
rts - the rtspublic double getPrevVolume(RunTimeStep rts)
rts - the rtspublic double getCurrentVolume(RunTimeStep rts)
rts - the rtspublic void setCurrentVolume(RunTimeStep rts, double currentVol)
rts - the rtspublic void setDemand(double demand,
double requestedDemand,
RunTimeStep rts,
OpRule rule)
demand - the demandrequestedDemand - the requested demandrts - the rtspublic double getDemand(RunTimeStep rts)
rts - the rtspublic double getRuleDemand(RunTimeStep rts)
public void setRuleDemand(RunTimeStep rts, double demand)
public void updateCurrentVolume(double requestedDemand,
double availFlow,
RunTimeStep rts)
rts - the rtspublic void checkStep(RunTimeStep rts)
public void updateWAfullemptytags()
public void updateDefaultWA(RunTimeStep rts, ReservoirElement res)
public void sumResExcessInflowVol()
public boolean checkAndSetAllAccountsFull(RunTimeStep rts, double delStor)
public void setAllAccountsFull(RunTimeStep rts)
public void setMaxVolTS(RunTimeStep rts, double maxStor)
rts - the rtsmaxStor - the max storpublic double getMaxVolTS(RunTimeStep rts)
public void setUsePercentOfCon(boolean usePercentOfCon)
usePercentOfCon - the new use percent of conpublic boolean usePercentOfCon()
public void setPercentOfCon(double percentOfCon)
percentOfCon - the new percent of conpublic double getPercentOfCon()
public void setMaxStorage(double maxStorage)
maxStorage - the new max storagepublic double getMaxStorage()
public void setRuleRefs(java.util.List<YieldAnalysisRuleRef> ruleRefs)
ruleRefs - the new rule refspublic java.util.List<YieldAnalysisRuleRef> getRuleRefs()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setDescription(java.lang.String description)
setDescription in class NamedTypedescription - the new descriptionpublic java.lang.String getDescription()
getDescription in class NamedTypepublic int getNumFullAccts()
public void setNumFullAccts(int nFullAccts)
public void setPhysicalDemands(double physicalDemands)
public double getPhysicalDemands()
public void setGcOpDemands(double gcOpDemands)
public double getGcOpDemands()
public void setResExcessInflowVol(double excessQinVol)
public double getResExcessInflowVol()
public int initializeResInflow(RunTimeStep rts)
public void initializeWADemands(RunTimeStep rts)
public boolean inflowEvaled()
public int setAccountFractions(RunTimeStep rts)
public void setCurrentFractionOfCon(double fracOfCon)
public double getCurrentFractionOfCon()
public boolean hasYieldAnalysis()
public void applyHindcastData(HindcastData hd)
hd - the hdpublic double getInitialStorage()
public void setInitialStorage(double s)
s - the new initial storagepublic boolean usesReservoir(ReservoirElement res)
public int computeHindcastStep(RunTimeStep rts)
runtime - the runtimepublic int computeDefaultWAhindcastStep(RunTimeStep runtime)
runtime - the runtimepublic boolean checkUsesRule(java.util.List<YieldAnalysisRuleRef> yarrList)
public boolean checkUsesRule(OpRule opRule)
public boolean writeFile(java.io.BufferedWriter writer)
throws java.io.IOException
writer - the writerjava.io.IOException - Signals that an I/O exception has occurred.public boolean readFile(java.io.BufferedReader reader)
throws java.io.IOException
reader - the readerjava.io.IOException - Signals that an I/O exception has occurred.public java.lang.Object clone()
RssTSLocationObjectclone in class RssTSLocationObjectpublic java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorgetFieldObject in class RssTSLocationObjectfld - The field to get.public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorsetFieldObject in class RssTSLocationObjectfld - The java field object representing the member field to be setfobj - The data to set in that fieldpublic RssSystem getSystem()
RssTSLocationObjectgetSystem in class RssTSLocationObjectpublic void setSystem(RssSystem sys)
sys - the new systempublic void updateTSProxyList(boolean createYield)
createYield - the create yieldpublic void updateTSProxyList()
RssTSLocationObjectupdateTSProxyList in class RssTSLocationObjectpublic java.util.Vector getActiveTSProxies(java.util.Vector vec,
int iotype)
vec - the veciotype - the iotype