Energy System Modeling with R
A post-conference online series following useR! 2026
Preface
This training introduces energy system modeling in R with the energyRt package — energy system modeling with a familiar R workflow: you describe the system as R objects, energyRt compiles and solves the optimization model on one of several mathematical-programming backends (GLPK, Julia/JuMP, Python/Pyomo, or GAMS), and results come back as tidy tables.
New to R, or returning after a while? R: setup and resources collects the essentials — where to get R and an IDE, a couple of short introductions, the packages worth having before we start, and the cheatsheets to keep open during the sessions.
The Installation chapter then walks through installing the energyRt package and at least one solver backend, so your machine is ready for the hands-on sessions.
Once you are set up, Your first energy model starts from the smallest model that can exist — so small it does not work — and grows it one object at a time until it burns coal and emits CO2. One region, one year, one time slice: nothing competing for attention with the energy balance itself.
Slides
Building blocks of an energyRt model »
A reference deck covering the new*() constructors and the system around them: where objects live in time (calendars, horizons) and space (regions, geoscales), commodities in depth, vintages and clusters, how a description becomes numbers, how scenarios are composed, what to do about large models, and how results are read. Every diagram in it is generated by the package itself.
It is used in the sessions and written to be browsable afterwards — features that are experimental or still in development are marked as such, so it doubles as an honest map of where the project currently stands.
Questions and discussion
Questions between sessions are welcome — and best asked in the open, where the answer helps everyone else too.
Ask here: the course Q&A thread on Mastodon
Reply to that post with anything: an install that will not cooperate, a modeling question, a result you cannot explain, or something you built and want to show. Beginner questions are explicitly welcome — that is what the thread is for.
Mastodon is a decentralized network: you register on any one server and can follow, reply to, and interact with people on all the others. If you have no preference, mastodon.social is the largest general server and a fine default — sign up there and you can reply to the thread straight away.
Two things that trip people up when they arrive:
- To find us from your own server, search for the full handle
@optimal2050@mstdn.science— not justoptimal2050, which only searches your own server. - Follow @optimal2050@mstdn.science rather than relying on the hashtag. Hashtag timelines only show posts your server has already seen, so following the account is what reliably brings the updates to you.
Tag your own posts about the course with #optimal2050 so others can find them.
The installation chapter shows every command but does not run any of them at render time — copy each command into your own R session to execute it.