Module input

Source
Expand description

Common routines for handling input data.

Modulesยง

agent ๐Ÿ”’
Code for reading in agent-related data from CSV files.
asset ๐Ÿ”’
Code for reading Assets from a CSV file.
commodity ๐Ÿ”’
Code for reading in commodity-related data from CSV files.
process ๐Ÿ”’
Code for reading process-related information from CSV files.
region ๐Ÿ”’
Code for reading region-related information from CSV files.
time_slice ๐Ÿ”’
Code for reading in time slice info from a CSV file.

Functionsยง

_read_csv_internal ๐Ÿ”’
check_fractions_sum_to_one ๐Ÿ”’
Check that fractions sum to (approximately) one
deserialise_proportion_nonzero ๐Ÿ”’
Read an f64, checking that it is between 0 and 1
input_err_msg
Format an error message to include the file path. To be used with anyhow::Context.
load_model
Read a model from the specified directory.
read_csv
Read a series of type Ts from a CSV file.
read_csv_id_file ๐Ÿ”’
Read a CSV file of items with IDs.
read_csv_optional
Read a series of type Ts from a CSV file.
read_toml
Parse a TOML file at the specified path.
try_insert
Inserts a key-value pair into a HashMap if the key does not already exist.