def configure(self):
     self.add('d', Dummy())
     self.add('driver', NeighborhoodDOEdriver())
     self.driver.DOEgenerator = FullFactorial(2)
     self.driver.recorders = [DumpCaseRecorder()]
     self.driver.add_parameter('d.x', low=0, high=10)
     self.driver.case_outputs = ['d.y', 'd.bad', 'd.z']
    def configure(self):
        comp = self.add('comp', Comp())

        doe = self.add('doe', NeighborhoodDOEdriver())
        doe.DOEgenerator = FullFactorial()
        doe.alpha = .1
        doe.add_parameter('comp.x')
        doe.add_response('comp.y')
        doe.workflow.add('comp')

        meta = self.add('meta', MetaModel(params=('x', ), responses=('y', )))
        meta.default_surrogate = ResponseSurface()

        self.connect('doe.case_inputs.comp.x', 'meta.params.x')
        self.connect('doe.case_outputs.comp.y', 'meta.responses.y')

        opt = self.add('opt', SLSQPdriver())
        opt.add_parameter('meta.x', high=10., low=-10.)
        opt.add_objective('meta.y')
        opt.workflow.add('meta')

        drv = self.add('driver', FixedPointIterator())
        drv.max_iteration = 2
        drv.add_parameter('y')
        drv.add_constraint('y=meta.y')
        drv.workflow.add(['doe', 'opt'])
 def configure(self):
     self.add('driver', NeighborhoodDOEdriver())
     self.add('driven', DrivenComponent())
     self.driver.workflow.add('driven')
     self.driver.DOEgenerator = OptLatinHypercube(num_samples=10)
     self.driver.case_outputs = ['driven.rosen_suzuki']
     self.driver.add_parameter(('driven.x0', 'driven.y0'),
                               low=-10., high=10., scaler=20., adder=10.)
     for name in ['x1', 'x2', 'x3']:
         self.driver.add_parameter("driven.%s" % name,
                                   low=-10., high=10., scaler=20., adder=10.)