Learn R Programming

gms (version 0.31.2)

update_modules_embedding: Update Modules Embedding in GAMS code

Description

A function that updates in the GAMS code all include commands which are related to Modules. The function automatically checks which modules exist and which files in these modules exist and creates the corresponding include commands in GAMS

Usage

update_modules_embedding(
  modelpath = ".",
  modulepath = "modules/",
  includefile = "modules/include.gms",
  verbose = FALSE
)

Arguments

modelpath

Path to the model that should be updated (main folder).

modulepath

Module path within the model (relative to the model main folder)

includefile

Name and location of the file which includes all modules (relative to main folder)

verbose

Defines whether additional information should be printed or not.

Author

Jan Philipp Dietrich

Examples

Run this code
# copy dummymodel to temporary directory and update module embedding
file.copy(system.file("dummymodel", package="gms"), tempdir(), recursive = TRUE)
model   <- paste0(tempdir(),"/dummymodel")
update_modules_embedding(model)

Run the code above in your browser using DataLab