RCAIDE.Framework.Optimization.Packages.additive.additive_setup.Additive_Solver#
- class Additive_Solver[source]#
Bases:
object
Methods
Additive_Solve
(problem[, ...])Solves a multifidelity problem using an additive corrections
__init__
()evaluate_corrected_model
(x[, problem, ...])Evaluates the corrected model with the low fidelity plus the corrections
evaluate_expected_improvement
(x[, problem, ...])Evaluates the expected improvement of the point x
evaluate_model
(problem, x, cons)Solves the optimization problem to get the objective and constraints
initialize_opt_vals
(opt_prob, obj, inp, ...)Sets up the optimization values
initialize_opt_vals_SHGO
(obj, inp, ...)initialize_opt_vals_SLSQP
(obj, inp, ...)run_objective_optimization
(opt_prob, ...)Runs SNOPT to optimize
scale_vals
(inp, con, ini, bnd, scl)Scales values to help setup the problem
unpack_constraints_slsqp
(x, con_ind, sign, ...)- Additive_Solve(problem, num_fidelity_levels=2, num_samples=10, max_iterations=10, tolerance=1e-06, opt_type='basic', num_starts=3, print_output=True)[source]#
Solves a multifidelity problem using an additive corrections
Assumptions: N/A
Source: N/A
Inputs: problem [nexus()] num_fidelity_levels [int] num_samples [int] max_iterations [int] tolerance [float] opt_type [str] num_starts [int] print_output [bool]
Outputs: (fOpt,xOpt) [tuple]
Properties Used: N/A
- evaluate_model(problem, x, cons)[source]#
Solves the optimization problem to get the objective and constraints
Assumptions: N/A
Source: N/A
Inputs: problem [nexus()] x [array] cons [array]
Outputs: f [float] g [array]
Properties Used: N/A
- evaluate_corrected_model(x, problem=None, obj_surrogate=None, cons_surrogate=None)[source]#
Evaluates the corrected model with the low fidelity plus the corrections
Assumptions: N/A
Source: N/A
Inputs: x [array] problem [nexus()] obj_surrogate [fun()] cons_surrogate [fun()]
Outputs: obj [float] const [array] fail [bool]
Properties Used: N/A
- evaluate_expected_improvement(x, problem=None, obj_surrogate=None, cons_surrogate=None, fstar=inf, cons=None)[source]#
Evaluates the expected improvement of the point x
Assumptions: N/A
Source: N/A
Inputs: x [array] problem [nexus()] obj_surrogate [fun()] cons_surrogate [fun()] fstar [float] cons [vector]
Outputs: -EI [float] const [array] fail [bool]
Properties Used: N/A
- scale_vals(inp, con, ini, bnd, scl)[source]#
Scales values to help setup the problem
Assumptions: N/A
Source: N/A
Inputs: inp [array] con [array] ini [array] bnd [array] scl [array]
- Outputs:
- tuple:
x [array] scaled_constraints [array] x_low_bounds [array] x_up_bounds [array] con_up_edge [array] con_low_edge [array]
Properties Used: N/A
- initialize_opt_vals(opt_prob, obj, inp, x_low_bound, x_up_bound, con_low_edge, con_up_edge, nam, con, x_eval)[source]#
Sets up the optimization values
Assumptions: N/A
Source: N/A
Inputs: opt_prob [pyopt_problem()] obj [float] inp [array] x_low_bound [array] x_up_bound [array] con_low_edge [array] con_up_edge [array] nam [list of str] con [array] x_eval [array]
Outputs: N/A
Properties Used: N/A
- initialize_opt_vals_SLSQP(obj, inp, x_low_bound, x_up_bound, con_low_edge, con_up_edge, nam, con, x_eval, problem, cons_surr)[source]#
- initialize_opt_vals_SHGO(obj, inp, x_low_bound, x_up_bound, con_low_edge, con_up_edge, nam, con, problem, cons_surr)[source]#
- run_objective_optimization(opt_prob, problem, f_additive_surrogate, g_additive_surrogate)[source]#
Runs SNOPT to optimize
Assumptions: N/A
Source: N/A
Inputs: opt_prob [pyopt_problem()] problem [nexus()] f_additive_surrogate [fun()] g_additive_surrogate [fun()]
Outputs: fOpt [float] xOpt [array]
Properties Used: N/A