def __init__(self, nx): """ Creates a new Assembly containing an aep component and a DAKOTA scanner""" super(AEP_CSM_DAKOTA_Scanner, self).__init__() print "initializing AEP CSM DAKOTA scanner" self.infile = "dakota.aepcsm.in" # Create DAKOTA Optimizer instance driver = DAKOTADriver(self.infile) self.add('driver', driver) # Create Paraboloid component instances self.add('aepcomp', aep_csm_assembly()) # Driver process definition self.driver.workflow.add('aepcomp') # DAKOTA input file # write_input_X(nx, "dakota.in.generic.template", self.infile) inp_dat = DAKOTAInput( method = ["multidim_parameter_study", "partitions = %d %d" % (nx, nx)], variables = [ "continuous_design = 2", "lower_bounds 4 1.3", "upper_bounds 15 3.5", "descriptors 'windSpeed50m' 'weibullK'"] ) inp_dat.write_input(self.infile) # WTPerf/DaKOTA Objective self.driver.add_objective('aepcomp.aep') # WTPERF test Design Variables self.driver.add_parameter('aepcomp.windSpeed50m', low=4, high=15) self.driver.add_parameter('aepcomp.weibullK', low=1.4, high=3.5)
def SelectComponents(self): ''' Component selections for wrapping different models which calculate main outputs for cost analysis ''' aepa = aep_csm_assembly() self.add('aep1', aepa) tccc = tcc_csm_component() self.add('tcc', tccc) bosc = bos_csm_component() self.add('bos', bosc) omc = om_csm_component() self.add('om', omc) finc = fin_csm_component() self.add('fin', finc)
def __init__(self, nx): """ Creates a new Assembly containing an aep component and a DAKOTA scanner""" super(AEP_CSM_DAKOTA_Scanner, self).__init__() print "initializing AEP CSM DAKOTA scanner" self.infile = "dakota.aepcsm.in" # Create DAKOTA Optimizer instance driver = DAKOTADriver(self.infile) self.add('driver', driver) # Create Paraboloid component instances self.add('aepcomp', aep_csm_assembly()) # Driver process definition self.driver.workflow.add('aepcomp') # DAKOTA input file # write_input_X(nx, "dakota.in.generic.template", self.infile) inp_dat = DAKOTAInput( method=[ "multidim_parameter_study", "partitions = %d %d" % (nx, nx) ], variables=[ "continuous_design = 2", "lower_bounds 4 1.3", "upper_bounds 15 3.5", "descriptors 'windSpeed50m' 'weibullK'" ]) inp_dat.write_input(self.infile) # WTPerf/DaKOTA Objective self.driver.add_objective('aepcomp.aep') # WTPERF test Design Variables self.driver.add_parameter('aepcomp.windSpeed50m', low=4, high=15) self.driver.add_parameter('aepcomp.weibullK', low=1.4, high=3.5)