Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Eggimann committed Mar 27, 2018
1 parent a63e17f commit 4f694f8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 37 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ MANIFEST
# Model configuration
*.ini

docs/* #TODO REMOVE

# Model results
model_output/*.csv
model_output/*.pdf
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Code Overview
===================
This section provides and overview how the model code is stored.

All model input data used to configure the model is storted in the
All model input data used to configure the model is stored in the
`config_data` folder (i.e. load profiles of technologies,
fuel input data for the whole UK).

Expand Down
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
=============
Energy Demand Model (MISTRAL)
HIgh Resolution Energy Demand Model (HIRE)
=============

This is the full documentation of Energy Demand Model.
This is the full documentation of HIRE,
which was developped in the MISTRAL project.

Note
----
Expand Down
8 changes: 2 additions & 6 deletions energy_demand/assumptions/non_param_assumptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(
self.f_is_weekend = 0.4 # 0.4

# Spatial calibration factor
self.f_mixed_floorarea = 0.2 # 0.4
self.f_mixed_floorarea = 0.4 # 0.4

# ============================================================
# Modelled day related factors
Expand Down Expand Up @@ -394,17 +394,13 @@ def __init__(
# *****************
# technologies: Dry kilns, semi
'''
Fuel use ratio - dry process over wet process in cement sector
Fuel use ratio - novel alkali cement over incumbent process in cement sector
Fuel use ratio - novel partially dehydrated cement over incumbent process in cement sector
Fuel use ratio - continuous over ingot casting in cement sector
BAT - cement - dry/wet process Dry/wet process (Dry %)
BAT - cement - Novel-Alkali-activated (alumino-silicate, geopolymer) Sectoral share of Alkali activated %
BAT - cement - Novel-Partially prehydrated Calcium silicate hydrate Sectoral share - Partially prehydrated %'''

# CHEMICALs - Enduse: is_high_temp_process, Sector: CHEMICALS
# *****************
# technologies: Dry & wet kilns

# ----------------
# Efficiency of motors
Expand Down
2 changes: 1 addition & 1 deletion energy_demand/scripts/init_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def scenario_initalisation(path_data_ed, data=False):
# ---------------------
plot_fig_paper = True
if plot_fig_paper:
#GNU TODO TODO TODO
#GNU TODO

# Global value to distribute
global_value = 50
Expand Down
27 changes: 4 additions & 23 deletions energy_demand/scripts/s_disaggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,10 @@ def disaggregate_base_demand(
# -------------------------------------
# Factors to choose for disaggregation
# -------------------------------------
crit_limited_disagg_pop = True # Only puplation
crit_limited_disagg_pop_hdd = False # Only puplation and HDD
crit_limited_disagg_pop = False # Only puplation
crit_limited_disagg_pop_hdd = True # Only puplation and HDD
crit_full_disagg = False # Full disaggregation

'''_a = sum(fuels['rs_fuel_raw'].values())[2]
for i in fuels['ss_fuel_raw']:
_a+= + sum(fuels['ss_fuel_raw'][i].values())[2]
for i in fuels['is_fuel_raw']:
_a+= + sum(fuels['is_fuel_raw'][i].values())[2]
logging.warning(_a * 0.004763563768921437)
logging.warning("PINGU: " + str(_a))
logging.warning(scenario_data['population'][2015]['E07000135'])
logging.warning(scenario_data['population'][2015]['E07000135'] / sum(scenario_data['population'][2015].values()))
logging.warning(sum(scenario_data['population'][2015].values()))
logging.warning("---")
logging.warning(_a * 0.004763563768921437)
logging.warning("PINGU: " + str(_a)) #Popualtion is wrong
logging.warning(scenario_data['population'][2015]['E08000025'])
logging.warning(scenario_data['population'][2015]['E08000025'] / sum(scenario_data['population'][2015].values()))
logging.warning(sum(scenario_data['population'][2015].values()))
prnt(":")'''
# Residential
rs_fuel_disagg = rs_disaggregate(
regions,
Expand Down Expand Up @@ -117,8 +98,8 @@ def disaggregate_base_demand(
sectors['is_sectors'],
scenario_data['employment_stats'],
scenario_data,
crit_limited_disagg_pop,
crit_full_disagg)
crit_limited_disagg_pop=True,
crit_full_disagg=crit_full_disagg)

return dict(rs_fuel_disagg), dict(ss_fuel_disagg), dict(is_fuel_disagg)

Expand Down
4 changes: 2 additions & 2 deletions energy_demand/validation/lad_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def temporal_validation(
elec_ed_fueltype_national_yh,
'all_submodels',
days_to_plot,
plot_crit=True)
plot_crit=False)

# ----------------
# Plot four weeks
Expand Down Expand Up @@ -214,7 +214,7 @@ def tempo_spatial_validation(
fuel_gas_regs_yh = map_LAD_2011_2015(fuel_gas_regs_yh)

logging.info("Validation of electricity")
plot_crit = True

spatial_validation(
reg_coord,
fuel_elec_regs_yh,
Expand Down

0 comments on commit 4f694f8

Please sign in to comment.