TOML primerΒΆ

The full specification for TOML files can be found here. A TOML file is separated into sections, with each section except the topmost introduced by a name in square brackets. Sections can hold key-value pairs, e.g. a name associated with a value. For instance:

general_string_attribute = "x"

[some_section]
section_attribute = 12

[some_section.subsection]
subsetion_attribute = true

TOML is quite flexible in how one can define sections and attributes. The following three examples are equivalent:

[sectors.residential.production]
name = "match"
costing = "prices"
[sectors.residential]
production = {"name": "match", "costing": "prices"}
[sectors.residential]
production.name = "match"
production.costing = "prices"

Additionally, TOML files can contain tabular data, specified row-by-row using double square bracket. For instance, below we define a table with two rows and a single column called some_table_of_data (though column is not quite the right term, TOML tables are made more flexible than most tabular formats. Rather, each row can be considered a dictionary).

[[some_table_of_data]]
a_key = "a value"

[[some_table_of_data]]
a_key = "another value"

As MUSE requires a number of data file, paths to files can be formated in a flexible manner. Paths can be formatted with shorthands for specific directories and are defined with curly-brackets. For example:

projection = '{path}/inputs/projection.csv'
timeslices_path = '{cwd}/technodata/timeslices.csv'
consumption_path = '{muse_sectors}/technodata/timeslices.csv'
path

refers to the directory where the TOML file is located

cwd

refers to the directory from which the muse simulation is launched

muse_sectors

refers to the directory where default sectoral data is located