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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()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.getFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.protected static intgetNumberDaysInMonth(int month, int year) Computes the number of days in a month.booleangetPatternForDay(int dayofweek, double[] daypattern) fills the given double array with the pattern factors for the given daydouble[][]Returns a double array which represents the power generation pattern.intReturns the type of power generation pattern this model uses.intThis returns the flag telling what type of power pattern adjustment method is used.static voidbooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetPwrGenPattern(double[][] pattern) voidsetPwrGenPatternType(int pwrGenType) Sets the type of power genearation pattern used.voidsetPwrPatternAdjustMethod(int adjustMethod) Sets the power adjustmentMethod.
-
Field Details
-
PATTERN_ADJUST_SLIDE
public static final int PATTERN_ADJUST_SLIDE- See Also:
-
PATTERN_ADJUST_SCALE
public static final int PATTERN_ADJUST_SCALE- See Also:
-
POWER_GEN_DAY
public static final int POWER_GEN_DAY- See Also:
-
POWER_GEN_ALL_WEEK
public static final int POWER_GEN_ALL_WEEK- See Also:
-
POWER_GEN_WEEK_DAY_END
public static final int POWER_GEN_WEEK_DAY_END- See Also:
-
-
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 patternpowerReq- the amount of power that the compute pattern must genearatesummationType- 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 ..._MONTHLYmaxCap- the maximum capacity that each cell cannot be greater thanoverUnderPower- 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
-
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
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- 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- 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
-
clone
-