Skip to contents

Classes

Data structures of the key model components.

newCalendar() make_timetable()
Generate a new calendar object from
newCommodity()
An S4 class to represent a commodity
newDemand()
An S4 class to declare a demand in the model
supply-class
An S4 class to represent a supply of a commodity
newTechnology() update(<technology>)
An S4 class to represent technology
newStorage()
An S4 class to represent storage type of technological process.
trade-class
An S4 class to represent inter-regional trade
import-class
An S4 class to represent commodity import from the rest of the world.
export-class
An S4 class to represent commodity export to the rest of the world.
config-class
Class (S4) to represent default model configuration.
constraint-class
Class 'constraint'
costs-class
Class 'costs'
newHorizon()
An S4 class to represent model/scenario planning horizon with intervals (year-steps)
model-class
S4 class to represent model
modInp-class
An S4 class to represent model input
modOut-class
modOut-class to store the output from the model (solution)
parameter-class
An S4 class to specify the model set or parameter
repository-class
An S4 class to store the model objects.
scenario-class
An S4 class to represent scenario, an interpolated and/or solved model.
settings-class
An S4 class to represent scenario settings
sub-class
An S4 class to represent a commodity subsidy
summand-class
Title
tax-class
An S4 class to represent a commodity tax
weather-class
Title

Building a model

Functions to create model components.

newCalendar() make_timetable()
Generate a new calendar object from
newCommodity()
An S4 class to represent a commodity
newDemand()
An S4 class to declare a demand in the model
newHorizon()
An S4 class to represent model/scenario planning horizon with intervals (year-steps)
newConstraint()
Create (equality or inequality) constraint object
newExport()
Create new export object
newImport()
Create new export object
newModel() setHorizon(<model>) getHorizon(<model>)
Create new model object
newRegistry()
Create a new registry object.
newRepository()
Create new repository object
newScenario()
Generate a new scenario object
newWeather()
Title
newStorage()
An S4 class to represent storage type of technological process.
newSupply(<character>) update(<supply>)
Create new supply object
newTechnology() update(<technology>)
An S4 class to represent technology
make_scenario_dirname()
Make a name for a scenario directory
add(<repository>) add(<model>) add(<scenario>)
Add an object to the model's repository
convert(<character>) convert(<numeric>) add_to_convert(<character>,<character>,<numeric>)
Convert units

Configuration and Settings

Model configuration and scenario settings

newCalendar() make_timetable()
Generate a new calendar object from
newHorizon()
An S4 class to represent model/scenario planning horizon with intervals (year-steps)

Solving

interpolate(<model>)
Interpolate model
write_script() write_sc() write.sc()
Write scenario object as a Python, Julia, GAMS, or MathProg script with data files to a directory
read_solution() read(<scenario>)
Read solution
solve_model() solve(<model>,<character>) solve_scenario() solve(<scenario>,<character>)
Functions and methods to solve model and scenario objects

Data manimulation

convert(<character>) convert(<numeric>) add_to_convert(<character>,<character>,<numeric>)
Convert units
convert_data
Basic units conversion database for `convert` methods
getData() get_data()
Extracts information from scenario objects, based on filters.
findData()
Performs search for available data in _scenario_ object.
findDuplicates()
Function to find duplicated values in interpolated scenario.
renameSets()
Rename data.frame columns of list of data.frames.
revalueSets()
Replace specified values with new values in factor or character columns of a data.frame.
size()
Size of an object
hour2HOUR()
Convert hours (integer) values to HOUR set 'hNN'
yday2YDAY()
Convert year-days to YDAY set 'dNNN'
tsl2dtm() tsl2year() tsl2yday() tsl2hour() tsl2month()
Convert time-slices to date-time, extract year, month, day of the year, or hour
tsl_formats
Common formats of time-slices.
tsl_guess_format()
Guess format of time-slices
drop_na_cols()
Drop columns in a data.frame with only NA values
obj2mem()
Loads objects from disk to memory
isInMemory()
Is object stored in memory?
register()
Register an object in the registry.
get_registry()
Returns the current registry object.
save_scenario()
Save scenario object on disk in parquet format using `arrow` package.
load_scenario()
Load scenario (in progress)

Visualisation

draw.technology()
Schematic representation of technology

Validation

check_name()
Check validity of object names

energyRt options and settings

set_gams_path() get_gams_path() set_gdxlib_path() get_gdxlib_path()
Set GAMS and GDX library directory
newModel() setHorizon(<model>) getHorizon(<model>)
Create new model object
set_scenarios_path() get_scenarios_path()
Set or get directory for/with scenarios
set_progress_bar() show_progress_bar()
Switch on/off and select/customize progress bar
settings-class
An S4 class to represent scenario settings
set_glpk_path()
Set the path to the GLPK library
set_julia_path()
Set the path to Julia installation
set_python_path()
Set or get python installation path to be used to solve models
make_scenario_dirname()
Make a name for a scenario directory