Learn R Programming

'GAMS' Modularization Support Package

R package gms, version 0.31.2

Purpose and Functionality

A collection of tools to create, use and maintain modularized model code written in the modeling language 'GAMS' (https://www.gams.com/). Out-of-the-box 'GAMS' does not come with support for modularized model code. This package provides the tools necessary to convert a standard 'GAMS' model to a modularized one by introducing a modularized code structure together with a naming convention which emulates local environments. In addition, this package provides tools to monitor the compliance of the model code with modular coding guidelines.

Installation

For installation of the most recent package version an additional repository has to be added in R:

options(repos = c(CRAN = "@CRAN@", pik = "https://rse.pik-potsdam.de/r/packages"))

The additional repository can be made available permanently by adding the line above to a file called .Rprofile stored in the home folder of your system (Sys.glob("~") in R returns the home directory).

After that the most recent version of the package can be installed using install.packages:

install.packages("gms")

Package updates can be installed using update.packages (make sure that the additional repository has been added before running that command):

update.packages()

Questions / Problems

In case of questions / problems please contact Jan Philipp Dietrich dietrich@pik-potsdam.de.

Citation

To cite package gms in publications use:

Dietrich J, Klein D, Giannousakis A, Beier F, Koch J, Baumstark L, Pflüger M, Richters O (2024). gms: 'GAMS' Modularization Support Package. doi: 10.5281/zenodo.4390032 (URL: https://doi.org/10.5281/zenodo.4390032), R package version 0.31.2, <URL: https://github.com/pik-piam/gms>.

A BibTeX entry for LaTeX users is

@Manual{,
 title = {gms: 'GAMS' Modularization Support Package},
 author = {Jan Philipp Dietrich and David Klein and Anastasis Giannousakis and Felicitas Beier and Johannes Koch and Lavinia Baumstark and Mika Pflüger and Oliver Richters},
 year = {2024},
 note = {R package version 0.31.2},
 doi = {10.5281/zenodo.4390032},
 url = {https://github.com/pik-piam/gms},
}

Copy Link

Version

Install

install.packages('gms')

Monthly Downloads

440

Version

0.31.2

License

BSD_2_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Jan Dietrich

Last Published

June 29th, 2024

Functions in gms (0.31.2)

convert.modularGAMS

convert.modularGAMS
getfiledestinations

getfiledestinations
is.modularGAMS

is.modularGAMS
interfaceplot

interfaceplot
fulldataOutput

fulldataOutput
getLine

getLine
selectScript

selectScript
setScenario

setScenario
getModules

getModules
publish_data

Publish data in a repository
get_info

get_info
gms-package

gms: 'GAMS' Modularization Support Package
download_distribute

Download and unpack compressed data from repositories
model_lock

Model lock/unlock
module.skeleton

Create a Module skeleton
readDeclarations

readDeclarations
model_dependencies

Function to detect R package dependencies
readDefaultConfig

readDefaultConfig
download_unpack

Download and unpack compressed data from repositories
readFileOrVector

readFileOrVector
copy_input

copy_input
tardir

Create tgz archive from directory
loadConfig

Load Config
delete_olddata

delete_olddata
modules_interfaceplot

modules_interfaceplot
saveConfig

Save Config
update_fulldataOutput

update_fulldataOutput
replace_in_file

Replace in File
read_yaml_header

read_yaml_header
readSettings

readSettings
updateInterfaceMapping

updateInterfaceMapping
writeSets

writeSets
update_modules_embedding

Update Modules Embedding in GAMS code
path

path
readSetglobals

readSetglobals
readParameterValues

readParameterValues
settingsCheck

settingsCheck
singleGAMSfile

Merge GAMS code into single file
codeCheck

codeCheck
checkDescription

checkDescription
chooseFromList

chooseFromList
checkSwitchAppearance

checkSwitchAppearance
GAMScodeFilter

GAMScodeFilter
checkAppearance

checkAppearance
check_config

Check config
codeExtract

codeExtract
checkNoTabs

checkNoTabs