Package hec.rss.model
Class OpControllableElement
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.OpControllableElement
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,OpControllable,RssReturnStatusConstants,Serializable,Cloneable,Comparable,Observer,rma.lang.Modifiable
public class OpControllableElement
extends NamedType
implements OpControllable, RssReturnStatusConstants
Manages a reference to a controllable object in the reservoir physical data.
- See Also:
-
Field Summary
Fields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTFields inherited from interface hec.rss.model.RssReturnStatusConstants
RTN_CANCELED, RTN_NOPROBLEM, RTN_OPCHANGE, RTN_PROBLEM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()clone method - for complete cloning, reset the OpController on the returned clone.intcommitOperation(double val, RunTimeStep rts, int numsteps) commit the operating decision for the given step to adjustable parametersreturns the adjustable parameter associated with the Element function, must be called after initializing the computedoublegets the total current adjustable parameter valuedoublegetDecrROCLimit(RunTimeStep rts, double[] relcap, double[] dt, double elev, List rulelist) Returns the approximate overall decreasing rate of change constraint for this reservoir.intreturns the index of the Element refered to by this objectgetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.doublegetFlowForPrevGateHeight(RunTimeStep rts, double resElev) returns the estimated flow if the gate openings from the previous time step are maintaineddoublegetIncrROCLimit(RunTimeStep rts, double[] relcap, double[] dt, double elev, List rulelist) Returns the approximate overall increasing rate of change constraint for this reservoir.doublegetInstFlowCap(RunTimeStep rts, double elev, double[] cntrl, double[] unctrl) return the instantaneous flow capacity at the given time step and elevationdoublegets the total current adjustable parameter valueintindex of release element this contrable is associated withbooleanPrepares this run for post processing in the ResSim Simulation Module.booleanprepares for computation, gets a reference to the controlled elementintinitOperationStep(RunTimeStep rts, int iteration) initialization call before each operation stepbooleanvoidrecalcPhysicalLimits(RunTimeStep rts, double[] xt, double[] et, int tcnt) voidrecalcPhysicalLimitsInst(RunTimeStep rts, double elev) voidsets the parent controllerbooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.doublesetParameterValue(double val, RunTimeStep rts) sets the adjustable parameter value, returns the value actually appliedvoidsets the associated release element and release element idvoidsetReleaseElementId(int elementId) index of release element this contrable is associated withMethods inherited from class hec.lang.NamedType
addModifiableListener, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, toString, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Constructor Details
-
OpControllableElement
public OpControllableElement() -
OpControllableElement
-
OpControllableElement
-
-
Method Details
-
setReleaseElement
sets the associated release element and release element id- Specified by:
setReleaseElementin interfaceOpControllable
-
getReleaseElementId
public int getReleaseElementId()index of release element this contrable is associated with- Specified by:
getReleaseElementIdin interfaceOpControllable
-
getIncrROCLimit
public double getIncrROCLimit(RunTimeStep rts, double[] relcap, double[] dt, double elev, List rulelist) Returns the approximate overall increasing rate of change constraint for this reservoir. The constraint is the total release capacity (relcap) divided by the time required to decrease from max release to zero (dt). If there is no IROC constraint the dt returned is RmaConst.UNDEFINED_DOUBLE- Specified by:
getIncrROCLimitin interfaceOpControllable
-
getDecrROCLimit
public double getDecrROCLimit(RunTimeStep rts, double[] relcap, double[] dt, double elev, List rulelist) Returns the approximate overall decreasing rate of change constraint for this reservoir. The constraint is the total release capacity (relcap) divided by the time required to decrease from max release to zero (dt). If there is no DROC constraint the dt returned is RmaConst.UNDEFINED_DOUBLE- Specified by:
getDecrROCLimitin interfaceOpControllable
-
isUncontrolled
public boolean isUncontrolled() -
getFlowForPrevGateHeight
returns the estimated flow if the gate openings from the previous time step are maintained- Specified by:
getFlowForPrevGateHeightin interfaceOpControllable
-
getInstFlowCap
Description copied from interface:OpControllablereturn the instantaneous flow capacity at the given time step and elevation- Specified by:
getInstFlowCapin interfaceOpControllable
-
clone
clone method - for complete cloning, reset the OpController on the returned clone.- Specified by:
clonein interfaceOpControllable- Overrides:
clonein classNamedType
-
setController
sets the parent controller- Specified by:
setControllerin interfaceOpControllable
-
setParameterValue
sets the adjustable parameter value, returns the value actually applied- Specified by:
setParameterValuein interfaceOpControllable
-
commitOperation
commit the operating decision for the given step to adjustable parameters -
getCurrentParameterValue
public double getCurrentParameterValue()gets the total current adjustable parameter value- Specified by:
getCurrentParameterValuein interfaceOpControllable
-
getPreviousParameterValue
gets the total current adjustable parameter value- Specified by:
getPreviousParameterValuein interfaceOpControllable
-
getAdjustableParameter
returns the adjustable parameter associated with the Element function, must be called after initializing the compute- Specified by:
getAdjustableParameterin interfaceOpControllable
-
initializeCompute
prepares for computation, gets a reference to the controlled element- Specified by:
initializeComputein interfaceOpControllable
-
initForPostProcessing
Prepares this run for post processing in the ResSim Simulation Module. This routing sets up all data model connectivity, but does not load time series arrays.- Specified by:
initForPostProcessingin interfaceOpControllable- Returns:
- RTN_NOPROBLEM if successful
-
initOperationStep
initialization call before each operation step- Specified by:
initOperationStepin interfaceOpControllable
-
recalcPhysicalLimitsInst
- Specified by:
recalcPhysicalLimitsInstin interfaceOpControllable
-
recalcPhysicalLimits
- Specified by:
recalcPhysicalLimitsin interfaceOpControllable
-
setReleaseElementId
public void setReleaseElementId(int elementId) index of release element this contrable is associated with- Specified by:
setReleaseElementIdin interfaceOpControllable
-
getElementIndex
public int getElementIndex()returns the index of the Element refered to by this object -
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 classNamedType- 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 classNamedType- 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
-