Skip to content

Commit

Permalink
Update POEM_094.md
Browse files Browse the repository at this point in the history
  • Loading branch information
robfalck authored Apr 25, 2024
1 parent d463bff commit 12d4e19
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions POEM_094.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,32 @@ This POEM consists of a few thrusts.

`AnalysisDriver` will support design exploration, but the notion of scaling doesn't apply here, as this driver will not support objectives or constraints, but just "responses". This will be the parent class for `DOEDriver`.

2. OptimizationDrivers will support the notion of an `Autoscaler` that is called early in their `run`. The autoscaler will be set using `driver.set_autoscaler(AutoscalerClass())`.
2. Driver runs will return a DriverResults object.

3. OpenMDAO will provide some default set of Autoscalers (discussed below), and allow users to implement their own.
The current return value of `failed` doesn't provide any information on the optimization and forces the user to go digging through the optimizers to find things like iteration counts, informs/exit status, Lagrange multipliers, etc.

In addition, the users find the notion that a successful optimization returns a value of `False` to be confusing.

This proposal will change the return value of a driver run to a new type called `DriverResults`.

Any aspect that we expect to be common across several drivers should be an attribute/property of `DriverResults`.

This will include:
- `success`: Flag that is `True` if the optimization was successful.
- `f_eval`: The number of objective evaluations.
- `g_eval`: The number of gradient evaluations.
- `objectives`: A dictionary containing the objective name, units, and optimal value.
- `design_vars`: A dictionary of design variable names, units, and their optimal values.
- `constraints`: A dictionary of the constraint names, units, and their values at the optimal point.

`DriverResults` will contain an attribute/property `success` that is a boolean indicating whether the driver successfully ended. The meaning of this flag will vary from driver to driver (and optimizer to optmizer). For instance, SLSQP has a rather straight-forward success criteria, while SNOPT has multiple inform results that might indicate success.

**Note: These changes are backwards incompatible and will impact anyone who is checking the return value of `run_driver`,
since this object (as most Python objects), will evaluate to `True`.

4. OptimizationDrivers will support the notion of an `Autoscaler` that is called early in their `run`. The autoscaler will be set using `driver.set_autoscaler(AutoscalerClass())`.

5. OpenMDAO will provide some default set of Autoscalers (discussed below), and allow users to implement their own.

## Changes to OptimizationDriver

Expand Down

0 comments on commit 12d4e19

Please sign in to comment.