Пример #1
0
 def __init__(self,
              major_iteration_limit=200,
              major_feasibility_tolerance=1e-6,
              major_optimality_tolerance=1e-6,
              difference_interval=1e-6,
              function_precision=1e-8,
              Print_file='SNOPT_print.out',
              Summary_file='SNOPT_summary.out',
              print_results=False):
     """For information about the arguments see
     https://web.stanford.edu/group/SOL/software/snoptHelp/whgdata/whlstt9.htm#9
     """
     pyOptSparseDriver.__init__(self)
     self.options.update({
         'optimizer': 'SNOPT',
         'print_results': print_results
     })
     self.opt_settings.update({
         'Major feasibility tolerance': major_feasibility_tolerance,
         'Major optimality tolerance': major_optimality_tolerance,
         'Difference interval': difference_interval,
         'Hessian full memory': None,
         'Function precision': function_precision,
         'Major iterations limit': major_iteration_limit,
         'Print file': Print_file,
         'Summary file': Summary_file,
         'Major step limit': 2.0
     })
Пример #2
0
 def __init__(self, max_iter=200):
     pyOptSparseDriver.__init__(self)
     self.options.update({'optimizer': 'IPOPT'})
     self.opt_settings.update({
         'linear_solver': 'ma27',
         'max_iter': max_iter,
         'start_with_resto': 'yes',
         'expect_infeasible_problem': 'yes'
     })