Parameters#
- class caf.van.utilities.Parameters(path=None, params=None)[source]#
Class for reading the parameters given and creating an empty parameter file for input.
Attributes
Methods
__init__([path, params])Initiate the parameters class by reading file if given, using parameters if given or with defaults.
check_params(parameters, expected, name)Checks if parameters contain expected.
read(path)Read the paramters file given, using json.
write(path)Write parameters to file.
Attributes Documentation
- DEFAULT_PARAMETERS = {'INPUT': {'FILEPATH': '', 'INPUT_COLUMNS': {'Destination': 'D', 'Origin': 'O', 'Trips': 'Annual_PCU/Annual_Tonnage', '_comment': 'Names of the columns in the input data.'}, 'INPUT_FORMAT': 'TSV/CSV', 'TIME_PERIODS': {'AM': None, 'IP': None, 'OP': None, 'PM': None, '_comment': 'Time period conversion factors.'}, '_comment': 'Parameters for one run of the process'}, 'LOOKUPS': {'REZONED_SECTOR_LOOKUP': {'FILEPATH': '', 'INPUT_COLUMNS': {'new': '', 'old': '', 'splitting_factor': ''}, 'INPUT_FORMAT': 'TSV/CSV', '_comment': 'Parameters for the sector OD tables to be produced, for the rezoned and output matrices, optional.'}, 'SECTOR_LOOKUP': {'FILEPATH': '', 'INPUT_COLUMNS': {'new': '', 'old': '', 'splitting_factor': ''}, 'INPUT_FORMAT': 'TSV/CSV', '_comment': 'Parameters for the sector OD tables to be produced, for the input matrix, optional.'}, 'ZONE_LOOKUP': {'FILEPATH': '', 'INPUT_COLUMNS': {'new': '', 'old': '', 'splitting_factor': ''}, 'INPUT_FORMAT': 'TSV/CSV', '_comment': 'Parameters for the rezoning process, optional.'}}, '_comment': 'Parameter file for NoHAM-FPT, can run process on multiple files at once by creating different input blocks. Input blocks can have any name.'}#