Enum Class Labour
- All Implemented Interfaces:
Serializable, Comparable<Labour>, Constable, microsim.statistics.regression.IntegerValuedEnum
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow realised (non-representative) hours are drawn within a bracket when continuous hours are on.Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic LabourconvertHoursToLabour(double hoursWorked) Converts hours worked (double) to the corresponding labour category.static LabourconvertHoursToLabour(int hoursWorked) Converts hours worked (int) to the corresponding labour category.intGets the hours of work based on the labour category and the person's draw from the uniform distribution.intThis bracket's representative hours, used to score the labour-supply choice.intgetValue()static LabourReturns the enum constant of this class with the specified name.static Labour[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ZERO
-
TEN
-
TWENTY
-
THIRTY
-
THIRTY_EIGHT
-
FORTY_FIVE
-
FIFTY_FIVE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public int getValue()- Specified by:
getValuein interfacemicrosim.statistics.regression.IntegerValuedEnum
-
getRepresentativeHours
public int getRepresentativeHours()This bracket's representative hours, used to score the labour-supply choice. -
convertHoursToLabour
Converts hours worked (int) to the corresponding labour category.- Parameters:
hoursWorked- The hours worked.- Returns:
- The labour category.
-
convertHoursToLabour
Converts hours worked (double) to the corresponding labour category.- Parameters:
hoursWorked- The hours worked.- Returns:
- The labour category.
-
getHours
Gets the hours of work based on the labour category and the person's draw from the uniform distribution. While Parameters.useRepresentativeHoursInUtility is true and the person's labour-supply choice is being evaluated (Person.isEvaluatingLabourChoice), returns this bracket's representative hours, so the choice is scored consistently across persons regardless of their individually drawn hours. Otherwise, if discretized hours are used, returns the representative hours. If continuous hours are used, returns realised hours drawn according to distributionOption, within minBound and maxBound. Note: ZERO category always returns 0 hours of work, irrespective of any of the above.- Parameters:
person- The person for whom the hours are calculated.- Returns:
- The calculated hours of work.
-