Package hec.rss.model

Class SystemHydropowerRule

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, TSLocation, AltInputReportInfc, RssModelVariableConstants, RssReturnStatusConstants, RssTSLocation, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable

public class SystemHydropowerRule extends OpRule
System Hydropower Parent Rule
See Also:
  • Field Details

  • Constructor Details

    • SystemHydropowerRule

      public SystemHydropowerRule()
      Constructor for the SystemHydropowerRule object
  • Method Details

    • getRuleLimitType

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

      public ReservoirElement[] getReservoirArray()
    • evaluateSysLimits

      public void evaluateSysLimits(RunTimeStep rts, int iter)
    • getReservoirs

      public List<ReservoirElement> getReservoirs(List<ReservoirElement> resList)
      add the list of reservoirs that operate for this rule to the given list. if the list is null, a new list is created. must have initialized this rule before calling this method to get correct list of reservoirs.
    • addChildRule

      public void addChildRule(SystemHydropowerOpRule rule, int resIdx)
    • getChildRule

      public SystemHydropowerOpRule getChildRule(int resIdx)
    • getPeriodSteps

      public int getPeriodSteps()
    • evaluateLimits

      public void evaluateLimits(RunTimeStep rts, int iteration)
      evaluate the reguired energy generation for each managed reservoir for the given time step. Called from RssSystem.evaluateRuleLimits(). initOperationStep must have been called before calling this method during the given time step
      Overrides:
      evaluateLimits in class OpRule
      Parameters:
      rts -
      iteration -
    • evaluateLimits33

      public void evaluateLimits33(RunTimeStep rts, int iteration)
      evaluate the reguired energy generation for each managed reservoir for the given time step. Called from RssSystem.evaluateRuleLimits(). initOperationStep must have been called before calling this method during the given time step
      Parameters:
      rts -
    • getReservoirGeneration

      protected double getReservoirGeneration(int resid)
      called by SystemHydropowerOpRule to retrieve the previously computed energy generation requirement
      Returns:
      required generation in MWH (may be undefined)
    • getResGenPattern

      public PowerGenerationPatternContainer getResGenPattern(int resid)
      returns the PowerGenerationPatternContainer for a specific reservoir id. returns null if not found.
      Parameters:
      resid -
      Returns:
    • getResGenPatternTableClone

      public Hashtable<Object,PowerGenerationPatternContainer> getResGenPatternTableClone()
      used by SystemHydropowerOpRule to get a deep copy of the reservoir generation pattern table
      Returns:
    • initForecast

      protected int initForecast(RunTimeWindow rtw)
      perform initialization prior to forecasting in RssSystem compute method
      Returns:
      RTN_NOPROBLEM if successful
    • initOperationStep

      public int initOperationStep(RunTimeStep rts)
      perform initialization prior to decision making for given time step in RssSystem compute method
      Returns:
      RTN_NOPROBLEM if successful
    • 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
    • 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()
      Gets the powerPatternContainer attribute of the SystemHydropowerRule object
      Returns:
      The powerPatternContainer value
    • getRequirementVariation

      public int getRequirementVariation()
      Returns the Power Generation required variation.
      Returns:
    • initializeCompute

      public boolean initializeCompute()
      Description copied from class: OpRule
      prep for compute
      Overrides:
      initializeCompute in class OpRule
    • setSystemHydropowerOpRule

      public void setSystemHydropowerOpRule(SystemHydropowerOpRule rule)
      Sets the systemHydropowerOpRule attribute of the SystemHydropowerRule object
      Parameters:
      rule - The new systemHydropowerOpRule value
    • usePlantFactor

      public boolean usePlantFactor()
      Is true if the monthly energy requirements are to be interpreted as Plant Factor. If false, interpret monthly values as MWh
      Returns:
      Description of the Return Value
    • useIndependantPowerRequirement

      public boolean useIndependantPowerRequirement()
      Description of the Method
      Returns:
      Description of the Return Value
    • useEnergyRequiredTimeSeries

      public boolean useEnergyRequiredTimeSeries()
      Description of the Method
      Returns:
      Description of the Return Value
    • setUseEnergyRequiredTimeSeries

      public void setUseEnergyRequiredTimeSeries(boolean use)
      Description of the Method
    • getDailyGenerationPattern

      public int getDailyGenerationPattern()
      Returns a value defining if the power generation pattern is either locally generated or specified. If it is specified then the System Power Generation Pattern data is used.
      Returns:
    • getMonthlyPowerRequirement

      public double[] getMonthlyPowerRequirement()
      Gets the monthlyPowerRequirement attribute of the SystemHydropowerRule object
      Returns:
      The monthlyPowerRequirement value
    • getSeasonalPowerRequirement

      public SeasonalRecord getSeasonalPowerRequirement()
      Gets the seasonalPowerRequirement attribute of the SystemHydropowerRule object
      Returns:
      The seasonalPowerRequirement value
    • getDayBelongsToTerm

      public int getDayBelongsToTerm()
      Gets the dayBelongsToTerm attribute of the SystemHydropowerRule object
      Returns:
      The dayBelongsToTerm value
    • getStartingDay

      public int getStartingDay()
      Gets the startingDay attribute of the SystemHydropowerRule object
      Returns:
      The startingDay value
    • getStartDayOfPeriod

      public int getStartDayOfPeriod()
      Gets the startDayOfPeriod attribute of the SystemHydropowerRule object
      Returns:
      The startDayOfPeriod value
    • getPowerReqSpecification

      public int getPowerReqSpecification()
      Gets the powerReqSpecification attribute of the SystemHydropowerRule object
      Returns:
      The powerReqSpecification value
    • 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.
      Returns:
      The generationPeriod value
    • getReservoirSystemIndicies

      public int[] getReservoirSystemIndicies()
      Gets the reservoirSystemIndicies attribute of the SystemHydropowerRule object
      Returns:
      The reservoirSystemIndicies value
    • copyChildInto

      public void copyChildInto(SystemHydropowerOpRule opRule)
      Copies the contents of a
      Parameters:
      opRule -
    • initialize

      public boolean initialize(RssSystem rssSystem)
      Description of the Method
      Parameters:
      rssSystem - Description of the Parameter
    • initForPostProcessing

      public boolean initForPostProcessing(RssSystem rssSystem)
      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.
      Returns:
      RTN_NOPROBLEM if successful
    • finalizeCompute

      public void finalizeCompute()
    • getTSRecordProxyVecResVar

      public void getTSRecordProxyVecResVar(Vector proxyList, int varid)
      Get TSRecordProxies for the Reservoir Variable time series managed by each associated child rule
      Parameters:
      proxyList - that will hold the set of TSRecordProxies
      varid - model variable id identifying the TSRecordProxy to retrieve
    • getTSRecordProxyResVar

      public TSRecordProxy getTSRecordProxyResVar(int ires, int varid)
      Get the TSRecordProxy for the Reservoir Variable time series managed by indicated child rule
      Parameters:
      ires - index of the associated reservoir child rule
      varid - model variable id identifying the TSRecordProxy to retrieve
    • getFieldObject

      public Object getFieldObject(Field fld)
      Gets the fieldObject attribute of the SystemHydropowerRule object
      Specified by:
      getFieldObject in interface FieldAccessor
      Overrides:
      getFieldObject in class OpRule
      Parameters:
      fld - Description of the Parameter
      Returns:
      The fieldObject value
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Sets the fieldObject attribute of the SystemHydropowerRule object
      Specified by:
      setFieldObject in interface FieldAccessor
      Overrides:
      setFieldObject in class OpRule
      Parameters:
      fld - The new fieldObject value
      fobj - The new fieldObject value
      Returns:
      Description of the Return Value