Module Expr Str Import alias identifier ImportFrom alias alias alias alias alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str keyword Num Expr Call AttributeLoad NameLoad attr Str keyword Num Expr Call AttributeLoad NameLoad attr Str keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str BinOpSub BinOpAdd BinOpAdd BinOpPow NameLoad Num NameLoad NameLoad BinOpMult Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Assign SubscriptStore NameLoad Index TupleLoad Str Str Num Assign SubscriptStore NameLoad Index TupleLoad Str Str Call AttributeLoad NameLoad attr ListLoad ListLoad BinOpMult Num SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Num Assign SubscriptStore NameLoad Index TupleLoad Str Str Num Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str keyword Num Expr Call AttributeLoad NameLoad attr Str keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str BinOpAdd BinOpAdd BinOpPow NameLoad Num NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Assign SubscriptStore NameLoad Index TupleLoad Str Str BinOpMult Num BinOpPow SubscriptLoad NameLoad Index Str Num Assign SubscriptStore NameLoad Index TupleLoad Str Str Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Str keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Assign SubscriptStore NameLoad Index TupleLoad Str Str Num Assign SubscriptStore NameLoad Index TupleLoad Str Str Num Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call NameLoad Str Num keyword ListLoad Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad Str Call AttributeLoad NameLoad attr ListLoad Num Num keyword ListLoad Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad Expr Call AttributeLoad NameLoad attr Str Call NameLoad keyword ListLoad Str Str Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad keyword ListLoad Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad Str keyword Call AttributeLoad NameLoad attr ListLoad Num Num keyword ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad Str keyword ListLoad Str Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad Str keyword ListLoad Str Expr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad decorator_list decorator_list If CompareEq NameLoad Str body ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index Str Str Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Call AttributeLoad NameLoad attr ListLoad Num Num keyword Call AttributeLoad NameLoad attr ListLoad Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Num keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Print Str Print BinOpMod Str TupleLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num SubscriptLoad SubscriptLoad NameLoad Index Str Index Num SubscriptLoad NameLoad Index Str Print BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Print TupleLoad Str SubscriptLoad NameLoad Index Str
N/A N/A  Optimize the Sellar problem using SLSQP. This version elminates the cycle
and replaces it with an implicit component. N/A numpy np openmdao.api Component Group IndepVarComp ExecComp Newton ScipyGMRES SellarDis1 N/A Component N/A N/A Component containing Discipline 1. __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super SellarDis1 self __init__ N/A N/A N/A self add_param z val N/A N/A np zeros 2 N/A N/A N/A self add_param x val 0.0 N/A N/A N/A self add_param y2 val 0.0 N/A N/A N/A self add_output y1 val 1.0 N/A solve_nonlinear N/A N/A self params unknowns resids N/A N/A N/A Evaluates the equation
        y1 = z1**2 + z2 + x1 - 0.2*y2 N/A z1 N/A N/A params N/A z N/A 0 N/A z2 N/A N/A params N/A z N/A 1 N/A x1 N/A params N/A x N/A y2 N/A params N/A y2 N/A N/A unknowns N/A y1 N/A N/A N/A N/A z1 2 z2 x1 N/A 0.2 y2 N/A linearize N/A N/A self params unknowns resids N/A N/A N/A  Jacobian for Sellar discipline 1. N/A J N/A N/A N/A J N/A N/A y1 y2 -0.2 N/A N/A J N/A N/A y1 z N/A N/A np array N/A N/A N/A 2 N/A N/A params N/A z N/A 0 1.0 N/A N/A J N/A N/A y1 x 1.0 N/A J N/A N/A SellarDis2 N/A Component N/A N/A Component containing Discipline 2. __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super SellarDis2 self __init__ N/A N/A N/A self add_param z val N/A N/A np zeros 2 N/A N/A N/A self add_param y1 val 0.0 N/A N/A N/A self add_output y2 val 1.0 N/A solve_nonlinear N/A N/A self params unknowns resids N/A N/A N/A Evaluates the equation
        y2 = y1**(.5) + z1 + z2 N/A z1 N/A N/A params N/A z N/A 0 N/A z2 N/A N/A params N/A z N/A 1 N/A y1 N/A params N/A y1 N/A y1 N/A abs y1 N/A N/A unknowns N/A y2 N/A N/A N/A y1 0.5 z1 z2 N/A linearize N/A N/A self params unknowns resids N/A N/A N/A  Jacobian for Sellar discipline 2. N/A J N/A N/A N/A J N/A N/A y2 y1 N/A 0.5 N/A N/A params N/A y1 -0.5 N/A N/A J N/A N/A y2 z N/A N/A np array N/A N/A 1.0 1.0 N/A J N/A N/A StateConnection N/A Component N/A N/A  Define connection with an explicit equation __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super StateConnection self __init__ N/A N/A N/A self add_param y2_actual 1.0 N/A N/A N/A self add_state y2_command val 1.0 N/A apply_nonlinear N/A N/A self params unknowns resids N/A N/A N/A  Don't solve; just calculate the residual. N/A y2_actual N/A params N/A y2_actual N/A y2_command N/A unknowns N/A y2_command N/A N/A resids N/A y2_command N/A y2_actual y2_command N/A solve_nonlinear N/A N/A self params unknowns resids N/A N/A N/A  This is a dummy comp that doesn't modify its state. N/A N/A linearize N/A N/A self params unknowns resids N/A N/A N/A Analytical derivatives. N/A J N/A N/A N/A J N/A N/A y2_command y2_command -1.0 N/A N/A J N/A N/A y2_command y2_actual 1.0 N/A J N/A N/A SellarStateConnection N/A Group N/A N/A  Group containing the Sellar MDA. This version uses the disciplines
    with derivatives. __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super SellarStateConnection self __init__ N/A N/A N/A self add px N/A IndepVarComp x 1.0 promotes N/A x N/A N/A N/A self add pz N/A IndepVarComp z N/A N/A np array N/A 5.0 2.0 promotes N/A z N/A N/A N/A self add state_eq N/A StateConnection N/A N/A N/A self add d1 N/A SellarDis1 promotes N/A x z y1 N/A N/A N/A self add d2 N/A SellarDis2 promotes N/A z y1 N/A N/A N/A self connect state_eq.y2_command d1.y2 N/A N/A N/A self connect d2.y2 state_eq.y2_actual N/A N/A N/A self add obj_cmp N/A ExecComp obj = x**2 + z[1] + y1 + exp(-y2) z N/A N/A np array N/A 0.0 0.0 promotes N/A x z y1 obj N/A N/A N/A self connect d2.y2 obj_cmp.y2 N/A N/A N/A self add con_cmp1 N/A ExecComp con1 = 3.16 - y1 promotes N/A con1 y1 N/A N/A N/A self add con_cmp2 N/A ExecComp con2 = y2 - 24.0 promotes N/A con2 N/A N/A N/A self connect d2.y2 con_cmp2.y2 N/A N/A self nl_solver N/A Newton N/A N/A self ln_solver N/A ScipyGMRES N/A N/A N/A N/A __name__ __main__ N/A openmdao.core.problem Problem openmdao.drivers.scipy_optimizer ScipyOptimizer N/A top N/A Problem N/A N/A top root N/A SellarStateConnection N/A N/A top driver N/A ScipyOptimizer N/A N/A N/A N/A top driver options N/A optimizer SLSQP N/A N/A N/A N/A top driver options N/A tol 1e-08 N/A N/A N/A N/A top driver add_desvar z lower N/A N/A np array N/A -10.0 0.0 upper N/A N/A np array N/A 10.0 10.0 N/A N/A N/A N/A top driver add_desvar x lower 0.0 upper 10.0 N/A N/A N/A N/A top driver add_objective obj N/A N/A N/A N/A top driver add_constraint con1 upper 0.0 N/A N/A N/A N/A top driver add_constraint con2 upper 0.0 N/A N/A N/A top setup N/A N/A N/A top run N/A N/A N/A Minimum found at (%f, %f, %f) N/A N/A N/A top N/A z N/A 0 N/A N/A top N/A z N/A 1 N/A top N/A x N/A N/A Coupling vars: %f, %f N/A N/A top N/A y1 N/A top N/A d2.y2 N/A N/A Minimum objective:  N/A top N/A obj