Package hec.rss.model

Class ScheduledHydropowerOpRule

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, TSLocation, DemandRuleInf, PowerGenerationOptions, AltInputReportInfc, RssModelVariableConstants, RssReturnStatusConstants, RssTSLocation, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable
Direct Known Subclasses:
FirmEnergyOpRule, PeakingPowerTsOpRule, PowerGuideCurveOpRule

public class ScheduledHydropowerOpRule extends OpRule implements AsciiSerializable, Serializable, Cloneable, PowerGenerationOptions, DemandRuleInf
See Also:
  • Field Details

    • UNDEFINED

      public static final int UNDEFINED
      See Also:
    • m_independantPowerReq

      protected boolean m_independantPowerReq
      The following stuff is common to the SystemHydropowerOpRule. Might want to think about putting in a supper class.
    • m_usePlantFactor

      protected boolean m_usePlantFactor
    • m_systemPwrGenSeasonal

      protected boolean m_systemPwrGenSeasonal
    • m_patternContainer

      protected PowerGenerationPatternContainer m_patternContainer
    • _seasonalPowerRequirement

      protected SeasonalRecord _seasonalPowerRequirement
    • m_powerReqVariation

      protected int m_powerReqVariation
    • m_powerReqSpecifiedAs

      protected int m_powerReqSpecifiedAs
    • m_startingDay

      protected int m_startingDay
    • m_dayBelongsToTerm

      protected int m_dayBelongsToTerm
    • m_startDayOfPeriod

      protected int m_startDayOfPeriod
    • m_generationPeriod

      protected int m_generationPeriod
    • _plantList

      protected transient List<PowerPlant> _plantList
  • Constructor Details

    • ScheduledHydropowerOpRule

      public ScheduledHydropowerOpRule()
    • ScheduledHydropowerOpRule

      public ScheduledHydropowerOpRule(String name)
  • Method Details

    • getTargetTSRecordProxy

      public TSRecordProxy getTargetTSRecordProxy()
      returns the TSRecordProxy for the time series that is the target for this rule operation. Comparison of the target to the rule limit allows determination as to whether the rule was satisfied.
      Overrides:
      getTargetTSRecordProxy in class OpRule
    • evaluateLimits

      public void evaluateLimits(RunTimeStep rts, int iteration)
      calculates the limiting value for this rule for the given time step. as of 12/04
      Overrides:
      evaluateLimits in class OpRule
      Parameters:
      rts -
      iteration -
    • getOpValue

      public OpValue getOpValue(RunTimeStep rts)
      returns the operation value based on the previously computed rule limit. As of 12/04
      Overrides:
      getOpValue in class OpRule
      Parameters:
      rts -
      Returns:
    • getPowerOpValue

      public OpValue getPowerOpValue(RunTimeStep rts)
      Overrides:
      getPowerOpValue in class OpRule
    • evaulatePerformance

      public void evaulatePerformance(RunTimeWindow rtw)
      post processing immediately following compute to evalute performance
      Overrides:
      evaulatePerformance in class OpRule
      Parameters:
      rtw -
    • getPowerPatternContainer

      public PowerGenerationPatternContainer getPowerPatternContainer()
    • setRequirementVariation

      public void setRequirementVariation(int var)
      Sets the Power Generation required variation. It is either SEASONAL or MONTHLY. A IllegalArgumentException is thrown if the input value is not recognized.
      Specified by:
      setRequirementVariation in interface PowerGenerationOptions
      Parameters:
      var -
    • getRequirementVariation

      public int getRequirementVariation()
      Returns the Power Generation required variation.
      Specified by:
      getRequirementVariation in interface PowerGenerationOptions
      Returns:
    • setStartingDay

      public void setStartingDay(int startDay)
      Specified by:
      setStartingDay in interface PowerGenerationOptions
    • getStartingDay

      public int getStartingDay()
      Specified by:
      getStartingDay in interface PowerGenerationOptions
    • getDayBelongsToTerm

      public int getDayBelongsToTerm()
      Specified by:
      getDayBelongsToTerm in interface PowerGenerationOptions
    • setDayBelongsToTerm

      public void setDayBelongsToTerm(int startDay)
      Specified by:
      setDayBelongsToTerm in interface PowerGenerationOptions
    • getStartDayOfPeriod

      public int getStartDayOfPeriod()
      Specified by:
      getStartDayOfPeriod in interface PowerGenerationOptions
    • setStartDayOfPeriod

      public void setStartDayOfPeriod(int startDay)
      Specified by:
      setStartDayOfPeriod in interface PowerGenerationOptions
    • setGenerationPeriod

      public void setGenerationPeriod(int period)
      Sets the way the model will attempt to meet the gereration requiremnt at period (TIME-STEP, DAILY, WEEKLY). The valid values are GENERATION_PERIOD_DAILY, GENERATION_PERIOD_TIMESTEP, invalid input: '&' GENERATION_PERIOD_WEEKLY. If any other value is passed in, an illegal argument exception is thrown.
      Specified by:
      setGenerationPeriod in interface PowerGenerationOptions
      Parameters:
      period -
    • setPowerReqSpecification

      public void setPowerReqSpecification(int req)
      Sets a flag to show how the power requirement is specified. The ONLY valid values are plant factor, daily, weekly, monthly, seasonally. Used the defined constants for this class.
      Specified by:
      setPowerReqSpecification in interface PowerGenerationOptions
      Parameters:
      req -
    • getPowerReqSpecification

      public int getPowerReqSpecification()
      Specified by:
      getPowerReqSpecification in interface PowerGenerationOptions
    • getGenerationPeriod

      public int getGenerationPeriod()
      Sets the way the model will attempt to meet the gereration requiremnt at period (TIME-STEP, DAILY, WEEKLY). The valid values are GENERATION_PERIOD_DAILY, GENERATION_PERIOD_TIMESTEP, invalid input: '&' GENERATION_PERIOD_WEEKLY. If any other value is passed in, an illegal argument exception is thrown.
      Specified by:
      getGenerationPeriod in interface PowerGenerationOptions
    • initializeCompute

      public boolean initializeCompute()
      prep for compute
      Overrides:
      initializeCompute in class OpRule
    • evaluateRule

      public OpValue evaluateRule(RunTimeStep rts, double initialValue)
      compares the intial value to rule constraints and returns the adjusted value
      Overrides:
      evaluateRule in class OpRule
    • getEnergyReguirement

      protected double getEnergyReguirement(RunTimeStep rts, double poolElevation)
      this should be overridden in subclass
    • getPowerPlantList

      protected List<PowerPlant> getPowerPlantList()
      Get the power plant associated with this rule
    • getAdjustableFlow

      protected AdjustableFlow getAdjustableFlow()
      Get the power plant associated with this rule
    • getMonthlyEnergyCapacity

      public double getMonthlyEnergyCapacity(int imonth)
      Return the plant capacity * hours in the month in MWh
    • clone

      public Object clone()
      Description copied from class: RssTSLocationObject
      clone method
      Overrides:
      clone in class OpRule
    • getLastDayOfMonth

      protected static int getLastDayOfMonth(HecTime hecTime)
      return the last day for the calendar month
    • getRuleLimitType

      public int getRuleLimitType()
      get the limit type of this rule should be implemented by all subclasses of OpRule
      Overrides:
      getRuleLimitType in class OpRule
    • getActiveTSRecordProxies

      public Vector getActiveTSRecordProxies(Vector vec, int iotype)
      add the time series record proxies associated current compute
      Overrides:
      getActiveTSRecordProxies in class OpRule
    • updateTSProxyList

      public void updateTSProxyList()
      Regenerates the list of all TSProxies required for this location. This list includes all records that are generated by this function even if the records are held in another objects (e.g. RssNode) proxy list
      Overrides:
      updateTSProxyList in class OpRule
    • 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 OpRule
      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 OpRule
      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
    • outputReport

      public void outputReport(AlternativeInputReport report, org.jdom.Element elem)
      Description copied from interface: AltInputReportInfc
      Alternative Input Report Interface for data.
      Specified by:
      outputReport in interface AltInputReportInfc
      Overrides:
      outputReport in class OpRule
    • getWaterAccount

      public WaterAccount getWaterAccount()
      Description copied from interface: DemandRuleInf
      Gets the water account.
      Specified by:
      getWaterAccount in interface DemandRuleInf
      Returns:
      the water account
    • setWaterAccount

      public void setWaterAccount(WaterAccount wa)
      Description copied from interface: DemandRuleInf
      Sets the water account.
      Specified by:
      setWaterAccount in interface DemandRuleInf
      Parameters:
      wa - the new water account