#NEWLINE# def run_iteration( self ) : #NEWLINE# #INDENT# ' Note: cobyla controls the looping.' #NEWLINE# try : #NEWLINE# #INDENT# ( self . iact , self . error_code , self . nfvals ) = cobyla ( self . _func , self . nparam , self . ncon , self . x , self . rhobeg , self . rhoend , self . iprint , self . maxfun , self . work_vector , self . iact , self . error_code , self . nfvals , self . iout , self . output_filename , self . ff , self . gg ) #NEWLINE# #UNINDENT# except Exception as err : #NEWLINE# #INDENT# self . _logger . error ( str ( err ) ) #NEWLINE# raise #NEWLINE# #UNINDENT# if ( self . iprint > 0 ) : #NEWLINE# #INDENT# closeunit ( self . iout ) #NEWLINE# #UNINDENT# if ( self . error_code != 0 ) : #NEWLINE# #INDENT# self . _logger . warning ( self . error_messages [ self . error_code ] ) #NEWLINE# #UNINDENT# self . _continue = False