<s> import unittest <EOL> from openmdao . main . api import Assembly , Component <EOL> from openmdao . main . datatypes . api import Float , Array <EOL> from openmdao . lib . drivers . api import CONMINdriver , BroydenSolver , SensitivityDriver , FixedPointIterator <EOL> from openmdao . lib . optproblems import sellar <EOL> class Dis12Linear ( Component ) : <EOL> """<STR_LIT>""" <EOL> z1 = Float ( <NUM_LIT:0.> , iotype = '<STR_LIT>' ) <EOL> z2 = Float ( <NUM_LIT:0.> , iotype = '<STR_LIT>' ) <EOL> z_store = Array ( [ <NUM_LIT:0.> , <NUM_LIT:0.> ] , iotype = '<STR_LIT>' ) <EOL> ssa_F = Array ( [ <NUM_LIT:0.0> ] , iotype = '<STR_LIT>' ) <EOL> ssa_G = Array ( [ <NUM_LIT:0.0> , <NUM_LIT:0.0> ] , iotype = '<STR_LIT>' ) <EOL> ssa_dF = Array ( [ <NUM_LIT:0.0> , <NUM_LIT:0.0> ] , iotype = '<STR_LIT>' ) <EOL> ssa_dG = Array ( [ [ <NUM_LIT:0.0> , <NUM_LIT:0.0> ] , [ <NUM_LIT:0.0> , <NUM_LIT:0.0> ] ] , iotype = '<STR_LIT>' ) <EOL> obj = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' ) <EOL> con1 = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' ) <EOL> con2 = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' ) <EOL> def execute ( self ) : <EOL> self . obj = self . ssa_F [ <NUM_LIT:0> ] + self . ssa_dF [ <NUM_LIT:0> ] * ( self . z_store [ <NUM_LIT:0> ] - self . z1 ) + self . ssa_dF [ <NUM_LIT:1> ] * ( self . z_store [ <NUM_LIT:1> ] - self . z2 ) <EOL> self . con1 = self . ssa_G [ <NUM_LIT:0> ] + self . ssa_dG [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] * ( self . z_store [ <NUM_LIT:0> ] - self . z1 ) + self . ssa_dG [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] * ( self . z_store [ <NUM_LIT:1> ] - self . z2 ) <EOL> self . con2 = self . ssa_G [ <NUM_LIT:1> ] + self . ssa_dG [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] * ( self . z_store [ <NUM_LIT:0> ] - self . z1 ) + self . ssa_dG [ <NUM_LIT:1> ] [ <NUM_LIT:1> ] * ( self . z_store [ <NUM_LIT:1> ] - self . z2 ) <EOL> class SellarBLISS ( Assembly ) : <EOL> z_store = Array ( [ <NUM_LIT:0.> , <NUM_LIT:0.> ] , dtype = Float , iotype = '<STR_LIT>' ) <EOL> def configure ( self ) : <EOL> """<STR_LIT>""" <EOL> self . add ( '<STR_LIT>' , Dis12Linear ( ) ) <EOL> self . connect ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . add ( '<STR_LIT>' , CONMINdriver ( ) ) <EOL> self . sysopt . add_parameter ( '<STR_LIT>' , low = - <NUM_LIT> , high = <NUM_LIT> , start = <NUM_LIT> ) <EOL> self . sysopt . add_objective ( '<STR_LIT>' ) <EOL> self . driver . workflow . add ( [ '<STR_LIT>' ] ) <EOL> self . sysopt . workflow . add ( [ '<STR_LIT>' ] ) <EOL> class BndryFullSubTestCase ( unittest . TestCase ) : <EOL> def test_MDF ( self ) : <EOL> prob = SellarBLISS ( ) <EOL> prob . name = '<STR_LIT>' <EOL> prob . run ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
