Package hec.rss.model
Class ResSystemOpSet
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.ResSystemOpSet
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,AltInputReportInfc,Serializable,Cloneable,Comparable,Observer,rma.lang.Modifiable
public class ResSystemOpSet
extends NamedType
implements AsciiSerializable, Serializable, AltInputReportInfc
The object represents the Operational model for a System of Reservoirs. The set of
reservoirs acts as one giant reservoir. ResSystemOpSet allows the setting of operational
rules and storage zones as a whole, which are defined by each individual reservoir
- See Also:
-
Field Summary
Fields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor.ResSystemOpSet(int idx, String name, String description) -
Method Summary
Modifier and TypeMethodDescriptionaddNewSystemStorageZone(String name, String description) Creates a new SystemStorageZone, adds it to the internal list of storageZones are returns a reference to the caller.voidaddReservoirOpSet(OpSet opSet) Creates a reference to a reservoir opset.voidAddes the space for reservoir data.clone()Returns copy of this ResSystemOpSet.voidCopies the SystemStorageZones from the opSet parameter.voidDeletes OpSetRef's that reference and operation set in the given reservoirvoiddeleteOpSetRefByReservoirID(int resID) Deletes OpSetRef's that reference and operation set in the reservoir indexed by the given IDvoiddeleteReservoirReferences(int reservoirID) Deletes all refenences to a reservoir in this System Operation Set.voiddeleteSystemStorageZone(int id) Deletes a zone from the Reservoir System Operation Set.booleanTests to see if there is a storage zone in this System Operation Set with this name.getFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.doublegetMaxReservoirStorage(int resid) Get the the largest storage value defined in each reservoirdoubleGet the maxium total system storage based on the largest storage value defined in each reservoirintCalculates the next index value for a storage zoneOpSetRef[]Returns an array of reservoir opset references.getOpSetReferences(int id) Returns an opset refefence represented by the given ID.getOpSetReferences(ReservoirElement resElem) Returns an opset reference for a given Reservoir Element.getReservoir(int id) Returns the resevoir for the given reservoir ID.double[][]getResStoragePattern(HecTime htime) Get the table of reservoir storage vs system storage for the given time.doublegetResZoneStorage(HecTime htime, int syszoneId, int resid) Get the total storage for the a system storage zone at a specific time.getStorageZone(int id) get an existing storage zone by idgetStorageZone(String name) get an existing storage zone by nameint[]Returns the list of IDs for all SystemStorageZones owned by this SystemOpSet.doublegetSysZoneStorage(HecTime htime, int syszoneId) Get the total storage for the a system storage zone at a specific time.voidoutputReport(AlternativeInputReport report, org.jdom.Element elem) Alternative Input Report Interface for data.voidremoveAllRuleRef(SystemOpRule rule) Deletes all SystemOpRule References for the specified RulevoidremoveRuleRef(SystemStorageZone zone, SystemOpRule rule) Deletes a rule reference for a given zonebooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetParent(ReservoirSysOp sysOp) Sets the parent or owner of this Operation Set.toString()Returns the name of this object.Methods 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, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Constructor Details
-
ResSystemOpSet
public ResSystemOpSet()Default Constructor. Mostly for the Ascii Serializer() -
ResSystemOpSet
-
-
Method Details
-
getSysZoneStorage
Get the total storage for the a system storage zone at a specific time.- Parameters:
htime- HecTime for which the storage value is to be determinedsyszoneid- index of the SystemStorageZone- Returns:
- system zone storage value
-
getResZoneStorage
Get the total storage for the a system storage zone at a specific time.- Parameters:
htime- HecTime for which the storage value is to be determinedsyszoneId- index of the SystemStorageZoneresid- index of the ReservoirElement- Returns:
- reservoir zone stoage value
-
getMaxSystemStorage
public double getMaxSystemStorage()Get the maxium total system storage based on the largest storage value defined in each reservoir- Returns:
- maximum system storage
-
getMaxReservoirStorage
public double getMaxReservoirStorage(int resid) Get the the largest storage value defined in each reservoir- Returns:
- maximum reservoir storage
-
getSystemStorageDefinition
-
getResStoragePattern
Get the table of reservoir storage vs system storage for the given time.- Parameters:
htime- Hectime at which the table is to be developed- Returns:
- two dimensional double array where there is one column (2nd array index)
-
setParent
Sets the parent or owner of this Operation Set. The parent will be some ReservoirSysOp -
getReservoirSystemOp
-
getReservoir
Returns the resevoir for the given reservoir ID. -
clone
Returns copy of this ResSystemOpSet. A deep copy is performed so all memebers are cloned. The pointer to the parent is passed by reference to the clone. Both this object and the clone object will point to the same owner. -
copySystemStorageZones
Copies the SystemStorageZones from the opSet parameter. A shallow copy is made. -
deleteSystemStorageZone
public void deleteSystemStorageZone(int id) Deletes a zone from the Reservoir System Operation Set. The id parameter specifies the ID of the System Storage Zone to Delete -
addNewSystemStorageZone
Creates a new SystemStorageZone, adds it to the internal list of storageZones are returns a reference to the caller. -
getStorageZone
get an existing storage zone by id -
getStorageZone
get an existing storage zone by name -
getStorageZoneIDs
public int[] getStorageZoneIDs()Returns the list of IDs for all SystemStorageZones owned by this SystemOpSet. The result is never null. -
doesStorageZoneNameExist
Tests to see if there is a storage zone in this System Operation Set with this name. Storage Zone names should be unique. Returns true if one exists and false other wise -
removeRuleRef
Deletes a rule reference for a given zone -
removeAllRuleRef
Deletes all SystemOpRule References for the specified Rule -
getNextStorageZoneIndex
public int getNextStorageZoneIndex()Calculates the next index value for a storage zone -
addReservoirReferenceSpace
public void addReservoirReferenceSpace()Addes the space for reservoir data. This usually happens when a reservoir is added to the system and everything needs to be updated. -
deleteReservoirReferences
public void deleteReservoirReferences(int reservoirID) Deletes all refenences to a reservoir in this System Operation Set. This includes all Reservoir Op Set referenecs, Storage Zone References, and %Storage in the system -
getOpSetReferenceArray
Returns an array of reservoir opset references. The return array is guaranteed to be not null. -
getOpSetReferences
Returns an opset refefence represented by the given ID. Returns null if to OpSet Reference exists- See Also:
-
deleteOpSetRefByReservoir
Deletes OpSetRef's that reference and operation set in the given reservoir -
deleteOpSetRefByReservoirID
public void deleteOpSetRefByReservoirID(int resID) Deletes OpSetRef's that reference and operation set in the reservoir indexed by the given ID -
getOpSetReferences
Returns an opset reference for a given Reservoir Element. Each one of the opset references in this object is owned by a given reservoir element. This is just a method to do a reverse look up. This method returns null if no opset is found for a given ReservoirElement- Parameters:
hec- .rss.model.ReservoirElement- See Also:
-
addReservoirOpSet
Creates a reference to a reservoir opset. This is needed because storage zones allocate a column of data for a reservoir based on the OperationSet -
toString
Returns the name of this object. Useful for putting this object into dialog components -
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
-
outputReport
Description copied from interface:AltInputReportInfcAlternative Input Report Interface for data.- Specified by:
outputReportin interfaceAltInputReportInfc
-