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ยง
- check_
values_ ๐sum_ to_ one_ approx - Check that fractions sum to (approximately) one
- deserialise_
proportion_ nonzero - Read a Dimensionless float, checking that it is between 0 and 1
- format_
items_ with_ cap - Format a list of items with a cap on display count for error messages
- input_
err_ msg - Format an error message to include the file path. To be used with
anyhow::Context
. - is_
sorted_ and_ unique - Check whether an iterator contains values that are sorted and unique
- load_
commodity_ graphs - Load commodity flow graphs for a model.
- load_
model - Read a model from the specified directory.
- read_
csv - Read a series of type
T
s from a CSV file. - read_
csv_ ๐id_ file - Read a CSV file of items with IDs.
- read_
csv_ ๐internal - read_
csv_ optional - Read a series of type
T
s 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.