Helper class for creating RandomParameter specifications for integer parameters.
More...
Helper class for creating RandomParameter specifications for integer parameters.
Provides convenient static methods to create parameter dictionaries with statistical distributions for integer-valued plant parameters.
Definition at line 154 of file PlantArchitecture.py.
|
| Dict[str, Any] | constant (int value) |
| | Create a constant (non-random) integer parameter.
|
| |
| Dict[str, Any] | uniform (int min_val, int max_val) |
| | Create a uniform distribution for integer parameter.
|
| |
| Dict[str, Any] | discrete (List[int] values) |
| | Create a discrete value distribution (random choice from list).
|
| |
◆ constant()
| Dict[str, Any] pyhelios.PlantArchitecture.RandomParameterInt.constant |
( |
int | value | ) |
|
|
static |
Create a constant (non-random) integer parameter.
- Parameters
-
| value | The constant integer value |
- Returns
- Dict with constant distribution specification
- Example
- >>> param = RandomParameterInt.constant(15) >>> # Returns: {'distribution': 'constant', 'parameters': [15.0]}
Definition at line 170 of file PlantArchitecture.py.
◆ discrete()
| Dict[str, Any] pyhelios.PlantArchitecture.RandomParameterInt.discrete |
( |
List[int] | values | ) |
|
|
static |
Create a discrete value distribution (random choice from list).
- Parameters
-
| values | List of possible integer values (equal probability) |
- Returns
- Dict with discrete distribution specification
- Exceptions
-
| ValueError | If values list is empty |
- Example
- >>> param = RandomParameterInt.discrete([1, 2, 3, 5]) >>> # Returns: {'distribution': 'discretevalues', 'parameters': [1.0, 2.0, 3.0, 5.0]}
Definition at line 213 of file PlantArchitecture.py.
◆ uniform()
| Dict[str, Any] pyhelios.PlantArchitecture.RandomParameterInt.uniform |
( |
int | min_val, |
|
|
int | max_val ) |
|
static |
Create a uniform distribution for integer parameter.
- Parameters
-
| min_val | Minimum value (inclusive) |
| max_val | Maximum value (inclusive) |
- Returns
- Dict with uniform distribution specification
- Exceptions
-
| ValueError | If min_val > max_val |
- Example
- >>> param = RandomParameterInt.uniform(10, 20) >>> # Returns: {'distribution': 'uniform', 'parameters': [10.0, 20.0]}
Definition at line 191 of file PlantArchitecture.py.
The documentation for this class was generated from the following file: