Package hec.rss.model

Class SystemPwrGenerationPattern

java.lang.Object
hec.rss.model.SystemPwrGenerationPattern
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable, Cloneable

public class SystemPwrGenerationPattern extends Object implements AsciiSerializable, Serializable, Cloneable

Title: HecJava Development

Description: This class represents a simple power generation pattern. The pattern defines how and when a power plant is active. The pattern can either be adjusted by scaling or sliding to meet a given power requirement. If the power generation is greater than the maximum capacity of the plant then the pattern is expanded to make up for the clipping that will take place.

Copyright: Copyright (c) 2003

Company:

See Also:
  • Field Details

  • Constructor Details

    • SystemPwrGenerationPattern

      public SystemPwrGenerationPattern()
  • Method Details

    • getPatternForDay

      public boolean getPatternForDay(int dayofweek, double[] daypattern)
      fills the given double array with the pattern factors for the given day
      Parameters:
      dayofweek - integer indicating day of week (Sunday = 1)
      daypattern - a double array of size 24
    • getPwrPatternAdjustMethod

      public int getPwrPatternAdjustMethod()
      This returns the flag telling what type of power pattern adjustment method is used. The adjustment methods are either SCALE or SLIDE.
      Returns:
    • setPwrPatternAdjustMethod

      public void setPwrPatternAdjustMethod(int adjustMethod)
      Sets the power adjustmentMethod. The adjustment method is either PATTERN_ADJUST_SCALE or PATTERN_ADJUST_SLIDE. The scaling method scales the pattern to meet a certain power requirement, while the sliding method slided the pattern up or down to meet the power requirement.
      Parameters:
      adjustMethod -
    • getPwrGenPatternType

      public int getPwrGenPatternType()
      Returns the type of power generation pattern this model uses. It is either a DAY, ALL_WEEK, or WEEK_DAY_END.
      Returns:
    • setPwrGenPatternType

      public void setPwrGenPatternType(int pwrGenType)
      Sets the type of power genearation pattern used. The pattern array is updated to match the power generation type.
      Parameters:
      type -
    • getPwrGenPattern

      public double[][] getPwrGenPattern()
      Returns a double array which represents the power generation pattern.
      Returns:
    • setPwrGenPattern

      public void setPwrGenPattern(double[][] pattern)
    • computePowerGenerationPattern

      public double[][] computePowerGenerationPattern(RunTimeStep rts, double powerReq, int summationType, double maxCap, double overUnderPower, double shouldHaveBeenComputed, int period, int dayOfPeriodStart)
      Creates a power generation pattern from a standard user entered power pattern for a given power requirement. The power generation pattern for each cell will never exceed the maximum capacity. Any overages will be distributed to other pattern columns until all of the overage is distributed or the pattern is completely filled to capacity.
      Parameters:
      rts - the current time step to retrieve the base pattern
      powerReq - the amount of power that the compute pattern must genearate
      summationType - defines if the total powerReq is needed over 1 day, a week, or a month. this defines how that scale or sliding factors are computed Valid values are PowerGenerationOptions.REQ_SPECIFIED_DAILY,..._WEEKLY,or ..._MONTHLY
      maxCap - the maximum capacity that each cell cannot be greater than
      overUnderPower - any additional power that must be added/subtracted from the power pattern after the time step to make up for any over/under generations prior to the time step.
      Returns:
      the new power generation pattern in element 0, element 1 is the pattern without any changes to make up for shortfalls or overages.
    • main

      public static void main(String[] args)
    • getNumberDaysInMonth

      protected static int getNumberDaysInMonth(int month, int year)
      Computes the number of days in a month. the integer parameter defines the month Jan = 0, Dec = 11;
    • 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
      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
      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
    • clone

      public Object clone()
      Overrides:
      clone in class Object