process_folder: Convert PLEXOS files to SQLite databases

Description Usage Arguments Details Examples

Description

Functions to process PLEXOS solution and input files and dump them into SQLite databases that are easier to read.

Usage

1
2
3
4
5
process_folder(folders = ".", keep.temp = FALSE)

process_input(file)

process_solution(file, keep.temp = FALSE)

Arguments

folders

Folder(s) to process (See details)

keep.temp

Should temporary databases be preserved?

file

Single PLEXOS solution or input file to process

Details

process_solution converts a single zipped PLEXOS solution into a SQLite database. The resulting database file has a simplified structure so data can be retrieved easily. The temporary database contains the original data structure in the PLEXOS solution file.

process_input converts a single PLEXOS input file (in XML form) solution into a SQLite database. The database includes the raw tables and a series of views that better organize the data.

process_folders is used to process one or more folders. It searches each folder for PLEXOS solution or input files and applies process_solution or process_input to each one of them.

The default folder is the working directory. If the wildcard "*" is provided, all the folders in the working directory will be processed (the list of folders if provided by the list_folders function).

Do not rename the SQLite databases created with these functions. Other code expects those filenames to remain unchanged.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Process the folder with the solution file provided by rplexos
location_solution <- location_solution_rplexos()
process_folder(location_solution)

# Process the folder with the input file provided by rplexos
# location_input <- location_input_rplexos() (for the moment, there is a bug in the soln file)
# process_folder(location_input)

# Other examples
## Not run: process_folder()
## Not run: process_solution("HiWind/Model WWSIS_c_RT_CoreB_M01_SC3 Solution.zip")
## Not run: process_input("WWSIS model.xml")


Search within the rplexos package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.