InteriorPoint
Options table
Option |
Type |
Default Value |
Description |
|---|---|---|---|
problem |
Problem or ProblemLite |
None |
Object containing the problem to be solved. |
recording |
bool |
False |
If |
out_dir |
str |
None |
The directory to store all the output files generated from the optimization. |
hot_start_from |
str |
None |
The record file from which to hot-start the optimization. |
hot_start_atol |
float |
0. |
The absolute tolerance check for the inputs when reusing outputs from the hot-start record. |
hot_start_rtol |
float |
0. |
The relative tolerance check for the inputs when reusing outputs from the hot-start record. |
visualize |
list |
[] |
The list of scalar variables to visualize during the optimization. |
keep_viz_open |
bool |
False |
If |
turn_off_outputs |
bool |
False |
If |
maxiter |
int |
1000 |
Maximum number of major iterations. |
opt_tol |
float |
1e-6 |
Optimality tolerance. |
feas_tol |
float |
1e-6 |
Feasibility tolerance. |
fraction_to_boundary |
float |
0.99 |
Fraction to the boundary for step size calculation. |
init_barrier_param |
float |
0.50 |
Initial value of the barrier parameter. |
barrier_reduction_factor |
float |
0.20 |
Factor by which the barrier parameter is reduced when convergence tolerances are met for the current barrier problem. |
barrier_reduction_power |
float |
1.50 |
Power to which the barrier parameter is raised when convergence tolerances are met for the current barrier problem. |
barrier_problem_tolerance_factor |
float |
10.0 |
Convergence tolerance for each barrier problem set as a factor of the current barrier parameter. |
ls_maxiter |
int |
10 |
Maximum number of line search iterations. |
ls_eta_a |
float |
1e-4 |
Armijo parameter for the line search. |
ls_gamma_c |
float |
0.5 |
Step length contraction factor for backtracking line search. |
ls_max_step |
float |
1.0 |
Maximum step length for line search. |
bfgs_reset_frequency |
int |
100 |
Iteration frequency to reset the BFGS approximate Hessian. |
readable_outputs |
list |
[] |
List of outputs to be written to readable text output files. Available outputs are: ‘major’, ‘obj’, ‘x’, ‘lag_mult’, ‘slacks’, ‘constraints’, ‘opt’, ‘feas’, ‘time’, ‘nfev’, ‘ngev’, ‘step’, ‘rho’, ‘merit’. |
Source code
The source code is available here.
API
- class modopt.InteriorPoint(problem, recording=False, out_dir=None, hot_start_from=None, hot_start_atol=0.0, hot_start_rtol=0.0, visualize=[], keep_viz_open=False, turn_off_outputs=False, **kwargs)[source]
An Interior Point algorithm for nonlinearly constrained optimization problems.
- Parameters
- problemProblem or ProblemLite
Object containing the problem to be solved.
- recordingbool, default=False
If
True, record all outputs from the optimization. This needs to be enabled for hot-starting the same problem later, if the optimization is interrupted.- out_dirstr, optional
The directory to store all the output files generated from the optimization.
- hot_start_fromstr, optional
The record file from which to hot-start the optimization.
- hot_start_atolfloat, default=0.
The absolute tolerance check for the inputs when reusing outputs from the hot-start record.
- hot_start_rtolfloat, default=0.
The relative tolerance check for the inputs when reusing outputs from the hot-start record.
- visualizelist, default=[]
The list of scalar variables to visualize during the optimization.
- keep_viz_openbool, default=False
If
True, keeps the visualization window open after the optimization is complete.- turn_off_outputsbool, default=False
If
True, prevent modOpt from generating any output files.- maxiterint, default=1000
Maximum number of major iterations.
- opt_tolfloat, default=1e-6
Optimality tolerance.
- feas_tolfloat, default=1e-6
Feasibility tolerance.
- fraction_to_boundaryfloat, default=0.99
Fraction to the boundary for step size calculation.
- init_barrier_paramfloat, default=0.50
Initial value of the barrier parameter.
- barrier_reduction_factorfloat, default=0.20
Factor by which the barrier parameter is reduced when convergence tolerances are met for the current barrier problem.
- barrier_reduction_powerfloat, default=1.50
Power to which the barrier parameter is raised when convergence tolerances are met for the current barrier problem.
- barrier_problem_tolerance_factorfloat, default=10.0
Convergence tolerance for each barrier problem set as a factor of the current barrier parameter.
- ls_maxiterint, default=10
Maximum number of line search iterations.
- ls_eta_afloat, default=1e-4
Armijo parameter for the line search.
- ls_gamma_cfloat, default=0.5
Step length contraction factor for backtracking line search.
- ls_max_stepfloat, default=1.0
Maximum step length for line search.
- bfgs_reset_frequencyint, default=100
Iteration frequency to reset the BFGS approximate Hessian.
- readable_outputslist, default=[]
List of outputs to be written to readable text output files. Available outputs are: ‘major’, ‘obj’, ‘x’, ‘lag_mult’, ‘slacks’, ‘constraints’, ‘opt’, ‘feas’, ‘time’, ‘nfev’, ‘ngev’, ‘step’, ‘rho’, ‘merit’.
Methods
check_first_derivatives([x, step, formulation])Check the first derivatives of the optimization problem using finite differences.
print_results([summary_table, all])Print the results of the optimization problem to the terminal.
solve()Run the optimization algorithm to solve the problem.
- check_first_derivatives(x=None, step=1e-06, formulation='rs')
Check the first derivatives of the optimization problem using finite differences.
- Parameters
- xnp.ndarray, optional
The design variables at which the derivatives are to be checked. If not provided, the initial design variables are used.
- stepfloat, default=1e-6
The step size for the finite differences.
- print_results(summary_table=False, all=False)
Print the results of the optimization problem to the terminal.
- Parameters
- summary_tablebool, default=False
If
True, print the summary table for the optimization.- allbool, default=False
If
False, print only the scalar outputs of the optimization problem. Otherwise, print all the outputs of the optimization problem.
- solve()[source]
Run the optimization algorithm to solve the problem.