Package hec.rss.model

Class AdjustableParameter

java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.AdjustableParameter
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, RssReturnStatusConstants, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable
Direct Known Subclasses:
PumpAdjustableParameter, ReversiblePumpAdjustableParameter

public class AdjustableParameter extends NamedType implements RssReturnStatusConstants
See Also:
  • Constructor Details

    • AdjustableParameter

      public AdjustableParameter()
    • AdjustableParameter

      public AdjustableParameter(Function f)
  • Method Details

    • setValueTSContainer

      public void setValueTSContainer(doubleArrayContainer dac)
    • clone

      public Object clone()
      clone method
      Overrides:
      clone in class NamedType
    • setFunction

      public void setFunction(Function f)
    • setConstraints

      public void setConstraints(AdjustableParameter param)
    • sumConstraints

      public void sumConstraints(AdjustableParameter param)
    • initialize

      public void initialize()
    • getFunction

      public Function getFunction()
    • getCurrentValue

      public double getCurrentValue()
    • setCurrentValue

      public void setCurrentValue(double val)
    • setValueConstrained

      public double setValueConstrained(double val, double dtHours)
    • setValue

      public void setValue(double val)
    • testValue

      public double testValue(double val, RunTimeStep rts)
      tests the given value limited by physical constraints (dt is time step in seconds) this is used by the OpController when developing release decisions
      Returns:
      final value after limiting by constraints
    • getMaxByIROC

      public double getMaxByIROC(RunTimeStep rts)
      returns the Maximum limit based on increasing rate of change, or UNDEF_DOUBLE if no IROC is set
    • getMinByDROC

      public double getMinByDROC(RunTimeStep rts)
      returns the Minimum limit based on decreasing rate of change, or UNDEF_DOUBLE if no DROC is set
    • setValue

      public double setValue(double val, RunTimeStep rts, int numsteps)
      sets the current value limited by physical constraints (dt is time step in seconds)
      Returns:
      final value after limiting by constraints
    • getControlledValue

      public double getControlledValue(RunTimeStep runtime)
      asks for parameter value for Controller object
    • getValue

      public double getValue(RunTimeStep rts)
      new approach has opcontroller assigning values before this is called
    • getPreviousValue

      public double getPreviousValue(RunTimeStep rts)
    • setController

      public void setController(Controller con)
    • setOpController

      public void setOpController(OpController con)
    • setMinValue

      public void setMinValue(double val)
    • setMaxValue

      public void setMaxValue(double val)
    • setMaxRateOfIncrease

      public void setMaxRateOfIncrease(double val)
    • setMaxRateOfIncrease

      public void setMaxRateOfIncrease(hec.data.ParamDouble pd)
    • setMaxRateOfDecrease

      public void setMaxRateOfDecrease(double val)
    • setMaxRateOfDecrease

      public void setMaxRateOfDecrease(hec.data.ParamDouble pd)
    • getMinValue

      public double getMinValue()
    • getMaxValue

      public double getMaxValue()
    • getMaxRateOfIncrease

      public double getMaxRateOfIncrease()
    • getMaxRateOfIncrease

      public void getMaxRateOfIncrease(hec.data.ParamDouble pd)
    • getMaxRateOfDecrease

      public double getMaxRateOfDecrease()
    • getMaxRateOfDecrease

      public void getMaxRateOfDecrease(hec.data.ParamDouble pd)
    • setDefaultParameters

      public void setDefaultParameters()
      resets the parameters to default values
    • hasDefaultParameters

      public boolean hasDefaultParameters()
      test whether initialized parameter values have been changed
    • initCurrentLimits

      public int initCurrentLimits(RunTimeStep rts, int iteration)
      queries controlled element for current capacity
    • recalcCurrentLimitsInst

      public void recalcCurrentLimitsInst(RunTimeStep rts, double elev)
    • recalcCurrentLimits

      public void recalcCurrentLimits(RunTimeStep rts, double[] xt, double[] et, int tcnt)
    • getFieldObject

      public Object getFieldObject(Field fld)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Overrides:
      getFieldObject in class NamedType
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Overrides:
      setFieldObject in class NamedType
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful