emat/model/core_files/gbnrtc_model.py
def __set_bailey_transit_strategy(self, macro, evar, exp_var): 
        ''' call TransCAD macro and return both strategies to completed list'''
        # bailey transit and micro mobility strategies are interdependent
        tserv = exp_var['Bailey Transit Service']
        mobhub = int(exp_var['Bailey Mobility Hubs'])
        mmob =  int(exp_var['Bailey Micro-Mobility'])
        
        ttime = 0
        thead = 0
        
        if tserv == 'improved headway':
            thead = 1
        elif tserv == 'traffic priority':
            ttime = 1
        elif tserv == 'brt':
            ttime = 1
            thead = 1
            

        self.tc.RunMacro("G30 File Close All", self.exp_param_ui)  
        ret = self.tc.RunMacro(macro, 
                               self.exp_param_ui, 
                               self.mod_path_tc,
                               ttime, mobhub, mmob)
        
        if ret != 0:
            raise SystemError("Error in setting Bailey travel time / Mobility Hubs to {0}/{1}" 
                              .format(ttime, mobhub)) 
            
        self.tc.RunMacro("G30 File Close All", self.exp_param_ui)  
        ret = self.tc.RunMacro("Headway", 
                               self.exp_param_ui, 
                               self.mod_path_tc,
                               thead)
        
        if ret != 0:
            raise SystemError("Error in setting Bailey service headway component to {0}"
                              .format(thead))             
            
        return ['Bailey Transit Service', 'Bailey Mobility Hubs', 'Bailey Micro-Mobility']
 call TransCAD macro and return both strategies to completed list
call TransCAD macro and return both strategies to completed list
call TransCAD macro and return both strategies to completed list
def __set_bailey_transit_strategy(self, macro, evar, exp_var): 
        tserv = exp_var['Bailey Transit Service']
        mobhub = int(exp_var['Bailey Mobility Hubs'])
        mmob =  int(exp_var['Bailey Micro-Mobility'])
        ttime = 0
        thead = 0
        if tserv == 'improved headway':
            thead = 1
        elif tserv == 'traffic priority':
            ttime = 1
        elif tserv == 'brt':
            ttime = 1
            thead = 1
        self.tc.RunMacro("G30 File Close All", self.exp_param_ui)  
        ret = self.tc.RunMacro(macro, 
                               self.exp_param_ui, 
                               self.mod_path_tc,
                               ttime, mobhub, mmob)
        if ret != 0:
            raise SystemError("Error in setting Bailey travel time / Mobility Hubs to {0}/{1}" 
                              .format(ttime, mobhub)) 
        self.tc.RunMacro("G30 File Close All", self.exp_param_ui)  
        ret = self.tc.RunMacro("Headway", 
                               self.exp_param_ui, 
                               self.mod_path_tc,
                               thead)
        if ret != 0:
            raise SystemError("Error in setting Bailey service headway component to {0}"
                              .format(thead))             
        return ['Bailey Transit Service', 'Bailey Mobility Hubs', 'Bailey Micro-Mobility']
def __set_bailey_transit_strategy ( self , macro , evar , exp_var ) : tserv = exp_var [ 'Bailey Transit Service' ] mobhub = int ( exp_var [ 'Bailey Mobility Hubs' ] ) mmob = int ( exp_var [ 'Bailey Micro-Mobility' ] ) ttime = 0 thead = 0 if tserv == 'improved headway' : thead = 1 elif tserv == 'traffic priority' : ttime = 1 elif tserv == 'brt' : ttime = 1 thead = 1 self . tc . RunMacro ( "G30 File Close All" , self . exp_param_ui ) ret = self . tc . RunMacro ( macro , self . exp_param_ui , self . mod_path_tc , ttime , mobhub , mmob ) if ret != 0 : raise SystemError ( "Error in setting Bailey travel time / Mobility Hubs to {0}/{1}" . format ( ttime , mobhub ) ) self . tc . RunMacro ( "G30 File Close All" , self . exp_param_ui ) ret = self . tc . RunMacro ( "Headway" , self . exp_param_ui , self . mod_path_tc , thead ) if ret != 0 : raise SystemError ( "Error in setting Bailey service headway component to {0}" . format ( thead ) ) return [ 'Bailey Transit Service' , 'Bailey Mobility Hubs' , 'Bailey Micro-Mobility' ]
call TransCAD macro and return both strategies to completed list
call TransCAD macro and return both strategies to completed list
''' call TransCAD macro and return both strategies to completed list''' # bailey transit and micro mobility strategies are interdependent
self
macro
evar
exp_var