8.5. Adding a service demand

In this section, we detail how to add a service demand to MUSE.

In the residential sector, a service demand could be cooking. Houses require energy to cook food and a technology to service this demand, such as an electric stove.

This process consists of setting a demand, either through inputs derived from the user or correlations of GDP and population which reflect the socio-economic development of a region or country. In addition, a technology must be added to service this new demand.

8.5.1. Addition of cooking demand

Firstly, we must add the demand section. In this example, we will add a cooking preset demand. To achieve this, we will now edit the Residential2020Consumption.csv and Residential2050Consumption.csv files, found within the technodata/preset/ directory.

The Residential2020Consumption.csv file allows us to specify the demand in 2020 for each region and technology per timeslice. The Residential2050Consumption.csv file does the same but for the year 2050. The datapoints between these are interpolated.

Firstly, we must add the new service demand: cook as a column in these two files. Next, we add the demand. Again, the modified entries are in bold:

RegionName

ProcessName

Timeslice

electricity

gas

heat

CO2f

wind

cook

0

R1

gasboiler

1

0

0

1

0

0

1

1

R1

gasboiler

2

0

0

1.5

0

0

2

2

R1

gasboiler

3

0

0

1

0

0

1

3

R1

gasboiler

4

0

0

1.5

0

0

1.5

4

R1

gasboiler

5

0

0

3

0

0

2

5

R1

gasboiler

6

0

0

2

0

0

3

6

R1

gasboiler

7

0

0

2

0

0

2

7

R1

gasboiler

8

0

0

2

0

0

3

8

R2

gasboiler

1

0

0

1

0

0

1

9

R2

gasboiler

2

0

0

1.5

0

0

1

10

R2

gasboiler

3

0

0

1

0

0

1

11

R2

gasboiler

4

0

0

1.5

0

0

1.5

12

R2

gasboiler

5

0

0

3

0

0

2

13

R2

gasboiler

6

0

0

2

0

0

2

14

R2

gasboiler

7

0

0

2

0

0

2.5

15

R2

gasboiler

8

0

0

2

0

0

2

As can be seen, we only need to add a cook column in the file, as well as the demand level for each timeslice and each region. This can be seen through the addition of a positive number in the cook column.

The process is very similar for the Residential2050Consumption.csv file, however, for this example, we often placed larger numbers to indicate higher demand in 2050. For the complete file see the link here.

Next, we must edit the files within the input folder. For this, we must add the cook service demand to each of these files.

First, we will amend the BaseYearExport.csv and BaseYearImport.csv files. For this, we say that there is no import or export of the cook service demand. A brief example is outlined below for BaseYearExport.csv:

RegionName

Attribute

Time

electricity

gas

heat

CO2f

wind

solar

cook

Unit

Year

PJ

PJ

PJ

kt

PJ

PJ

PJ

R1

Exports

2010

0

0

0

0

0

0

0

R2

Exports

2100

0

0

0

0

0

0

0

The same is true for the BaseYearImport.csv file:

RegionName

Attribute

Time

electricity

gas

heat

CO2f

wind

solar

cook

Unit

Year

PJ

PJ

PJ

kt

PJ

PJ

PJ

R1

Imports

2010

0

0

0

0

0

0

0

R2

Imports

2100

0

0

0

0

0

0

0

Next, we must edit the GlobalCommodities.csv file. This is where we define the new commodity cook. It tells MUSE the commodity type, name, emissions factor of CO2 and heat rate, amongst other things.

The example used for this tutorial is below:

Commodity

CommodityType

CommodityName

CommodityEmissionFactor_CO2

HeatRate

Unit

Electricity

Energy

electricity

0

1

PJ

Gas

Energy

gas

56.1

1

PJ

Heat

Energy

heat

0

1

PJ

Wind

Energy

wind

0

1

PJ

CO2fuelcomsbustion

Environmental

CO2f

0

1

kt

Solar

Energy

solar

0

1

PJ

Cook

Energy

cook

0

1

PJ

Finally, the Projections.csv file must be changed. This is a large file which details the expected cost of the technology in the first benchmark year of the simulation. Due to its size, we will only show two rows of the new column cook.

RegionName

Attribute

Time

cook

Unit

Year

MUS$2010/PJ

R1

CommodityPrice

2010

100

R2

CommodityPrice

2100

100

We set every price of cook to be 100MUS$2010/PJ

8.5.2. Addition of cooking technology

Next, we must add a technology to service this new demand. This is achieved through a similar process as the section in the “1. adding a new technology” section. However, we must be careful to specify the end-use of the technology as cook.

For this example, we will add two competing technologies to service the cooking demand: electric_stove and gas_stove to the Technodata.csv file in /technodata/residential/Technodata.csv.

Again for the interests of space, we have omitted the existing gasboiler and heatpump technologies. But we copy the gasboiler row for R1 and paste it for the new electric_stove for both R1 and R2. For gas_stove we copy and paste the data for heatpump from region R1 for both R1 and R2.

An important modification, however, is specifying the end-use for these new technologies to be cook and not heat.

ProcessName

RegionName

Time

Level

cap_par

Fuel

EndUse

Agent2

Unit

Year

MUS$2010/PJ_a

Retrofit

gasboiler

R1

2020

fixed

3.8

gas

heat

1

electric_stove

R1

2020

fixed

3.8

electricity

cook

1

electric_stove

R2

2020

fixed

3.8

electricity

cook

1

gas_stove

R1

2020

fixed

8.8667

gas

cook

1

gas_stove

R2

2020

fixed

8.8667

gas

cook

1

As can be seen we have added two technologies, in the two regions with different cap_par costs. We specified their respective fuels, and the enduse for both is cook. For the full file please see here.

We must also add the data for these new technologies to the following files:

  • CommIn.csv

  • CommOut.csv

  • ExistingCapacity.csv

This is largely a similar process to the tutorial shown in “adding a new technology”. We must add the input to each of the technologies (gas and electricity for gas_stove and electric_stove respectively), outputs of cook for both and the existing capacity for each technology in each region.

Due to the additional demand for gas and electricity brought on by the new cook demand, it is necessary to relax the growth constraints for gassupply1 in the technodata/gas/technodata.csv file. For this example, we set this file as follows:

ProcessName

RegionName

Time

MaxCapacityAddition

MaxCapacityGrowth

TotalCapacityLimit

Agent2

Unit

Year

PJ

%

PJ

Retrofit

gassupply1

R1

2020

100

5

500

1

gassupply1

R2

2020

100

5

120

1

To prevent repetition of the “adding a new technology” section, we will leave the full files here.

Again, we run the simulation with our modified input files using the following command, in the relevant directory:

python -m muse settings.toml

Once this has run we are ready to visualise our results.

[1]:
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
[2]:
mca_capacity = pd.read_csv(
    "../tutorial-code/5-add-service-demand/Results/MCACapacity.csv"
)
mca_capacity.head()
[2]:
Unnamed: 0 agent capacity dst_region index installed region sector technology type year
0 7 A1 5.0 R1 8 2020 R1 residential gasboiler retrofit 2020
1 9 A1 5.0 R1 16 2020 R1 residential gasstove retrofit 2020
2 21 A1 5.0 R2 8 2020 R2 residential gasboiler retrofit 2020
3 23 A1 5.0 R2 16 2020 R2 residential gasstove retrofit 2020
4 35 A2 5.0 R1 8 2020 R1 residential gasboiler retrofit 2020
[3]:
for name, sector in mca_capacity.groupby("sector"):
    print("{} sector:".format(name))
    fig, ax = plt.subplots(1, 2)
    sns.lineplot(
        data=sector[sector.region == "R1"],
        x="year",
        y="capacity",
        hue="technology",
        ax=ax[0],
    )
    sns.lineplot(
        data=sector[sector.region == "R2"],
        x="year",
        y="capacity",
        hue="technology",
        ax=ax[1],
    )
    plt.show()
    plt.close()
gas sector:
../_images/user-guide_addition-service-demand_15_1.png
power sector:
../_images/user-guide_addition-service-demand_15_3.png
residential sector:
../_images/user-guide_addition-service-demand_15_5.png

We can see our new technology, the gas_stove is used and the electric_stove is not used at all. Therefore, there is an increase in gassupply1 to accommodate for this growth in demand. However, this is not enough to displace windturbine by gasCCGT in the power sector.

8.5.3. Next steps

In the next section we will use a regression function to estimate electricity demand from GDP and population data.