Optimization
Handle optimization solver properties.
Syntax
model.sol(sname).create(fname,"Optimization")
model.sol(sname).feature(fname).set(pname,value)
model.sol(sname).feature(fname).create(aname,SolverAttribute)
Description
Operation feature. Use this feature to solve PDE-constrained optimization problems. The computed solution object contains the PDE solution evaluated for the optimal set of design variables. When the gradient-evaluation method is analytic, it also returns the adjoint solution.
The Optimization Module includes SNOPT and several other optimization solvers. See the Optimization Module Manual for details.
To add a stationary solver, substitute SolverAttribute above with StationaryAttrib. For a time-dependent solver, replace SolverAttribute with TimeAttrib.
Choosing solver is done with the following property
bobyqa | cobyla | coordsearch | lm | mma | montecarlo | neldermead | snopt | ipopt
The following table includes general optimization solver properties, which a common to all optimization solvers:
Name of the controlling study step or "user", if the feature is controlled manually.
on | off
all | manual
on | off
auto | last | all
last | lastn | everynth
on | off
minimization | maximization
sum | min | max
Multiple objectives. Only sum is supported for gradient based optimization solvers.
auto | first | last | sum | min | max
sum | min | max
init | manual | none
penalty | augLagrange
augLagrange for BOBYQA, penalty for others.
auto | manual
Strategy for penalty parameter rho. Available when constrmethod=penalty.
Penalty parameter rho. Available when constrmethod=penalty and coefrho=manual.
dynamic | dynamic2 | static
on | off
Enforce design constraints strictly. Available when optsolver is equal to neldermead, cobyla, montecarlo, or coordsearch.
on | off
all | none | manual
Probes to use, if probesel=manual.
on | off
on | off
on | off
Window to use, if plotobj=bj=on.
on | off
Table to use, when useconstrtable=on.
on | off
Distribute parametric sweep. Available when optsolver is equal to coordsearch, neldermead, or montecarlo.
on | off | detailed
on | off
When the optimization solver is set to SNOPT (snopt), the following properties are accepted:
analytic | numeric | forward|adjoint| forward_numeric
derivative | nonderivative
on | off
on | off
cholesky | cg | qn
on | off
For log files for SNOPT, specify the name of the log file. Use the snoptprintdir to specify the directory. If no name is specified, the log file name is snoptout.txt.
The property gradientsnopt is used to control if the gradient should be computed analytically (by solving the adjoint problem) or numerically. If the number of design variables is large, numerical computation of the gradient can be very time consuming. Analytic gradient is only supported when the underlying PDE problem is stationary.
If manualstepcond is set to on, the expression in the property stepcond is evaluated when new values for the design variables have been computed. If the expression becomes negative, the new values are discarded and the optimization solver reduces the step length in the current line search.
When the optimization solver is set to IPOPT (ipopt), the following properties are accepted:
on | off
on | off
analytic | forward | adjoint | forward_numeric
mumps | pardiso
For log files for IPOPT, specify the name of the log file. Use the ipoptprintdir to specify the directory. If no name is specified, the log file name is snoptout.txt.
on | off
The property gradientipopt is used to control if the gradient should be computed analytically (by solving the adjoint problem) or numerically. If the number of design variables is large, numerical computation of the gradient can be very time consuming. Analytic gradient is only supported when the underlying PDE-problem is stationary.
When the optimization solver is set to Levenberg–Marquardt (lm), the following properties are accepted:
Central difference interval (only available when gradientlm is numeric and gradorder is second)
Difference interval (only available when gradientlm is numeric and gradorder is first).
on | off
analytic | numeric | forward | adjoint | forward_numeric
first | second
on | off
on | off | onpws
Store functional sensitivity. onpws is equivalent to on, except the sensitivity is also stored in the solution while solving. This is relevant when using the results while solving functionality.
When the optimization solver is set to MMA, the following properties are accepted:
on | off
analytic | forward | numeric | adjoint | forward_numeric
on | off
on | off
on | off
on | off
Enable movelimit.
For a description of the optimization properties, see Advanced Solver Properties in the Optimization Module User’s Guide.