Skip to content

cuixueqin/gdxtools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gdxtools

The gdxtools package converts data (parameter or variables) from a GDX file (produced by the GAMS software) into a data.frame. It also provides a function to get information on a GDX file. This package is based on the R interface provided by GAMS software gdxrrw

Installation

install.packages("gdxtools.zip",repos=NULL)

or

library("devtools")
install_github('lolow/gdxtools')

Usage

library(gdxtools)

# define a gdx
mygdx <- gdx('results.gdx')

# get information on all items in the gdx
all_items(mygdx)

# create a data.frame from a parameter
travel_cost <- mygdx["travel_cost"]

# create a data.frame from the lower bound of a variable
lo_travel_time <- mygdx["travel_time", field="lo"]

# create a data.frame from the marginal value of an equation
m_time_constraint <- mygdx["time_constraint", field="m"]

About

manipulate GDX files in R

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%