Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
ed6707a
Add `_spec.md`
smondal13 Jan 14, 2026
eed6329
Add `optimize_experiment()`
smondal13 Jan 14, 2026
4861662
Add `experiment_list` in the `__init__` and a `DeprecationWarning`if …
smondal13 Jan 14, 2026
bf5eb91
Rename finite difference `scenario_blocks` to `fd_scenario_blocks` an…
smondal13 Jan 14, 2026
f70e461
Add new objective method for multiple experiment.
smondal13 Jan 14, 2026
7c7332b
Add complete `doe.py` for multi experiment without testing /example
smondal13 Jan 15, 2026
f5ba35e
Solve the `optimize_experiments()` for both 1 and 2 experiment case u…
smondal13 Jan 15, 2026
79d09cc
Solve `doe/examples/rooney_biegler_multiexperiment.py` and `reactor_m…
smondal13 Jan 15, 2026
fc0f8a5
Add plot and the grid best and optimal point points to the same point
smondal13 Jan 15, 2026
1a80a6c
Add minor changes
smondal13 Jan 17, 2026
948e77c
Merge branch 'change-a-optimality' into add-multiexperiment-and-param…
smondal13 Jan 29, 2026
b83ce4f
Add trace objective
smondal13 Jan 29, 2026
63488f0
Merge branch 'add-comp-efficient-tests' into add-multiexperiment-and-…
smondal13 Jan 29, 2026
6a53dc9
Resolve the test failing issue for `scenario_blocks` does not exist.
smondal13 Jan 29, 2026
4fa587c
Correct docstring
smondal13 Jan 29, 2026
422f0c2
Add `trace` and `pseudo_trace` in the plotting function for multiexpe…
smondal13 Jan 29, 2026
4bb38dc
A-optimality gives different results for rooney_biegler_multiexperime…
smondal13 Jan 29, 2026
974598b
Add new directory for multiexperiment protype examples
smondal13 Jan 29, 2026
c38875b
Solve the error FIM not positive definite when prior_FIM is passed
smondal13 Jan 30, 2026
62f28ed
Solve `rooney_biegler_multiexperiment.py`
smondal13 Jan 30, 2026
42b8744
Add FIM prior in multiexperiment
smondal13 Feb 2, 2026
26ea0a6
Add `multiexperiment_prototype.ipynb` that gives the same result from…
smondal13 Feb 2, 2026
cb19d00
When no prior was used, D-opt and trace FIM gave he same result, but …
smondal13 Feb 2, 2026
e56276a
Solve 2 experiment case with same result from both grid and optimization
smondal13 Feb 2, 2026
0f7cc9e
Merge branch 'Pyomo:main' into add-multiexperiment
smondal13 Feb 6, 2026
03bfb89
Add `local_name` of sym_break_cons
smondal13 Feb 6, 2026
e9d33b7
Add log10 codiition number
smondal13 Feb 13, 2026
0833295
Add `lhs` iniatialization method and test
smondal13 Feb 23, 2026
ca0a4dd
Add tests for optimize_experiments(). All tests passed
smondal13 Feb 23, 2026
02aa81a
Remove cherry-picked example artifacts from DOE test changes
smondal13 Feb 23, 2026
d1493a5
Add more tests for warnings, combinations
smondal13 Feb 23, 2026
802438b
Refactor result dict in `optimize_experiments()`
smondal13 Feb 23, 2026
5ae8280
Add test of opt values with hardcoded values
smondal13 Feb 23, 2026
476bc09
Going through`optimize_experiments`
smondal13 Feb 25, 2026
fe6ef62
Add parallel algorithm for initialization
smondal13 Feb 25, 2026
3879b1c
Enhance LHS initialization with diagnostics and parallel processing i…
smondal13 Feb 25, 2026
73d9387
Enhance diagnostics and error handling in LHS initialization; add tes…
smondal13 Feb 25, 2026
2f1f5a1
Enhance error handling and diagnostics in optimize_experiments; add c…
smondal13 Feb 26, 2026
7913222
Improve optimize_experiments robustness and docs
smondal13 Feb 26, 2026
65cc0cc
Refine optimize_experiments validation and review tracking
smondal13 Feb 26, 2026
72dd1eb
Enhance DesignOfExperiments with parallel processing for LHS scoring …
smondal13 Feb 26, 2026
ce032b5
Refactor DesignOfExperiments for improved LHS sampling and error hand…
smondal13 Feb 27, 2026
845de61
Refactor DesignOfExperiments to improve Cholesky rule handling and en…
smondal13 Feb 27, 2026
05097d5
Enhance DesignOfExperiments with timeout handling for LHS FIM evaluat…
smondal13 Feb 27, 2026
c386945
Clean up the branch by removing the `.md` scripts
smondal13 Mar 2, 2026
859e214
Add `_spec.md`
smondal13 Jan 14, 2026
6f401ad
Add `optimize_experiment()`
smondal13 Jan 14, 2026
ce305a6
Add `experiment_list` in the `__init__` and a `DeprecationWarning`if …
smondal13 Jan 14, 2026
72df8e1
Rename finite difference `scenario_blocks` to `fd_scenario_blocks` an…
smondal13 Jan 14, 2026
dd86620
Add new objective method for multiple experiment.
smondal13 Jan 14, 2026
bcc833a
Add complete `doe.py` for multi experiment without testing /example
smondal13 Jan 15, 2026
82a8aad
Solve the `optimize_experiments()` for both 1 and 2 experiment case u…
smondal13 Jan 15, 2026
336ea3a
Solve `doe/examples/rooney_biegler_multiexperiment.py` and `reactor_m…
smondal13 Jan 15, 2026
2fda230
Add plot and the grid best and optimal point points to the same point
smondal13 Jan 15, 2026
da15eef
Add minor changes
smondal13 Jan 17, 2026
d5a2411
Add trace objective
smondal13 Jan 29, 2026
bb65dcf
Resolve the test failing issue for `scenario_blocks` does not exist.
smondal13 Jan 29, 2026
40381f7
Correct docstring
smondal13 Jan 29, 2026
786d8dd
Add `trace` and `pseudo_trace` in the plotting function for multiexpe…
smondal13 Jan 29, 2026
5947553
A-optimality gives different results for rooney_biegler_multiexperime…
smondal13 Jan 29, 2026
2919813
Add new directory for multiexperiment protype examples
smondal13 Jan 29, 2026
f37bc1d
Solve the error FIM not positive definite when prior_FIM is passed
smondal13 Jan 30, 2026
3338e8b
Solve `rooney_biegler_multiexperiment.py`
smondal13 Jan 30, 2026
0b2e546
Add FIM prior in multiexperiment
smondal13 Feb 2, 2026
490f8fe
Add `multiexperiment_prototype.ipynb` that gives the same result from…
smondal13 Feb 2, 2026
a9287e2
When no prior was used, D-opt and trace FIM gave he same result, but …
smondal13 Feb 2, 2026
afa7090
Solve 2 experiment case with same result from both grid and optimization
smondal13 Feb 2, 2026
e1db056
Add `local_name` of sym_break_cons
smondal13 Feb 6, 2026
6a429d2
Add log10 codiition number
smondal13 Feb 13, 2026
995f137
Add `lhs` iniatialization method and test
smondal13 Feb 23, 2026
dbfc6ba
Add tests for optimize_experiments(). All tests passed
smondal13 Feb 23, 2026
a62a67b
Remove cherry-picked example artifacts from DOE test changes
smondal13 Feb 23, 2026
e17a896
Add more tests for warnings, combinations
smondal13 Feb 23, 2026
489be46
Refactor result dict in `optimize_experiments()`
smondal13 Feb 23, 2026
33b5e66
Add test of opt values with hardcoded values
smondal13 Feb 23, 2026
25752c0
Going through`optimize_experiments`
smondal13 Feb 25, 2026
5657dab
Add parallel algorithm for initialization
smondal13 Feb 25, 2026
60c4a96
Enhance LHS initialization with diagnostics and parallel processing i…
smondal13 Feb 25, 2026
e09d340
Enhance diagnostics and error handling in LHS initialization; add tes…
smondal13 Feb 25, 2026
b7111a3
Enhance error handling and diagnostics in optimize_experiments; add c…
smondal13 Feb 26, 2026
3df6c9a
Improve optimize_experiments robustness and docs
smondal13 Feb 26, 2026
0bfc396
Refine optimize_experiments validation and review tracking
smondal13 Feb 26, 2026
4e3b72d
Enhance DesignOfExperiments with parallel processing for LHS scoring …
smondal13 Feb 26, 2026
290747e
Refactor DesignOfExperiments for improved LHS sampling and error hand…
smondal13 Feb 27, 2026
c76632f
Refactor DesignOfExperiments to improve Cholesky rule handling and en…
smondal13 Feb 27, 2026
4041693
Enhance DesignOfExperiments with timeout handling for LHS FIM evaluat…
smondal13 Feb 27, 2026
6be8b2f
Clean up the branch by removing the `.md` scripts
smondal13 Mar 2, 2026
d6ee86b
Merge remote-tracking branch 'refs/remotes/origin/add-multiexperiment…
smondal13 Mar 2, 2026
77f6ff7
Refactor imports and clean up unused code in DoE modules and tests
smondal13 Mar 2, 2026
f542882
Refactor and enhance tests for optimize_experiments()
smondal13 Mar 2, 2026
74eb4bc
Refactor LHS initialization parameters in DesignOfExperiments and rel…
smondal13 Mar 2, 2026
eabc592
Add test for optimize_experiments with multi-experiment trace option
smondal13 Mar 2, 2026
fe72c91
Cleaned up prototype scripts
smondal13 Mar 2, 2026
edaae02
Add tests for JSON encoder and optimize_experiments error handling in…
smondal13 Mar 2, 2026
0d236c4
Refine DOE optimize_experiments test coverage
smondal13 Mar 2, 2026
adf7de2
Add more tests. Remove symmetry breaking constraint suffix for multi-…
smondal13 Mar 3, 2026
b4a50e3
Refactor DOE tests and remove deprecated multi-experiment test file
smondal13 Mar 3, 2026
faa689c
Run black
smondal13 Mar 3, 2026
eef390a
Update documentation and imports in DoE module for clarity and consis…
smondal13 Mar 3, 2026
280b01a
Run black
smondal13 Mar 3, 2026
c6be263
Refactor DesignOfExperiments to standardize initialization method nam…
smondal13 Mar 3, 2026
592d54c
Merge branch 'main' into add-multiexperiment
smondal13 Mar 6, 2026
1f8f016
Fix multi-experiment compute_FIM aggregation
smondal13 Mar 8, 2026
ff5e465
Merge branch 'add-multiexperiment' of github.com:smondal13/pyomo into…
smondal13 Mar 8, 2026
967e790
Run black
smondal13 Mar 9, 2026
8ee7b2b
Refactor `_enum_label` method placement and add review documentation …
smondal13 Mar 10, 2026
3c034b7
fix(doe): clarify lhs parallel fallback logs
smondal13 Mar 13, 2026
c4103d9
Remove the review file
smondal13 Mar 17, 2026
1518abe
Add comments to explain the test
smondal13 Mar 17, 2026
e4fbf66
Refactor DesignOfExperiments to accept a single experiment or a list
smondal13 Mar 17, 2026
ee6e63f
- update init_method type hint in DesignOfExperiments constructor
smondal13 Mar 17, 2026
ebc7aa3
fix(doc): clarify design variables and FIM in multi-experiment docume…
smondal13 Mar 17, 2026
8f4732d
Rename documentation
smondal13 Mar 17, 2026
735762c
Merge branch 'main' into add-multiexperiment
smondal13 Mar 17, 2026
584091c
Rename
smondal13 Mar 17, 2026
3a52f2d
Merge branch 'add-multiexperiment' of github.com:smondal13/pyomo into…
smondal13 Mar 17, 2026
3678ecb
fix(doc): Test failure
smondal13 Mar 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 185 additions & 0 deletions pyomo/contrib/doe/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# DesignOfExperiments `optimize_experiments()` Proposed Interface

This is a brief documentation explaining the changes. This document will not get merged.

## Why This Change

The `optimize_experiments()` path has grown from a single-experiment workflow into a
multi-experiment optimization interface with optional initialization strategies and
richer result payloads. This document captures the interface contract, operating modes,
and optimization model at a high level.

## API Summary

### Constructor

```python
DesignOfExperiments(
experiment=..., # single experiment object OR list of experiment objects
...
)
```

- `experiment` now accepts either:
- one experiment object (template mode input), or
- a list of experiment objects (user-initialized mode input).
- Internally, the implementation normalizes this to `self.experiment_list`.

### Multi-Experiment Solve Entry Point

```python
optimize_experiments(
results_file=None,
n_exp: int = None,
init_method: InitializationMethod = None,
init_n_samples: int = 5,
init_seed: int = None,
init_parallel: bool = False,
init_combo_parallel: bool = False,
init_n_workers: int = None,
init_combo_chunk_size: int = 5000,
init_combo_parallel_threshold: int = 20000,
init_max_wall_clock_time: float = None,
init_solver=None,
)
```

### Short description of arguments

- `results_file`: Optional path for writing JSON results.
- `n_exp`: Number of experiments to optimize in template mode.
- `init_method`: Initialization strategy (`None` or `"lhs"`).
- `init_n_samples`: Number of LHS samples per experiment-input dimension.
- `init_seed`: Random seed used by LHS initialization.
- `init_parallel`: Enables parallel candidate-point FIM evaluation.
- `init_combo_parallel`: Enables parallel candidate-combination scoring.
- `init_n_workers`: Worker count for LHS parallel evaluation/scoring paths.
- `init_combo_chunk_size`: Number of combinations handled per worker task.
- `init_combo_parallel_threshold`: Minimum combinations required before using combo parallelism.
- `init_max_wall_clock_time`: Optional LHS time budget (seconds); returns best-so-far if exceeded.
- `init_solver`: Optional solver used only during initialization phases (LHS and square init solve).

## Operating Modes

### 1) Template Mode

- Condition: `len(experiment) == 1`
- `n_exp` may be provided to choose how many experiments to optimize simultaneously.
- If `n_exp` is omitted, default is `1`.

### 2) User-Initialized Mode

- Condition: `len(experiment) > 1`
- Number of experiments is fixed by the list length.
- `n_exp` must not be provided.

## Initialization Behavior

### No Special Initialization (`init_method=None`)

- Uses current experiment design values from the model labels directly.

### LHS Initialization (`init_method="lhs"`)

- Currently supported in template mode.
- Requires explicit lower and upper bounds for all experiment inputs.
- Generates candidate points using per-dimension 1-D LHS, then Cartesian product.
- Scores combinations of candidate points using objective-specific FIM metrics.
- Selects best-scoring set of initial points for the nonlinear solve.

### `init_solver` (new)

- If provided, `init_solver` is used for:
- initialization-phase solves (including multi-experiment block-construction
solves and the LHS candidate FIM evaluation path),
- the square initialization solve before final optimization.
- Final optimization solve still uses the main DoE solver (`self.solver`).
- If `init_solver` is `None`, initialization also uses `self.solver`.

## Optimization Formulation

The proposed multi-experiment interface follows a simultaneous design formulation.

### General Form

Let:

- $E = \{1, 2, ..., N_{exp}\}$ be the experiment index set,
- $\phi_k$ be the design variables for experiment `k`,
- $\theta$ be the model parameters
- $M_0$ be the prior Fisher Information Matrix (FIM),
- $M_k(\hat{\theta}, \phi_k)$ be the FIM contribution from experiment `k`,
- $\Psi(M)$ be the chosen FIM metric (D-, A-, pseudo-A-, etc.).

Then:

```math
\max_{\phi_1,\ldots,\phi_{N_{exp}}} \Psi(\mathbf{M})
```

subject to:

```math
\mathbf{M} = \sum_{k=1}^{N_{exp}} \mathbf{M}_k(\hat{\theta}, \phi_k) + \mathbf{M}_0
```

```math
\mathbf{M}_k = \mathbf{Q}_k^\top \Sigma_{\bar{y},k}^{-1} \mathbf{Q}_k, \quad \forall k \in E
```

```math
\mathbf{m}(\bar{x}_k, \hat{\bar{y}}_k, \phi_k, \hat{\theta}, t) = 0, \quad \forall k \in E
```

```math
\mathbf{g}(\bar{x}_k, \hat{\bar{y}}_k, \phi_k, \hat{\theta}, t) \le 0, \quad \forall k \in E
```

where $\mathbf{Q}_k$ is the sensitivity matrix for experiment `k`.

### Symmetry-Breaking Constraint

To avoid permutation-equivalent solutions in simultaneous design:

```math
\varphi_{\text{primary},1} \le \varphi_{\text{primary},2} \le \cdots \le \varphi_{\text{primary},N_{exp}}
```
Here, $\varphi_{\text{primary},\cdot}$ is the primary variable which is considered for symmetry breaking.

This is implemented in `optimize_experiments()` by using a user-marked primary design
variable passed in a `Pyomo.Suffix` (or a default selection (first variable from
experiment_inputs Suffix) with warning if not marked).

### Current Implementation Specialization

The current implementation corresponds to the single-scenario case (`N_s = 1`) with:

```math
\mathbf{M}_{\text{total}} = \mathbf{M}_0 + \sum_{k=1}^{N_{exp}} \mathbf{M}_k
```
Future implementation will handle parametric uncertainty with $N_s >1$

Objective handling in code:

- Determinant and pseudo-trace: solved in maximization form (with monotonic transforms used in the NLP objective expressions).
- Trace: solved in minimization form via covariance/FIM-inverse representation.
- Zero objective: feasibility/debug mode.

Cholesky-based constraints and variables are used in supported objective paths to stabilize determinant/trace formulations.

## Result Payload Highlights

The solver output includes both legacy fields and structured fields:

- `run_info` (API name, solver status/termination info)
- `settings` (objective, finite-difference, initialization config, modeling mode)
- `timing` (build/initialization/solve/total timing)
- `names` (design/output/parameter/error labels)
- `diagnostics` (symmetry and LHS diagnostics)
- `scenarios` (scenario-level objective metrics, total FIM, per-experiment details)

Notably, initialization settings now include:

- `settings["initialization"]["solver_name"]`

to make it explicit which solver was used during initialization.
Loading
Loading