Trade Studies¶
Design of experiments, batch evaluation, and Pareto extraction for parametric trade studies.
Requirements Template¶
RequirementsTemplate
dataclass
¶
Defines parameter sweep ranges for DOE/trade studies.
Parameters are stored as (name, min, max) tuples describing the design space to explore.
Example
rt = RequirementsTemplate() rt.add("freq_hz", 10e9, 30e9) rt.add("tx_power_w", 10.0, 200.0) space = rt.to_parameter_space()
add
¶
Add a parameter with its range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Parameter name (must be unique). |
required |
lo
|
float
|
Lower bound of the sweep range. |
required |
hi
|
float
|
Upper bound of the sweep range. |
required |
Source code in src/opensatcom/trades/requirements.py
to_parameter_space
¶
Return the parameter space as a dict of (min, max) tuples.
Returns:
| Type | Description |
|---|---|
dict of str to tuple of (float, float)
|
Parameter names mapped to |
Source code in src/opensatcom/trades/requirements.py
Design of Experiments¶
DesignOfExperiments
¶
Generate parameter combinations for trade study evaluation.
Supports Latin Hypercube Sampling (LHS), full factorial, and random sampling.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter_space
|
dict[str, tuple[float, float]]
|
Parameter names mapped to (min, max) ranges. |
required |
Source code in src/opensatcom/trades/doe.py
generate
¶
Generate parameter combinations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_samples
|
int
|
Number of design points. |
required |
method
|
str
|
Sampling method: "lhs", "random", or "full_factorial". |
'lhs'
|
seed
|
int
|
Random seed for reproducibility. |
42
|
Source code in src/opensatcom/trades/doe.py
lhs
¶
Latin Hypercube Sampling using scipy.
Source code in src/opensatcom/trades/doe.py
random
¶
Uniform random sampling.
Source code in src/opensatcom/trades/doe.py
full_factorial
¶
Full factorial design with equal levels per parameter.
Source code in src/opensatcom/trades/doe.py
Batch Runner¶
BatchRunner
¶
Evaluates a DataFrame of parameter cases against a base config.
Each row in the cases DataFrame represents a parameter combination. The runner modifies the base config for each case, evaluates a link budget, and collects results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_config_path
|
str | None
|
Path to base YAML config. If None, a minimal default is used. |
None
|
Source code in src/opensatcom/trades/batch.py
run
¶
Run batch evaluation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cases_df
|
DataFrame
|
Parameter combinations. Columns map to config fields. |
required |
base_config
|
dict | None
|
Base configuration dict to override with case parameters. |
None
|
parallel
|
bool
|
Use multiprocessing for parallel evaluation. |
False
|
Source code in src/opensatcom/trades/batch.py
Pareto Extraction¶
pareto
¶
Pareto front extraction and plotting for trade studies.
extract_pareto_front
¶
Extract the Pareto-optimal (non-dominated) front from results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
Results DataFrame. |
required |
x_col
|
str
|
Column name for x-axis objective. |
required |
y_col
|
str
|
Column name for y-axis objective. |
required |
minimize_x
|
bool
|
Whether x should be minimized (True) or maximized (False). |
True
|
minimize_y
|
bool
|
Whether y should be minimized (True) or maximized (False). |
False
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Subset of df containing only Pareto-optimal points. |
Source code in src/opensatcom/trades/pareto.py
plot_pareto
¶
Create a scatter plot with Pareto front highlighted.
Returns matplotlib Figure.