Functions

This page documents the core support functions that handle data input/output and model workflow management in the TransComp package.

Overview

The functions in this section provide essential utilities for:

  • Data Input: Reading and parsing YAML configuration files
  • Data Processing: Validating and transforming input data into model-ready formats
  • Results Management: Saving optimization results and model outputs

These functions form the foundation for setting up and running transport optimization models, handling the interface between user-provided data and the optimization engine.

Support Functions

TransComp.get_input_dataFunction
get_input_data(path_to_source_file::String)

This function reads the input data and checks requirements for the content of the file.

Arguments

  • pathtosource_file::String: path to the source file

Returns

  • data_dict::Dict: dictionary with the input data
source
TransComp.parse_dataFunction
parse_data(data_dict::Dict)

Parses the input data into the corresponding parameters in struct format from structs.jl.

Arguments

  • data_dict::Dict: dictionary with the input data

Returns

  • data_structures::Dict: dictionary with the parsed data
source
TransComp.save_resultsFunction
save_results(model::Model, case::String, data_structures::Dict, write_to_file::Bool = true, folder_for_results::String = "results")

Saves the results of the optimization model to YAML files.

Arguments

  • model::Model: JuMP model
  • case::String: name of the case
  • data_structures::Dict: dictionary with the input data
  • write_to_file::Bool: whether to write results to file (default: true)
  • folder_for_results::String: name of the folder to save the results (default: "results")
source