emat/model/core_files/gbnrtc_model.py
def post_process(self,
                     params: dict,
                     measure_names: List[str],
                     output_path=None):
        """
        Runs post processors associated with measures.

        For the GBNRTC model, this method calls
        TransCAD macros to generate output files.

        The model should have previously been executed using
        the `run` method.

        Args:
            params (dict):
                Dictionary of experiment variables - indices
                are variable names, values are the experiment settings
            measure_names (List[str]):
                List of measures to be processed
            output_path (str):
                Path to model outputs - if set to none
                will use local values

        Raises:
            KeyError:
                If post process is not available for specified
                measure
        """

        _logger.info("Running post process scripts at {0}".format(time.strftime("%Y_%m_%d %H%M%S")))
        
        if self.tc is None:
            self.start_transcad()
        
        if output_path is None:
            output_path = self.model_path
            
        output_path = output_path.replace("\\", "\\\\") + "\\\\"
        
        pm_done = []
        for pm in measure_names:
            # skip if performance measure handled by other macro
            if pm in pm_done: continue
            
            try:
                func, macro = self.__TRANSCAD_MACRO_BY_PM[pm]
                pm_done += func(self, macro, params, output_path)
            except KeyError:
                _logger.exception(f"Post process method for pm {pm} not available")
                raise

        Runs post processors associated with measures.

        For the GBNRTC model, this method calls
        TransCAD macros to generate output files.

        The model should have previously been executed using
        the `run` method.

        Args:
            params (dict):
                Dictionary of experiment variables - indices
                are variable names, values are the experiment settings
            measure_names (List[str]):
                List of measures to be processed
            output_path (str):
                Path to model outputs - if set to none
                will use local values

        Raises:
            KeyError:
                If post process is not available for specified
                measure
        
Runs post processors associated with measures.
For the GBNRTC model, this method calls
TransCAD macros to generate output files.

The model should have previously been executed using
the `run` method.
Runs post processors associated with measures . For the GBNRTC model this method calls TransCAD macros to generate output files . The model should have previously been executed using the ` run ` method .
def post_process(self,
                     params: dict,
                     measure_names: List[str],
                     output_path=None):
        _logger.info("Running post process scripts at {0}".format(time.strftime("%Y_%m_%d %H%M%S")))
        if self.tc is None:
            self.start_transcad()
        if output_path is None:
            output_path = self.model_path
        output_path = output_path.replace("\\", "\\\\") + "\\\\"
        pm_done = []
        for pm in measure_names:
            if pm in pm_done: continue
            try:
                func, macro = self.__TRANSCAD_MACRO_BY_PM[pm]
                pm_done += func(self, macro, params, output_path)
            except KeyError:
                _logger.exception(f"Post process method for pm {pm} not available")
                raise
def post_process ( self , params : dict , measure_names : List [ str ] , output_path = None ) : _logger . info ( "Running post process scripts at {0}" . format ( time . strftime ( "%Y_%m_%d %H%M%S" ) ) ) if self . tc is None : self . start_transcad ( ) if output_path is None : output_path = self . model_path output_path = output_path . replace ( "\\" , "\\\\" ) + "\\\\" pm_done = [ ] for pm in measure_names : if pm in pm_done : continue try : func , macro = self . __TRANSCAD_MACRO_BY_PM [ pm ] pm_done += func ( self , macro , params , output_path ) except KeyError : _logger . exception ( f"Post process method for pm {pm} not available" ) raise
Runs post processors associated with measures.
Runs post processors associated with measures .
"""
        Runs post processors associated with measures.

        For the GBNRTC model, this method calls
        TransCAD macros to generate output files.

        The model should have previously been executed using
        the `run` method.

        Args:
            params (dict):
                Dictionary of experiment variables - indices
                are variable names, values are the experiment settings
            measure_names (List[str]):
                List of measures to be processed
            output_path (str):
                Path to model outputs - if set to none
                will use local values

        Raises:
            KeyError:
                If post process is not available for specified
                measure
        """ # skip if performance measure handled by other macro
If post process is not available for specified
measure
If post process is not available for specified measure
KeyError
self
params
dict
Dictionary of experiment variables - indices
are variable names, values are the experiment settings
Dictionary of experiment variables - indices are variable names values are the experiment settings
measure_names
List[str]
List of measures to be processed
List of measures to be processed
output_path
Path to model outputs - if set to none
will use local values
Path to model outputs - if set to none will use local values