Helper class for creating RandomParameter specifications for float parameters.
More...
Helper class for creating RandomParameter specifications for float parameters.
Provides convenient static methods to create parameter dictionaries with statistical distributions for plant architecture modeling.
Definition at line 57 of file PlantArchitecture.py.
|
| Dict[str, Any] | constant (float value) |
| | Create a constant (non-random) parameter.
|
| |
| Dict[str, Any] | uniform (float min_val, float max_val) |
| | Create a uniform distribution parameter.
|
| |
| Dict[str, Any] | normal (float mean, float std_dev) |
| | Create a normal (Gaussian) distribution parameter.
|
| |
| Dict[str, Any] | weibull (float shape, float scale) |
| | Create a Weibull distribution parameter.
|
| |
◆ constant()
| Dict[str, Any] pyhelios.PlantArchitecture.RandomParameter.constant |
( |
float | value | ) |
|
|
static |
Create a constant (non-random) parameter.
- Parameters
-
- Returns
- Dict with constant distribution specification
- Example
- >>> param = RandomParameter.constant(45.0) >>> # Returns: {'distribution': 'constant', 'parameters': [45.0]}
Definition at line 73 of file PlantArchitecture.py.
◆ normal()
| Dict[str, Any] pyhelios.PlantArchitecture.RandomParameter.normal |
( |
float | mean, |
|
|
float | std_dev ) |
|
static |
Create a normal (Gaussian) distribution parameter.
- Parameters
-
| mean | Mean value |
| std_dev | Standard deviation |
- Returns
- Dict with normal distribution specification
- Exceptions
-
- Example
- >>> param = RandomParameter.normal(45.0, 5.0) >>> # Returns: {'distribution': 'normal', 'parameters': [45.0, 5.0]}
Definition at line 117 of file PlantArchitecture.py.
◆ uniform()
| Dict[str, Any] pyhelios.PlantArchitecture.RandomParameter.uniform |
( |
float | min_val, |
|
|
float | max_val ) |
|
static |
Create a uniform distribution parameter.
- Parameters
-
| min_val | Minimum value |
| max_val | Maximum value |
- Returns
- Dict with uniform distribution specification
- Exceptions
-
| ValueError | If min_val > max_val |
- Example
- >>> param = RandomParameter.uniform(40.0, 50.0) >>> # Returns: {'distribution': 'uniform', 'parameters': [40.0, 50.0]}
Definition at line 94 of file PlantArchitecture.py.
◆ weibull()
| Dict[str, Any] pyhelios.PlantArchitecture.RandomParameter.weibull |
( |
float | shape, |
|
|
float | scale ) |
|
static |
Create a Weibull distribution parameter.
- Parameters
-
| shape | Shape parameter (k) |
| scale | Scale parameter (λ) |
- Returns
- Dict with Weibull distribution specification
- Exceptions
-
| ValueError | If shape or scale <= 0 |
- Example
- >>> param = RandomParameter.weibull(2.0, 50.0) >>> # Returns: {'distribution': 'weibull', 'parameters': [2.0, 50.0]}
Definition at line 140 of file PlantArchitecture.py.
The documentation for this class was generated from the following file: