0.1.13
Loading...
Searching...
No Matches
pyhelios.PlantArchitecture.RandomParameter Class Reference

Helper class for creating RandomParameter specifications for float parameters. More...

Detailed Description

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.

Static Public Member Functions

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.
 

Member Function Documentation

◆ constant()

Dict[str, Any] pyhelios.PlantArchitecture.RandomParameter.constant ( float value)
static

Create a constant (non-random) parameter.

Parameters
valueThe constant value
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
meanMean value
std_devStandard deviation
Returns
Dict with normal distribution specification
Exceptions
ValueErrorIf std_dev < 0
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_valMinimum value
max_valMaximum value
Returns
Dict with uniform distribution specification
Exceptions
ValueErrorIf 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
shapeShape parameter (k)
scaleScale parameter (λ)
Returns
Dict with Weibull distribution specification
Exceptions
ValueErrorIf 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: