Initiatives for Teaching Energy Modelling to Graduate Students

The Institut de l’énergie Trottier of the École Polytechnique de Montréal offers four new masters in energy programmes. Enrolling graduate students come from diverse backgrounds and there is a need for an intense introductory course on energy modelling. Such a new course has been created to propose a hands-on experience that enlightens their understanding of what energy modelling is. Powerful yet simple tools such as OSeMOSYS and LEAP are used. Links with economics and environmental issues are discussed. This paper presents an overview of the various topics studied in class and will allow anyone interested in creating a similar course to have a starting point to help them on their quest to develop highly qualified professionals. Individuals completing this course gain a general overview of the field and are ready to pursue further study with the necessary knowledge to do so. It will help them to communicate their work with professionals that may not be used to work with operation research (OR) specialists. The approach is also useful for anyone wanting to learn more on the subject. A course outline completes the paper.


Introduction
Which topics shall be included in a course outline on energy modelling? Which software could be used to tackle problems associated with the energy sector? How can government officials develop policies to meet medium-to-longterm targets on CO 2 e emissions (and what is CO 2 e)? How can one learn and teach about the subject and communicate his/her findings to the non-experts decision makers?
The Institut de l'énergie Trottier [1] of theÉcole Polytechnique de Montréal [2] offers four new masters in energy programmes [3]. Enrolling graduate students come from diverse backgrounds. In order to answer questions as the ones above, a new course on energy modelling has been created [4] which proposes an hands-on experience that enlighten their understanding of what energy modelling is.
Students are graduates from engineering, economics, mathematics, environmental or other fields. Some of them know a lot about technical issues related to technologies (energy efficiency, life duration, needed input and effective output, ...), while others are familiar with the law of supply and demand or elasticity issues, the impact of discounting the costs in a long-term analysis, algebraic mathematical modelling languages, or policy-making under severe greenhouse gases limitations. But none of them have a basic knowledge of all these topics and of some specific software used to tackle such issues using an integrated approach. The proposed course outline is particular in the fact that it proposes an overview which encompasses these important notions. It (of course) can not be an in-depth development on the subject but it does offer a coherent multi-disciplinary approach which reflects some of the work done in energy modelling worldwide. Individuals able to grasp a good knowledge of the topics included in this course will be well-prepared to pursue their studies on the subject.
A fine example of a follow-up graduate course is proposed by Montreal's HEC business school: 6-639-13: Modèles d'aideà la décision enénergie (see [5]). It offers a wide range of applications on energy modelling using more advanced mathematical models such as mixed-integer, nonlinear and stochastic programming. It also presents multiobjectives optimization. Students that choose this path confirm that both courses are a great duo in learning energy modelling.
A course on Energy Systems Modelling is offered at the University College Cork (UCC) of Cork, Ireland (see [6]). It proposes TIMES instead of OSeMOSYS. UCC's course seems to be more heavily technically detailed and less accessible for students coming from wider backgrounds. It would be another great complement course to the one proposed at Montreal's Polytechnique.
This paper proposes an overview of a new course on energy modelling and presents its course outline. Despite its use of appropriate expertise on particular science issues, it can also be read as an introduction to the subject by skipping parts of the paper without losing the insight given by such an approach.

Objectives
The main objective of the paper is to describe the content of an intense introductory new course on energy modelling 452 Initiatives for Teaching Energy Modelling to Graduate Students for students coming from various backgrounds in order to prepare them for further study in the field. The proposed hands-on experience approach offers to students, experts and decision makers of the energy sector a common ground on which they can build to analyse, discuss and share knowledge on different issues related to the field.
Students will discover issues about energy modelling and ways to work in such an environment. Experts will gain by being in contact with what is considered to be an innovative approach to teach and learn about it using the given course outline as a starting point for creating a course of their own. Decision makers will understand how scientists can assist them in the development of coherent and sound policies to answer difficult problems. Above all, the underlined goal is to help all the actors of the energy sector to have some common grounds to communicate about the important issues ahead for society.

Course Description
The proposed course on energy modelling is given over a 13-week period of 3 hours each in class (work outside class is also expected). It is based on an integrated techno-economic bottom-up approach (these terms will be explained in the text). It implies a disaggregated description of all technologies involved in all the different sectors linked to energy: production, consumption (residential, commercial/institutional, industrial and agriculture), importations and exportations of all types of energy fuels. Optimization and simulation software are used.
But who uses such tools? What are the real world problems faced by our leaders?

Cities, States and Countries Need Energy Modelling
In the province of Quebec (Canada), many cities have produced local inventories of their energy use and greenhouse gases (GHG) emissions. This is the basic level of energy modelling. The course being taught in french, students must navigate through documents produced for cities within the province of Quebec, Canada, such as the small city of St-Jean-sur-Richelieu [7] or the province capital, which is Quebec [8] (many similar documents are available in english; see for example the region of Chicago [9]). States examples of studies involving energy are also analysed (see California [10]). Tools are proposed by the US Environmental Protection Agency (USEPA) to assist experts to accomplish such a task [11]. The case of Canada is presented in [12]. This document offers a comprehensive study that is an excellent introduction to the subject (see Figure 1 for an example of long-term results). A country such as Ireland proposes interesting documents to understand the problems faced by its government on long-term energy planning (see for example [13]). Canada's National Inventory Report [14] is another interesting document to know more about the country's energy use.
Discussions on medium-to-long-term scenarios are encouraged in class (for example on negotiation on emissions targets among very diverse countries). It is important to know the difference between CO 2 and CO 2 e (or CO 2 -eq): carbon dioxyde (CO 2 ) is one type of greenhouse gas and CO 2 e is an equivalent of CO 2 for GHG emissions purposes. For example, emission of one ton of CH 4 is equivalent to 25 tons of CO 2 (see [15]). This course is not about setting limits on greenhouse gases emissions by 2020, 2050 or 2100. We emphasize on the fact that the objective is to assist decision makers in finding out how technological decisions and government policies can be used to reach a specific target that they select.

The Approach
The course proposes an integrated techno-economic bottom-up approach. It is (1) integrated in the sense that it includes all the energy "food-chain" from the extraction of primary energy fuels to its modification into final energy that is used by technologies to satisfy some demand. For example, crude oil can be transformed into gasoline for cars to satisfy the need to go from point A to point B. This need to go from a place to another by car can also be met by using electric cars using cleaner energy such as hydro-electricity. Competition is not only between electric cars and gasoline cars but must involve the costs associated through all the steps of the process. It is (2) techno-economic because technical data (efficiency, life expectancy, annual availability, etc.) and economic data (investment prices, maintenance cost, fuel cost, etc.) are used. It also is (3) bottom-up because it uses a very detailed description of a region's long list of production, transformation and demand technologies which are all competing to satisfy the disaggregated needs of that specific region. For example, the residential sector is broken down into many individual demands such as water heat, space heat, appliances, etc., and each one of these demands must be satisfied using possibly many competing technologies. Decisions made in the residential sector influence the ones that need to be made in the transport sector and all other sectors as well.
Some time must also be allowed for issues on economics such as supply and demand, maximization of social surplus and the concept of marginal analysis. Consumer behaviour [16] is also discussed as it can have a low-costhigh-importance to solve energy-related environmental issues. The behaviour can be a "morally" new attitude towards energy choices or simply an economic reaction to price (which is known as elasticity). A good introduction to such economic issues is presented in [17]. Finally, the effect of discounting on long-term decisions must be discussed. A change in the discount rate can greatly affect decisions for long-term scenarios.

Simulation
The "simple" task of modelling the current existing energy sector of a country involves an important amount of work. The Long range Energy Alternatives Planning system (LEAP) software [18,19] can assist a professional in performing such task. Moreover, it allows one to simulate different short-medium-to-long-term scenarios. LEAP's learning curve is quite smooth, thanks to its powerful training material readily available and accessible to students [20]. It is based on a fictive region of the world called Freedonia. (Figure 2) gives an example of a LEAP's screenshot.
This training material fully describes the steps that need to be implemented in order to model the current and future situation of a country (or a city, a state or a group of countries). Students will appreciate to create a detailed description of an  Teaching is made easy by first representing the residential demand sector and the energy generation, transmission and distribution needed to satisfy the residential demands. A longterm scenario is proposed and results are discussed. This scenario is the basecase, reference or business-as-usual scenario. An alternative demand-side management (DSM) scenario is proposed. This is an easy yet powerful way to analyse the impact of new and more energy efficient technologies.
Other chapters of the training material include the description of the industrial, transportation and commercial sectors, a detailed description of the supply side of the energy sector and many interesting subjects such as a cost-benefit analysis and a transportation study.
Moving through the chapters, students (and decision makers) get to learn about numerous energy-related and technology-related topics such as the following: working with energy units (which is an underestimated topic), describing a technology through its technical and economic characteristics, how to analyse results effectively, what is a reference scenario and an alternative scenario, transmission losses, what is a load curve and a load factor and the impact of demand-side management over these, finding what an energy balance is, the effect of different policies on technological choices, and many other technical issues involved in energy modelling. (Figure 3) gives an example of the impact of a flat load curve (due to some demand-side management versus a reference scenario) on the necessary installed production capacity to satisfy energy consumption. Note that in this example the total amount of energy produced is identical in both scenarios. The load factor varies from 48.8% in the Reference Scenario to 63.4% in the alternative Demand-Side Management Scenario.
LEAP is a very powerful tool for simulations. It is available free of charge for students. They must register through the new LEAP homepage [21] (June 2016). Being part of the LEAP community is a great addition to one's network with energy professionals.
The last section of LEAP's training material presents a link between LEAP's simulation capability and optimisation via OSeMOSYS, which is the next topic to be studied in class.

Optimization
Optimization can be seen as an extension to simulation. It offers the same coherence in decisions to satisfy multiple end-use demands. The important difference is that optimization will not "simply" show the results and impacts of a particular scenario but it rather proposes optimal decisions in the sense that the technological and energy choices will maximize or minimize a particular objective. For example, the usual objective in techno-economic energy models is the minimization of the total discounted cost of the whole energy system (including the cost of fuels, investment, maintenance and level of activity of all technologies involved in the system for energy production and consumption).

Linear Programming
The approach adopted here is similar to the well-known TIMES model (The Integrated MARKAL-EFOM System [22]) used in many countries. The TIMES model is supervised by the ETSAP organisation (Energy Technology Systems Analysis Program [23]). TIMES is a linear programming model. Although most students know about linear programming, a brief overview of linear programming is compulsory and must include marginal analysis. The marginal value associated to the constraints on GHG emissions is an important result that helps to recognize the magnitude of the financial impact associated with a particular limit on emissions. Interesting basic general models can be found in [24] and solved using Excel's Solver.

Mathematical algebraic modelling languages
Although widely used in school as a learning tool and albeit its very ease of use, Excel's Solver is usually not the proper tool for large models involving many decisions over a long-term horizon. Specialized mathematical algebraic modelling languages are available. These languages are not typical programming languages such as C# or other quite complex tools that would require a steep learning curve and could not be part of the proposed course. Algebraic modelling languages are on the contrary fairly simple to "read" for beginners and eventually not to difficult to create for someone with a proper basis in mathematics (which shall be the case with graduate students from an engineering school). Some may argue that learning how to use an algebraic modelling language asks too much of a learning curve. The answer to this issue is that (1) this course is proposed to highly motivated graduate students and (2) one can follow the rest of the course without having too much difficulties even if he/she does not fully grasps this part of the material. ) is used in class. This package includes the mathematical programming language GNU Mathprog and a solver glpsol for linear programming problems. The original OSeMOSYS model has been created using GLPK [31] (a GAMS version is also available).
The best way to learn mathematical algebraic modelling languages is to create a basic example such as the transportation problem mentioned above. The mathematical model, its GLPK equivalent representation and its associated data file are given in the annex to this paper.

OSeMOSYS Energy Model and the UTOPIA example
OSeMOSYS has been officially presented for the first time at the 2010 International Energy Workshop in Stockholm. It offers a basic energy model that leads students and nonexperts in learning much of the material that shall be known by future users of more powerful models like TIMES. It is argued that OSeMOSYS avoids the complexity of models such as TIMES and allows to focus on learning the concepts of energy modelling. Students wanting to pursue they work in energy modelling may have to eventually face more complex models and will be ready to do so after this course.
Moreover, a much appreciated link is available between LEAP and OSeMOSYS, allowing one to use LEAP not only as a simulation tool (as it basically is) but to extend it for optimization without causing much trouble to the user. The link is invisible to the user and analyses such as the one proposed in the last section of LEAP's training material (exercice of optimization using the LEAP-OSeMOSYS link as mentionned previously in the text) is seen as an excellent tool for the students to appreciate the addition of optimization to an original simulation-based approach.
OSeMOSYS, as TIMES, is made of a list of decisions that must be taken in order to minimize the total discounted cost over some time-horizon to satisfy all the demands of a particular region. Decisions must respect a long list of constraints imposed on the system. The complete model is fully described in [32]. The GLPK version of the model is available at [33].
Widely used models are trusted to be fine tuned, mathematically coherent and correctly coded. Understanding TIMES' code is an enormous challenge. On the contrary, although not as simple as it claims to be, reading OSeMOSYS' code is possible for an experienced modeller. Minimally, its basic structure can be presented to students and newcomers to the field.
The OSeMOSYS model is available for use by anyone wanting to represent his/her own region. It includes no specific data of any particular region. A user must create a data file that will represent the region under study. An example of a small scale data file called UTOPIA, coherent with the OS-eMOSYS model, is also available (see [33]). Although very simple, it offers enough possibilities for a user to feel like he/she is working on a similar-to real-life analysis. Solving

Weeks 7 and 8: Overview on Optimization
Most students have had a basic course on optimization and linear programming. Nevertheless, mathematical modelling is a challenge and a review of its basic concepts is a necessity. Moreover, very few students have been introduced to general algebraic programming languages such as GAMS or AMPL.
Week 8 proposes an introduction to GLPK.

Weeks 9 to 11: OSeMOSYS
The OSeMOSYS optimization model, although considered "simple" by experienced energy modellers, is not such an easy material for the students. The presentation found in [32] fully describes the approach and is followed with the addition of hands-on experience where new demands and their related demand technologies are created. Results are presented using a Pareto analysis, allowing the students to fully grasp the relationship among all the topics presented throughout the course.

Weeks 12 and 13: Canada
A world-renowned expert comes in class to present the case of Canada. The TIMES-Canada model is described and offers to the students the possibility to find out more about their own country's energy system. Again, if some people know about part of it, all of them are amazed by the size, complexity and amount of work involved in facing such issues. Cities, provinces and/or states reports are also presented.
An overview of many websites to know more about technologies and data related to the Canadian energy system are presented (such as the Comprehensive Energy Use Database of Natural Resources Canada [34]). This concludes the course.

Conclusion
This paper describes a full course on energy-modelling using a techno-economic bottom-up approach. It offers a general overview of an integrated approach on energy modelling and serves as a solid basis to pursue further study in the field. It is an intense hands-on introductory course dedicated to graduate students and decision makers in order to develop highly qualified professionals that can use simple yet powerful tools (simulation and optimization) to gain insight on how one can define coherent long-term energy policies in order for a region (a city, a state, a country or a group of countries) to meet important GHG reduction targets. It has been taught with great success and much appreciated reviews from the attendees.

Acknowledgements
I am grateful to Dr. Miguel Anjos, professor at theÉcole Polytechnique de Montréal, who gave me the opportunity to create, develop and teach such an innovative course on energy modelling.

Annex Optimization Problem
A company has two production plants and three storage units. Une entreprise possde deux usines de production et trois entrepts. Here are the data representing the production capacities, demands and unit transportation costs. The objective is to meet all the demands at minimal cost.

Mathematical Model
The sets: I:= Plants J:= Storage Units The data: c ij := Unit transporation cost from plant i to storage unit j (∀ i ∈ I and j ∈ J) cap i := Plant production capacity i (∀ i ∈ I) dem j := Storage units demands j (∀ j ∈ J) The variables: x ij := Quantity transported from plant i to storage unit j (∀ i ∈ I and j ∈ J)