Skip to contents

Classes

Data structures of the key model components.

storage-class
An S4 class to represent storage type of technological process.
subsidy-class
An S4 class to represent a commodity subsidy
tax-class
An S4 class to represent a commodity tax
supply-class
An S4 class to represent a supply of a commodity
class-calendar
An S4 class to represent sub-annual time resolution structure.
class-commodity
An S4 class to represent a commodity
class-config
An S4 class to represent default model configuration.
class-constraint class-summand experimental
An S4 class to represent a custom constraint.
class-costs
An S4 class to add costs to objective function
class-demand
An S4 class to declare a demand in the model
class-export
An S4 class to represent commodity export to the rest of the world.
class-horizon
An S4 class to represent model/scenario planning horizon with intervals (year-steps)
class-import
An S4 class to represent commodity import from the rest of the world.
class-model
An S4 class to represent model
class-modInp
An S4 class to represent model input
class-modOut
An S4 class to store results of a solved scenario
class-parameter
An S4 class to specify the model set or parameter
class-repository
An S4 class to store the model objects.
class-scenario
An S4 class to represent scenario, an interpolated and/or solved model.
class-settings
An S4 class to represent scenario settings
class-technology
An S4 class to represent technology
class-trade
An S4 class to represent inter-regional trade
class-weather
S4 class to represent weather factors

Building a model

Functions to create model components.

newCalendar()
Generate a new calendar object from
newCommodity()
Create new commodity object
newConstraint() isConstraint() newConstraintS()
Create constraint object to add custom constraints to the model.
newCosts()
Create new costs object
newDemand() update(<demand>)
Create new demand object
newExport()
Create new export object
newHorizon() update(<horizon>) setHorizon(<config>) update(<config>)
Create a new object of class 'horizon'
newImport()
Create new export object
newModel() setHorizon(<model>) getHorizon(<model>)
Create new model object
newRegistry() experimental
Create a new registry object.
newRepository()
A constructor for the repository class
newScenario()
Generate a new scenario object
newSub()
Create a new subsidy object
newSupply()
Constructor for supply object.
newTax()
Create a new tax object
newTrade()
Create new trade object
newWeather()
Create new weather object
newStorage()
Create new storage object
newTechnology() update(<technology>)
Create a new "technology" object.
make_timetable()
Create timetable of time-slices from given structure as a list
make_scenario_dirname()
Make a name for a scenario directory
update(<export>) update(<weather>)
Update export object
update(<supply>)
Update supply object
update(<storage>) update(<trade>) update(<import>)
Update trade object
add(<repository>) add(<model>)
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

class-config
An S4 class to represent default model configuration.
class-settings
An S4 class to represent scenario settings
class-calendar
An S4 class to represent sub-annual time resolution structure.
newCalendar()
Generate a new calendar object from
class-horizon
An S4 class to represent model/scenario planning horizon with intervals (year-steps)
newHorizon() update(<horizon>) setHorizon(<config>) update(<config>)
Create a new object of class 'horizon'

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'
tsl_formats tsl_sets dtm2tsl() tsl2dtm()
Common formats of time-slices.
tsl2year() tsl2yday() tsl2hour() tsl2month()
Mapping function between time-slices and day of the year
tsl_guess_format()
Guess format of time-slices
drop_na_cols()
Drop columns in a data.frame with all NA values
obj2mem()
Loads objects from disk to memory
isInMemory()
Is object stored in memory?
register() experimental
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()
Draw a schematic representation of a process
set_progress_bar() show_progress_bar()
Switch on/off and select/customize progress bar

Validation

check_name()
Check validity of object's names used in sets
levcost()
Calculate levelized costs of commodity production

Exporting

print()
Print methods for the energyRt classes

energyRt options and settings

utils

en_install_julia_pkgs()
Install Julia packages
get_slot_info()
Retrieve slot details in rd-format