resilience.io wash sector prototype debut training workshop
TRANSCRIPT
Resilience.IO WASH
Training Workshop
Rembrandt Koppelaar, Xiaonan Wang,
Department of Chemical Engineering, Imperial College London, UK
IIER – Institute for Integrated Economic Research
Accra - June 2016
Resilience.IO platform
Outline
Installation
resilience.io Package Overview
Using the model – step by step
resilience.io Testing Capabilities (and Limitations)
resilience.io Use Examples
Q&A / Interactive Session
2
Installation
3
Everything in one folder
4
resilienceIO_final
Copy folder resilienceIO_final from the pen-drive to
your hard-drive at C:\ (640 mb folder)
Resilience.IO package overview
5
A data-driven simulation model of a synthetic
population
To experiment with different scenarios by generating
demand profiles
And to find supply from a description of technologies
and networks using optimisation with key
performance metrics
The approach: Resilience.IO Model
6
Everything in one folder
7
1. Creation of Synthetic
Population Change
2. Simulate demands
3. Examine what
infrastructure can best
supply demands
Double-click to run:
start_resilience.io_socio_de
mographics_calculation
start_resilience.io_demand_c
alculation
start_resilience.io_supply_cal
culation
In Main folder c:/resilienceIO_final
In Sub-folders storage of data-files
8
File storage of Synthetic Population Change:
C:\resilienceIO_final\resilience.io.abm\data\agent_data\
File storage of simulated demands:
C:\resilienceIO_final\resilience.io.abm\fileoutput\
File storage of infrastructure supply simulation
C:\resilienceIO_final\resilience.io.rtn\visual_outputs\
C:\resilienceIO_final\resilience.io.rtn\text_outputs\
Using Resilience.IO WASH step by step
9
How to use the model: step-by-step
10
main folder: start_resilience.io_socio_dem_model
Step 1: Double clicks the
resilience.io_socio_dem_mod
el file
Step 2: User can inputs the
years to be simulated after
the instruction line (the
starting base year is 2010
with existing complete
information) and press Enter
key.
Step 3: The generated data is
stored into two categories of
spreadsheets to record the
population and business
sectors information
respectively.
How to use the model: step-by-step
11
results folder: population and companies master tables
ResilienceIO/ resilience.io.abm / data agent_data
By changing the
selected year's file
name to
“GAMA_Agent_ma
stertable” and
“GAMA_Company
_mastertable”,
users can plan the
supply matching
with any year’s
data.
How to use the model: step-by-step
12
main folder: start_resilience.io_demand_model
Step 1: Double clicks the
resilience.io_demand_model file
Step 2: Check the parameters to the left if
you want to change any settings, otherwise
the default parameters are used.
Step 3: Click on Initialize model to load the
map and agents, and click Run to start
simulation.
Initialize model / Run
How to use the model: step-by-step
13
Running: calculations are going on
Stopped: results are ready now
Agents/people are starting their daily activities:
pink- female
blue- male
How to use the model: step-by-step
14
results folder: demand and costs
All results are stored
in the folder
ResilienceIO/resilienc
e.io.abm/FileOutput
with a comprehensive
list of the WASH
sector key
characteristics,
especially the water
demand file and waste
to be treated
How to use the model: step-by-step
15
main folder: double click resilience.io_supply_model
Equivalently, you can click on resilience.io_supply_textoutputs to store
results in spreadsheets/ text format
Resilience.IO WASH Testing Capabilities
16
Demographics module
17
Loads Population and Company Master Table
C:\resilienceIO_final\resilience.io.abm\data\agent_data\GAMA_Agent_
Mastertable.csv
C:\resilienceIO_final\resilience.io.abm\data\agent_data\GAMA_Compa
ny_Mastertable.csv
Demographics module
18
Calculates changes in population for each
population type per year for X number of years (e.g.
female, unemployed, access to drinking water)
Adds births (specify no births per 1000 people)
Subtracts deaths (specify no deaths per 1000 people)
Adds immigration (specify no immigrants per 1000 people
Adds emigration (specify no emigrants per 1000 people
Demographics module – how to change?
19
Open YAML file with text editor (notepad)
C:\resilienceIO_final\resilience.io.abm\data\socio_economic_data_input.yml
Demographics module – how to change?
20
Change file in text editor (notepad)
Example larger immigration rate
Order of MMDA values for all district specific data
Change value in immigration rate row for Accra (second value)
Save file
Now the module can be operated with new settings!
Demographics module – Additional Settings
21
Changes from low income to medium income population
(value for lowtomediumstart, 0.003 0.3% per year)
Changes from medium to high income population (value
for mediumtohighstart, 0.003 0.3% per year)
Maximum employment of 15+ year population (Value for
maximumEmployment15plus, 0.80 80%)
Ageing of population from 0-14 to 15+ (Value for
ageintRate14to15, 0.06 6% per year )
Demand Systems module – what can be changed?
22
Setting water demands in litres / day / person
Currently: Medium-income 1 * 70 to 90 litres 70-90
Low-income 0.73 * 70 to 90 51 to 66 litres
High-income 1.56 * 70 to 90 109 to 140 litres
Setting toilet use, faeces and urine per toilet use
Demand Systems module – what can be changed?
23
Costs for water and toilets for calculation assuming
100% demands at end point would be met (no non-
revenue, ideal situation)
Tariffs as set by PURC
Estimated market
values calculated
from GHS to USD
Supply infrastructure module – what can be changed?
24
Load the desired starting scenario file by copying
from folder:
C:\resilienceIO_final\resilience.io.rtn\output\yaml_input_files\use
_case_x_yaml_files\
And pasting to folder:
C:\resilienceIO_final\resilience.io.rtn\output\yaml_input_files\
Store any other existing files in another folder (or
delete them if not useful)
Open Scenario YML file to change settings
Supply infrastructure module – what can be changed?
25
Number and name of districts and coordinates
Coordinates of “cells” (MMDAs) based on real
coordinate systems,
in the order of “names_of_cells”
Values entered twice, once for calculation and
once for visualisation
MMDAs, the order is important for further data input!
Technology data
Supply infrastructure module – what can be changed?
26
Capacity of technologies per half year (182.5
days)
Names of technologies, the order is important for
further data input!
Load factor of technologies (75% - 85%)
Boreholes 15,000 m3 per year capacity * 75% load
11,250 m3 per year operation
Technology-Resource data
Supply infrastructure module – what can be changed?
27
Which resources are available in the
model (again the order is important for
further settings!). Also which resources can
flow (usually both are set to the same)
Input and output of resources for
technologies. Every row is a
technology and every column a
resource
Negative value is input, and positive
value is outputInput of raw_source_water
Technology-Cost data
Supply infrastructure module – what can be changed?
28
Investment cost per technology in order
Source water treatment plant 45,197,947 USD
Borehole source water system 3,325,541 USD
(boreholes + local town water system)
Protected well or protected spring 50,000 USD
Technology-Cost data
Supply infrastructure module – what can be changed?
29
Operational cost for technology
Source water treatment plant 0.23 USD per m3
Borehole source water system 0.237 USD per m3
Protected well or protected spring 1 USD per m3
And greenhouse gas emissions for technology use
Source water treatment plant 0.017 kg per m3
Borehole source water system 0.0065 USD per m3
Protected well or protected spring 0 USD per m3
Settings for what to optimise (find lowest cost)
Supply infrastructure module – what can be changed?
30
Set objectives to minimize capital & operational
expenditure & CO2 emissions (do not change!)
Set importance in minimization for objectives.
Values are multipliers. Currently:
CAPEX [1] so as to represent total capital cost
OPEX [15] so as to represent 15 years of OPEX
CO2 [0.5] arbitrarily chosen
Set which resource demands to meet, values
correspond to order in resource column, additional
demands can be added!
Set % of demands to meet [1,1] 100%, 100%
Supply infrastructure module – what can be changed?
31
Settings for resource to meet demands
If true reads simulated demands from file, if
false reads demands from ODS
demands for set resources per year, only
used if read_ABM is set false,
Every row is demand for an MMDA in order of
names of cells as set earlier:
[ Adenta 3010999, 2408799]
[ Accra_Metropolitan 175684715, 6054772]
Numbers represent resources for which
demands are set in file (in this case water and
influent waste-water), additional demand values
can be added here!
Settings for pipes and flows
Supply infrastructure module – what can be changed?
32
Pipe type names (potable water and waste-
water). Order is important!
Resources which flow through pipes
pw_pipe potable_water
ww_pipe influent_wastewater
Leakage % in pipes (currently
27%)
Capacity per pipe per year for resource
[4,7]
Settings for meeting resource import needs (e.g. outside
GAMA or outside WASH sector).
Supply infrastructure module – what can be changed?
33
MMDAs which can
import resources
Import maximum (50,000,000) per MMDA The resources which can be
imported
raw_source_water from waterbodies
Electricity from electricity sector
Labour_hours from population
Liquid_effluent special settings to
make waste-water calculation work
Cost of imports
Electricity 0.02 USD per MJ
Labour-hours 2.4 USD per hour
Initial infrastructure already in place
Supply infrastructure module – what can be changed?
34
Every row is an MMDA, and every column is number of technologies
Boreholes in AMA 329 * 15,000 m3 per year capacity
is equal to 5 million m3 per year, or 13,500 m3 per day
Initial pipe infrastructure already in place from/to
Supply infrastructure module – what can be changed?
35
AM potable water pipes
AM1 waste-water pipes
If all values are 0, then no pipes are in existence prior to
model run, such as for waste-water pipes
Pipe exists from/to
From Accra Metropolitan
To La-Dade Kotopon
Pipe connections which are allowed to be built by model
Supply infrastructure module – what can be changed?
36
AM2 potable water pipes
AM3 waste-water pipes
If all values are 0, then no pipes can be built, if all values
are 1 then all connections can be built
Pipe allowed from/to
From Ga-South
To Ga-West
Cost of building trunk pipes and operating them
Supply infrastructure module – what can be changed?
37
Capital cost of pipe per km
Potable water pipe 2,350,000 USD
Waste-water pipe 235,000 USD
Operational cost of pipe per m3
per flowable resource value for
potable water set to 0.001
USD per m3
Additional settings for resource to meet demands
Supply infrastructure module – what can be changed?
38
Number of major periods (years) and minor
periods in a year (two) don’t change setting
Year which is printed in the output results
(doesn’t influence model)
Split for minor periods in year (8760 hours per year),
in this case 1756 hours and 7008 hours
These settings are for the model to calculate sub-periods
within a year when useful
Additional Settings
Supply infrastructure module – what can be changed?
39
Amount of potable water turned into waste-water
Available budget for investment + operation per
year
Set all facilities forced to full operation (100%)
No investments are allowed (can lead to not being
able to meet demands no solution)
The number of solutions tried out (Lower is better,
higher is faster), 0.01 is highest value allowed
Resilience.IO WASH use examples
40
Already prepared Use cases and Scenarios
41
Use Case 3
Toilets & Waste-water
Use Case 1:
Water & Waste-water
Baseline
Use Case 2
Water supply
Baseline
City-Wide
Decentralised districts
Low pipe leakage variants
Local Pipe Source
Central Pipe
Source
High immigration
variants
Baseline
Public toilet and local
district treatment
Sustainable Development
Goal targets
Private toilets and
central GAMA treatment
Various Input files in folder:
C:\resilienceIO_final\resilience.io.rtn\YAML_INPUT_FILES\
Example 1 – editing data
42
Example, change the costs of a technology
43
We have new/improved data for the costs of a
technology such as conventional water treatment
First step Edit the YAML file(s) that you want to run
the model with:
Open:
C:\ResilienceIO_Final\resilience.io.rtn\output\YAML_INPUT_FILES\use_ca
se_2_yaml_files\Central_pipe_4_2025.yml
Go to the investment cost table VIJA
Look up which row is the source water treatment plant
Adjust the value and save the file
Example, change the costs of a technology
44
Example, change the costs of a technology
45
We have new/improved data for the costs of a
technology such as conventional water treatment
Second step Copy the YAML file to the base folder
that you want to run with
From:
C:\ResilienceIO_Final\resilience.io.rtn\output\YAML_INPUT_FILES\use_ca
se_2_yaml_files\Central_pipe_4_2015.yml
To:
C:\ResilienceIO_Final\resilience.io.rtn\output\YAML_INPUT_FILES\Central
_pipe_4_2015.yml
Example 2 – comparing scenarios
46
Example, effect change in pipe leakage
47
We want to run for 2025 the impacts of a 10% pipe
leakage reduction for improved potable water.
Use case 2 scenario files are for potable water only
Decide what to compare?
Situation / year 2015 2025
Scenario A
Baseline 27%
Continuation
27% leakage
Scenario B Reduction to
17% leakage
Example, effect change in pipe leakage
48
We want to run for 2025 the impacts of a 10% pipe
leakage reduction for improved potable water.
Use case 2 scenario files are for potable water only
Decide what to compare?
Situation / year 2015 2025
Scenario A
Baseline 27%
Continuation
27% leakage
Scenario B Reduction to
17% leakage
Example, effect change in pipe leakage
49
First step Run Demographics module for 15 years
(from 2010 to 2025) with input settings.
Second step Rename the earlier generated
population data for 2025 in the folder before demands
calculation
Take file
C:\ResilienceIO_Final\ResilienceIO_Final\resilience.io.abm\data\
agent_data\agentMasterTable-2015
Rename into
C:\ResilienceIO_Final\ResilienceIO_Final\resilience.io.abm\data\
agent_data\GAMA_Agent_mastertable
And do the same for companyMasterTable-2015 and rename
into GAMA_Company_mastertable
Example, effect change in pipe leakage
50
Third step Run baseline demand situation for 2015
demographics with input settings.
Fourth step Run Supply to meet generated demands
for baseline using baseline scenario file use Case 2
C:\ResilienceIO_Final\resilience.io.rtn\output\YAML_INPUT_FIL
ES\use_case_2_yaml_files\Baseline_1_2015.yml
The baseline scenario files contain a “dummy” technology
called “unimproved_w_inv” and “unimproved_ww_inv” for adding
unimproved sources “to meet demands” without investment
(no cost)
Example, effect change in pipe leakage
51
Fifth step Save all generated results for
demographics, demands, and supply in a new folder (for
example c:\ResilienceIO_Final\Scenario_Results\20_June_leakage)
Files can be found in the following folders:
C:\resilienceIO_final\resilience.io.abm\data\agent_data\
C:\resilienceIO_final\resilience.io.abm\fileoutput\
C:\resilienceIO_final\resilience.io.rtn\visual_outputs\
C:\resilienceIO_final\resilience.io.rtn\text_outputs\
Example, effect change in pipe leakage
52
We now have the results for baseline_scenario for the
year 2015 with 27% pipe leakage!
Situation / year 2015 2025
Scenario A
Baseline 27%
Continuation
27% leakage
Scenario B Reduction to
17% leakage
Example, effect change in pipe leakage
53
Sixth step Rename the earlier generated population
data for 2025 in the agent_data folder to run demands
Take file
C:\ResilienceIO_Final\ResilienceIO_Final\resilience.io.abm\data\
agent_data\agentMasterTable-2025
Rename into
C:\ResilienceIO_Final\ResilienceIO_Final\resilience.io.abm\data\
agent_data\GAMA_Agent_mastertable
And do the same for companyMasterTable-2025 and rename
into GAMA_Company_mastertable
Seventh step Run demand simulation based on 2025
demographics with input settings.
Example, effect change in pipe leakage
54
Eight step Run Supply to meet generated demands
for 2025 by using scenario file:
C:\ResilienceIO_Final\resilience.io.rtn\output\YAML_INPUT
_FILES\use_case_2_yaml_files\Central_pipe_4_2025.yml
Ninth step Save all generated results for
demographics, demands, and supply in the new folder
Situation / year 2015 2025
Scenario A
Baseline 27%
Continuation
27% leakage
Scenario B Reduction to 17%
leakage
Example, effect change in pipe leakage
55
Tenth step Adjust YAML file Central_pipe_4_2025.yml
Change leakage rate:
Eleventh step Run Supply to meet generated demands
for 2025 by using adjusted YAML scenario file.
Last step Save all generated results for demographics,
demands, and supply in the new folder for 17% leakage
rate.
Situation / year 2015 2025
Scenario A
Baseline 27%
Continuation
27% leakage
Scenario B Reduction to
17% leakage
Example, effect change in pipe leakage
56
Now we should have in folder
c:\ResilienceIO_Final\Scenario_Results\20_June_leakage
- Results for baseline 27% run for 2015
- Results for 2025 100% improved water 27% leakage
- Results for 2025 100% improved water 17% leakage
We can now compare results for changes in population,
changes in demands (2015-2025), difference in costs
between 27% and 17% leakage, etc. using the csv files,
text output file for supply, and generated graphs
A Sample of Results
57
Population in 2025 near 7 million
Water Demand in 2025 close to 636,000 m3/day (will
differ somewhat for each model run and number of agents)
C:\ResilienceIO_Final\resilience.io.abm\FileOutput\day-0-
waterDemandTotal
A Sample of Results – 2025 w 27% leakage
58
Investment cost 2015-2025 3.26 billion USD
Operational cost in 2025 105 million USD
Interpreting Results
59
The supply side outcomes are influenced by the
constraints and limitations
For example: It invests in conventional water treatment at
Lake Weija mainly because
There are no limits to expansion at Lake Weija
Building treatment plants are similar in cost at Lake Weija are at
Volta River / Kpone
Only the distance for pipe connections are taken into account
(greater distance to Volta River versus Lake Weija)
Elevation and difference in source water intake are not taken into
account
Example 3 – Adding entirely new technologies
(and demands)
60
Advanced Example: Adding Biogas into model
61
Start with the desired YAML file
62
Take and copy to the input folder:
C:\resilienceIO_final\resilience.io.rtn\output\yaml_input_files\
use_case_1_yaml_files\Sustainable_Development_Goals_4
_2030.yml
Since we are running additional demands (for biogas) -
which are not generated by the demand module - we want
to open the YAML file and flag read_abm: false
Now we can make further adjustments!
Example: Adding Biogas into model
63
read_ABM : false
ODS:
- [4632193 , 3705754, 200]
- [89126797 , 71301437, 200]
- [11961616 , 9569293, 0]
- [7504044 , 6003235, 0]
- [8506051 , 6804841, 0]
- [28814317 , 23051454, 0]
- [12085454 , 9668363, 0]
- [6670931 , 5336745, 0]
- [8770558 , 7016447, 0]
- [6908802 , 5527041, 0]
- [9799336 , 7839469, 0]
- [12679806 , 10143845, 200]
- [3126596 , 2501277, 0]
- [5024429 , 4019543, 0]
- [1550251 , 1240201, 0]
- [1,1,1]
Pilot:
Which districts
would like to use
bio-gas?
[ADMA, AMA, ASHMA, GCMA, GSMA,
GWMA,GEMA, KKMA, LADMA,
LANKMA, LEKMA, TEMA, ASMA,
ASEMA, NAMA, VOLTA]
Demand of biogas: 2000 m3 per year for
the selected district each
Example: Adding Biogas into model
64
read_ABM : false
ODS:
- [4632193 , 3705754, 2000]
- [89126797 , 71301437, 2000]
- [11961616 , 9569293, 0]
- [7504044 , 6003235, 0]
- [8506051 , 6804841, 0]
- [28814317 , 23051454, 0]
- [12085454 , 9668363, 0]
- [6670931 , 5336745, 0]
- [8770558 , 7016447, 0]
- [6908802 , 5527041, 0]
- [9799336 , 7839469, 0]
- [12679806 , 10143845, 2000]
- [3126596 , 2501277, 0]
- [5024429 , 4019543, 0]
- [1550251 , 1240201, 0]
- [1,1,1]
Pilot:
Increased biogas
production can
satisfy regional
energy demand.
[ADMA, AMA, ASHMA, GCMA,
GSMA, GWMA,GEMA, KKMA,
LADMA, LANKMA, LEKMA,
TEMA, ASMA, ASEMA, NAMA,
VOLTA]
Example: Adding Biogas into model
65
j: Technologies List
1 [source_water_treatment_plant,
2 borehole_source_water_system,
3 protected_wellspring_rainwater,
4 sachet_drinking_water,
5 bottled_water,
6 unimproved_tanked_vendor,
7 unimproved_other,
8 waste_water_treatment_plant,
9 waste_stabilisation_pond, aerated_lagoon,
10 decentralized_activated_sludge_system,
11 faecal_sludge_polymer_separation_drying_plant,
12 decentralised_anaerobic_biogas_treatment_plant,
13 decentralised_aerobic_treatment_plant,
14 desalination_plant,
15 biogas_plant] Capacity: 2400 m3 per year each plant
Capacity factor: 0.75
MU: Technologies * Resources
[raw_source_water, electricity, labour_hours, potable_water, sludge,
carbon_dioxide, influent_wastewater, drink_water_satchet, liquid_effluent,
sludge_effluent, influent_faecal_sludge, biogas]
- [-1,-0.75,-0.002,1,0.0924,0.017,0,0,0,0,0,0]
-[-1.3,0,-0.35,1,0,0.00065,0,0,0,0,0,0]
-[-1.1,0,-0.20,1,0,0,0,0,0,0,0,0]
-[-1,-15.1,-4,1,0,1.39,0,2000,0,0,0,0]
-[-1.46,-240,-7.65,1,0,2.1,0,0,0,0,0,0]
-[-1,0,0,1,0,0,0,0,0,0,0,0]
-[-1,0,0,1,0,0,0,0,0,0,0,0]
-[0,-1.07,-0.02,0,0,0.04,1,0,-1,0.00024,0,0]
-[0,-0.05,-0.0025,0,1.49,0.38,1,0,-1,0.0015,0,0]
-[0,-5.99,-0.0063,0,1.39,1.01,1,0,-1,0.0014,0,0]
-[0,-0.36,-0.004,0,0,1.13,1,0,-1,0.16,0,0]
-[0,-1,-0.2,0,0.05,0,1,0,-0.86,0,0,0]
-[0,0,-0.5,0,0,0,1,0,-0.98,0,0,0.5]
-[0,-6.21,-0.5,0,0,7.1,1,0,-0.97,0.03,0,0]
-[-1,-28.5,-0.001,0.41,0.11,1.78,0,0,0,0,0,0]
-[0,0.02,-0.2,0,0,0.1,0,0,0,0,0,1]
Example: Adding Biogas into model
66
VIJA: capital expenditure, operational cost, environmental cost
- [45197947,0,0]
- [3325541,0,0]
- [50000,0,0]
- [43065,0,0]
- [2478334,0,0]
- [150,0,0]
- [100,0,0]
- [53398778,0,0]
- [14145810,0,0]
- [768544,0,0]
- [1516850,0,0]
- [4816845,0,0]
- [3092,0,0]
- [244500,0,0]
- [130000000,0,0]
- [7200,0,0]
Example: Adding Biogas into model
67
What else do you
need to change?
-
-
-
VIJA: capital expenditure, operational cost, environmental cost
- [45197947,0,0]
- [3325541,0,0]
- [50000,0,0]
- [43065,0,0]
- [2478334,0,0]
- [150,0,0]
- [100,0,0]
- [53398778,0,0]
- [14145810,0,0]
- [768544,0,0]
- [1516850,0,0]
- [4816845,0,0]
- [3092,0,0]
- [244500,0,0]
- [130000000,0,0]
- [7200,0,0]
Example: Adding Biogas into model
68
What else do you need to
change?
- VPJ - [0,0.08,0]
- N_alloc_matrix:
no existing plants, all 0
- dp: 1 Qmax: 10000
69
Results: new investment on infrastructure
Investments('decentralised_anaerobic_biogas_treatment_plant'.AMA.2030) =4
Investments('decentralised_anaerobic_biogas_treatment_plant'.LEKMA.2030) = 3020
Investments('decentralised_anaerobic_biogas_treatment_plant'.TEMA.2030) = 2
Investments('decentralised_anaerobic_biogas_treatment_plant'.ASMA.2030) = 1
70
Results: new investment on infrastructure
Investments('biogas_plant'.AMA.2030) = 1
What happened if costs reduced for affordable large-scale biogas technology?
71
Results: new investment on infrastructure
Investments('biogas_plant'.AMA.2030) = 2
24000 m3 capacity per year each plant
72
Results: new investment on infrastructure
ProductionRate('biogas_plant'.ADMA.1.2030) = 930
ProductionRate('biogas_plant'.ADMA.2.2030) = 3699
ProductionRate('biogas_plant'.TEMA.1.2030) = 393
ProductionRate('biogas_plant'.TEMA.2.2030) = 1570
Supply module Sometimes the connection to the
visualisation software does not work, and you get an
error in the code, or graphs don’t appear:
Click Ctrl-Alt-Delete go to task manager click on
process called Rserve.exe and end task
Now rerun the model
Troubleshooting
73
Troubleshooting
74
Demand module restarting the interface instead of
running the model a few times
You can always email:
Q & A
75