parameters: (self, fraction=0.1, timedev=-1, c_probit=-1, **kwargs)
return_statement: return True
docstring: Select plan with minimum executed travel time as current plant.
docstring_summary: Select plan with minimum executed travel time as current plant.
docstring_tokens: Select plan with minimum executed travel time as current plant .
function: def select_plans_min_time_exec(self, fraction=0.1, timedev=-1, c_probit=-1, **kwargs):
          """
          Select plan with minimum executed travel time as current plant.
          """
          ids_pers_all = self.get_ids()
          # print 'select_plans_random',len(ids_pers_all),fraction
          ids_pers = ids_pers_all[np.random.random(len(ids_pers_all)) > (1.0-fraction)]
          times_exec = self.get_plans().times_exec
          # self.ids_plan.reset()
          for id_pers, ids_plan_all in zip(ids_pers, self.lists_ids_plan[ids_pers]):
              # print '    ids_plan_all',ids_plan_all,type(ids_plan_all)
              ids_plan = np.array(ids_plan_all, dtype=np.int32)[times_exec[ids_plan_all] > 0.1]
              if len(ids_plan) > 0:
                  # print '  id_pers,ids_plan',id_pers,ids_plan
                  if timedev > 0.1:
                      times_rand = np.random.normal(0.0, timedev, len(ids_plan))
                  elif c_probit > 0:
                      times_rand = np.zeros(len(ids_plan), dtype=np.float32)
                      for i, t in zip(xrange(len(ids_plan)), times_exec[ids_plan]):
                          times_rand[i] = np.random.normal(0.0, c_probit * t, 1)
  
                  else:
                      times_rand = np.zeros(len(ids_plan), dtype=np.float32)
  
                  self.ids_plan[id_pers] = np.array(ids_plan)[np.argmin(times_exec[ids_plan]+times_rand)]
          return True
function_tokens: def select_plans_min_time_exec ( self , fraction = 0.1 , timedev = - 1 , c_probit = - 1 , * * kwargs ) : ids_pers_all = self . get_ids ( ) # print 'select_plans_random',len(ids_pers_all),fraction ids_pers = ids_pers_all [ np . random . random ( len ( ids_pers_all ) ) > ( 1.0 - fraction ) ] times_exec = self . get_plans ( ) . times_exec # self.ids_plan.reset() for id_pers , ids_plan_all in zip ( ids_pers , self . lists_ids_plan [ ids_pers ] ) : # print '    ids_plan_all',ids_plan_all,type(ids_plan_all) ids_plan = np . array ( ids_plan_all , dtype = np . int32 ) [ times_exec [ ids_plan_all ] > 0.1 ] if len ( ids_plan ) > 0 : # print '  id_pers,ids_plan',id_pers,ids_plan if timedev > 0.1 : times_rand = np . random . normal ( 0.0 , timedev , len ( ids_plan ) ) elif c_probit > 0 : times_rand = np . zeros ( len ( ids_plan ) , dtype = np . float32 ) for i , t in zip ( xrange ( len ( ids_plan ) ) , times_exec [ ids_plan ] ) : times_rand [ i ] = np . random . normal ( 0.0 , c_probit * t , 1 ) else : times_rand = np . zeros ( len ( ids_plan ) , dtype = np . float32 ) self . ids_plan [ id_pers ] = np . array ( ids_plan ) [ np . argmin ( times_exec [ ids_plan ] + times_rand ) ] return True