Hands-On Exercise 2
Hands-On Exercise 2
Modelling
Hands-on 2
Please use the following citation for:
• This exercise
Cannone, Carla, Allington, Lucy, & Howells, Mark. (2021, March). Hands-on 2: Energy and
Flexibility Modelling (Version 3.1.). Zenodo. https://doi.org/10.5281/zenodo.4605256
• clicSAND Software
Cannone, C., Allington, L., De Wet, N., Shivakumar, A., Goyns, P., Valderrama, C., Howells, M.
(2021). clicSAND [computer software]. http://doi.org/10.5281/zenodo.4593100
Please sign up to the help Google forum here. If you are stuck, please ask questions here. If
you get ahead, please answer questions in the same forum. Please state that you are using
the ‘clicSAND’ Interface.
______________________________________________________________________________________
Learning outcomes
By the end of this exercise, you will be able to:
1 of 11
Create a new model
After installing the software and downloading the files needed (as for Hands-on 1) you are
ready to create your first model in OSeMOSYS using the interface named SAND. This is an
Excel-based (Macro-Enabled) file where you can input the data needed for OSeMOSYS to
find the optimal solution to your problem. Let’s learn how to save and manage your files.
Try it:
2 of 11
c. Results Template (Excel Macro Enabled Workbook)
d. OSeMOSYS_code_Hands-on (Text file)
a. SAND_Interface_HO2
b. Results_Database_HO2
c. Results_Template_HO2
d. The code will be the same for all the exercise so there is no need to rename it
Watch out: Every time you make substantial changes to your model, save it as a new
version in the correspondent folder. For example, if I want to test different options in my
Hands-on 2 file, I will create a new file in the folder Hands-on 2 called
“SAND_Interface_HO2_v2” and so on.
Repeat these steps for each Hands-on (New folder-> ModelRunner-> ExportTemplates in
the HOX folder)
Important: The files should not be saved or sync in One Drive for clicSAND to work
Voilà: you now know how to manage your folders and files!
3 of 11
SETS, Parameters and ToDataFile Sheets represent the core of the Interface, and they are
entirely interconnected to each other.
Try it: let’s move around and check what we can do in each of these Sheets:
1. SETS - this is the place where you can define the name of your Technologies (in
column B), Commodities (in column E) and Emissions (in column H).
These three columns are linked to the “ToDataFile” Sheet that has the format needed by
the solver to find the optimal solution. Therefore, whenever you specify the name of a
Technology, Commodity or Emission in these columns, it is automatically reported in the
respective cell in the ToDataFile Sheet.
You have the freedom to change names as many times as necessary without
losing the data previously added for that specific entry.
Watch out: Technologies, Commodities and Emissions codes in your model should be
named following the guidelines explained in Lecture 3.
2. Parameters - this is a giant Sheet where you will be adding data for each
OSeMOSYS parameter. To make things easier and faster for you, there are filters at
the top of each column where you can filter for either Parameter (column A),
Technology (Column C), Commodities/Fuel (Column F). Columns K to BN is
where you can insert data from 2015 to 2070.
4 of 11
Try it: in Column A, filter for Parameters -> Tick Year Split -> OK. You will see that now
only data associated with the parameter called Year Split are shown on the table. You can
add as many filters as wanted. Play around with filters and get confident with this
functionality!
5 of 11
And this is what you will see if you filter out for the Parameter Year Split:
6 of 11
You see that from column K to column BN there are default values added: in this case 0.
We will add data for the year split at the end of this hands-on.
3. ToDataFile - this Sheet has the format needed by the solver to find the optimal
solution to your problem.
Watch out: never add data to this ToDataFile Sheet - data should only be added to the
Parameters and SETS sheets. The interface is made up in a way that all the entries will be
automatically read by the ToDataFile sheet.
4. Naming – here you will find the description of the parameters used in SAND
Interface. We are not going to use all the parameters listed here.
It was assumed each season has an equal length, with an average hourly split per season
(24h representative). Therefore obtaining:
Each Timeslice represents an equal fraction of the Year in the following way, defined as the
Year Split:
Therefore, you should add this number to the Year Split column for each year.
7 of 11
Watch out! To help you deal with all the data, there is a Data Preparation Spreadsheet
that will allow you to copy-paste the data in a faster way. Click on the link and below the
preview you will see the tab called “Files”. Click Download next to Data_Prep_HO2.xlsx
IMPORTANT: Unfortunately, you cannot copy paste all the data in one go, so you need to
copy paste each line individually. This is because, when filters are applied, Excel will not
copy-paste the data into the correct rows of the spreadsheet if multiple lines are copy-
pasted at the same time. Therefore, if you select all the data at once, instead of line-by-line,
you will add data for completely wrong parameters and the model will not work.
To help you with this task, check the blue cells in the Data preparation file that highlight the
data you need to change every time.
1. Go in Parameters Sheet and filter for Year Split (in Column A).
IMPORTANT: right click on Cell K48662 and PASTE VALUES (second icon from the
left).
8 of 11
3. Go to Cell K48662; click ctrl+alt+down-arrow to select only the data in column K.
Drag and drop to copy them for the other years by moving to the right side until
column BK for the year 2070.
9 of 11
You should have now added the Year Split values for all 96 time slices available in SAND
Interface for every model year from 2015-2070.
Voilà: you added the data for the parameter Year Split from 2015 to 2070
Try it:
1. Go to Parameters Sheet -> In Column A filter out for “Depreciation Method” and
“Discount Rate” parameters -> click OK. You will see the following. Do not change
these numbers, we will use these defaults values.
The depreciation method will have a value of 1 and the discount rate of 0.1 (10% discount
rate). These are time independent variables; you will therefore see their value in Column J.
10 of 11
When a variable is time dependent instead, no values will be in Column J and there will be a
value for each of the modelling years (Column K to Column BN).
Name Description
11 of 11