parameters: (self, ids_person)
return_statement: return preeval
docstring: Preevaluation strategies for person IDs in vector ids_person.
  
          Returns a preevaluation vector with a preevaluation value 
          for each person ID. The values of the preevaluation vector are as follows:
              -1 : Strategy cannot be applied
              0  : Stategy can be applied, but the preferred mode is not used
              1  : Stategy can be applied, and preferred mode is part of the strategy
              2  : Strategy uses predomunantly preferred mode
docstring_summary: Preevaluation strategies for person IDs in vector ids_person.
docstring_tokens: Preevaluation strategies for person IDs in vector ids_person .
function: def preevaluate(self, ids_person):
          """
          Preevaluation strategies for person IDs in vector ids_person.
  
          Returns a preevaluation vector with a preevaluation value 
          for each person ID. The values of the preevaluation vector are as follows:
              -1 : Strategy cannot be applied
              0  : Stategy can be applied, but the preferred mode is not used
              1  : Stategy can be applied, and preferred mode is part of the strategy
              2  : Strategy uses predomunantly preferred mode
  
          """
          n_pers = len(ids_person)
          persons = self.get_virtualpop()
          preeval = np.zeros(n_pers, dtype=np.int32)
  
          # TODO: here we could exclude by age or distance facilities-stops
  
          # put 0 for persons whose preference is not public transport
          preeval[persons.ids_mode_preferred[ids_person] != self.prtservice.id_prtmode] = 0
  
          # put 2 for persons  who prefer prt (probably few in pre PRT times)
          preeval[persons.ids_mode_preferred[ids_person] == self.prtservice.id_prtmode] = 2
  
          print '  HcPrtStrategy.preevaluate', len(np.flatnonzero(preeval))
          return preeval
function_tokens: def preevaluate ( self , ids_person ) : n_pers = len ( ids_person ) persons = self . get_virtualpop ( ) preeval = np . zeros ( n_pers , dtype = np . int32 ) # TODO: here we could exclude by age or distance facilities-stops # put 0 for persons whose preference is not public transport preeval [ persons . ids_mode_preferred [ ids_person ] != self . prtservice . id_prtmode ] = 0 # put 2 for persons  who prefer prt (probably few in pre PRT times) preeval [ persons . ids_mode_preferred [ ids_person ] == self . prtservice . id_prtmode ] = 2 print '  HcPrtStrategy.preevaluate' , len ( np . flatnonzero ( preeval ) ) return preeval