parameters: (objectives,iters=1000,tol=1e-3,activeDofs=None,numRestarts=100,feasibilityCheck=None,startRandom=False)
docstring: Attempts to solve the given objective(s) but avoids local minima
      to some extent using a random-restart technique.  
          
      Args:
          objectives, iters, tol, activeDofs: same as :func:`solve`
          numRestarts (int, optional): the number of random restarts.  The larger this is,
              the more likely a solution will be found, but if no solution exists, the
              routine will take more time.
          feasibilityCheck (function, optional): if provided, it will be a function feasible() 
              that returns True if the robot/world in the current configuration is feasible,
              and False otherwise.
          startRandom (bool, optional): True if you wish to forgo the robot's current configuration
              and start from random initial configurations
  
      Returns:
          bool: True if a feasible solution is successfully found to the given
          tolerance, within the provided number of iterations.
docstring_summary: Attempts to solve the given objective(s) but avoids local minima
      to some extent using a random-restart technique.  
          
      Args:
          objectives, iters, tol, activeDofs: same as :func:`solve`
          numRestarts (int, optional): the number of random restarts.  The larger this is,
              the more likely a solution will be found, but if no solution exists, the
              routine will take more time.
          feasibilityCheck (function, optional): if provided, it will be a function feasible() 
              that returns True if the robot/world in the current configuration is feasible,
              and False otherwise.
          startRandom (bool, optional): True if you wish to forgo the robot's current configuration
              and start from random initial configurations
docstring_tokens: Attempts to solve the given objective ( s ) but avoids local minima to some extent using a random - restart technique . Args : objectives iters tol activeDofs : same as : func : solve numRestarts ( int optional ) : the number of random restarts . The larger this is the more likely a solution will be found but if no solution exists the routine will take more time . feasibilityCheck ( function optional ) : if provided it will be a function feasible () that returns True if the robot / world in the current configuration is feasible and False otherwise . startRandom ( bool optional ) : True if you wish to forgo the robot s current configuration and start from random initial configurations
function: def solve_global(objectives,iters=1000,tol=1e-3,activeDofs=None,numRestarts=100,feasibilityCheck=None,startRandom=False):
      """Attempts to solve the given objective(s) but avoids local minima
      to some extent using a random-restart technique.  
          
      Args:
          objectives, iters, tol, activeDofs: same as :func:`solve`
          numRestarts (int, optional): the number of random restarts.  The larger this is,
              the more likely a solution will be found, but if no solution exists, the
              routine will take more time.
          feasibilityCheck (function, optional): if provided, it will be a function feasible() 
              that returns True if the robot/world in the current configuration is feasible,
              and False otherwise.
          startRandom (bool, optional): True if you wish to forgo the robot's current configuration
              and start from random initial configurations
  
      Returns:
          bool: True if a feasible solution is successfully found to the given
          tolerance, within the provided number of iterations.
      """
      if feasibilityCheck is None: feasibilityCheck=lambda : True
      s = solver(objectives,iters,tol)
      if activeDofs is not None:
          links = activeDofs[:]
          for i,l in enumerate(links):
              if isinstance(l,str):
                  links[i] = s.robot.link(l).getIndex()
          s.setActiveDofs(links)
      if hasattr(s,'__iter__'):
          if startRandom:
              s.sampleInitial()
          res = [si.solve() for si in s]
          if all(res):
              if feasibilityCheck():
                  return True
          for i in xrange(numRestarts):
              for si in s:
                  si.sampleInitial()
              res = [si.solve() for si in s]
              if all(res):
                  if feasibilityCheck():
                      return True
          return False
      else:
          if startRandom:
              s.sampleInitial()
          if s.solve():
              if feasibilityCheck():
                  return True
          for i in xrange(numRestarts):
              s.sampleInitial()
              if s.solve():
                  if feasibilityCheck():
                      return True
          return False
function_tokens: def solve_global ( objectives , iters = 1000 , tol = 1e-3 , activeDofs = None , numRestarts = 100 , feasibilityCheck = None , startRandom = False ) : if feasibilityCheck is None : feasibilityCheck = lambda : True s = solver ( objectives , iters , tol ) if activeDofs is not None : links = activeDofs [ : ] for i , l in enumerate ( links ) : if isinstance ( l , str ) : links [ i ] = s . robot . link ( l ) . getIndex ( ) s . setActiveDofs ( links ) if hasattr ( s , '__iter__' ) : if startRandom : s . sampleInitial ( ) res = [ si . solve ( ) for si in s ] if all ( res ) : if feasibilityCheck ( ) : return True for i in xrange ( numRestarts ) : for si in s : si . sampleInitial ( ) res = [ si . solve ( ) for si in s ] if all ( res ) : if feasibilityCheck ( ) : return True return False else : if startRandom : s . sampleInitial ( ) if s . solve ( ) : if feasibilityCheck ( ) : return True for i in xrange ( numRestarts ) : s . sampleInitial ( ) if s . solve ( ) : if feasibilityCheck ( ) : return True return False