Decision Making under Uncertainty: R implementation for Energy Efficient Buildings

zspksmg2mk 6 views 33 slides Sep 19, 2024
Slide 1
Slide 1 of 33
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33

About This Presentation

Use


Slide Content

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 1/29
Introduction
Modelling
Symbolic Model Specication
Decision Making under Uncertainty:
R implementation for Energy Ecient Buildings
Emilio L. Cano
1
Javier M. Moguerza
1
1
Department of Statistics and Operations Research
University Rey Juan Carlos, Spain
The 8
th
International R Users Meeting
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 2/29
Introduction
Modelling
Symbolic Model Specication
Outline
1
Introduction
EnRiMa Project
DSS Description
2
Modelling
Model Description
Model Objects
3
Symbolic Model Specication
From data to solvers
Model Generation Through R
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 3/29
Introduction
Modelling
Symbolic Model Specication
EnRiMa Project
DSS Description
Outline
1
Introduction
EnRiMa Project
DSS Description
2
Modelling
Model Description
Model Objects
3
Symbolic Model Specication
From data to solvers
Model Generation Through R
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 4/29
Introduction
Modelling
Symbolic Model Specication
EnRiMa Project
DSS Description
Introduction
The model described in this talk has been developed within
the project EnRiMa: Energy Eciency and Risk Management
in Public Buildings, funded by the EC.
The overall objective of EnRiMa is to develop a
decision-support system (DSS) for operators of
energy-ecient buildings and spaces of public use.
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 4/29
Introduction
Modelling
Symbolic Model Specication
EnRiMa Project
DSS Description
Introduction
The model described in this talk has been developed within
the project EnRiMa: Energy Eciency and Risk Management
in Public Buildings, funded by the EC.
The overall objective of EnRiMa is to develop a
decision-support system (DSS) for operators of
energy-ecient buildings and spaces of public use.
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 5/29
Introduction
Modelling
Symbolic Model Specication
EnRiMa Project
DSS Description
Consortium
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 6/29
Introduction
Modelling
Symbolic Model Specication
EnRiMa Project
DSS Description
Outline
1
Introduction
EnRiMa Project
DSS Description
2
Modelling
Model Description
Model Objects
3
Symbolic Model Specication
From data to solvers
Model Generation Through R
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 7/29
Introduction
Modelling
Symbolic Model Specication
EnRiMa Project
DSS Description
EnRiMa DSS
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 8/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Outline
1
Introduction
EnRiMa Project
DSS Description
2
Modelling
Model Description
Model Objects
3
Symbolic Model Specication
From data to solvers
Model Generation Through R
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 9/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Optimization Scope
Strategic Model
Strategic decisions concerning
which technologies to install
and/or decommission in the long
term
Operational Model
Energy portfolio selection in the
short term
Interaction
The strategic model includes
a simplied version of
operational energy-balance
constraints
The operational model
includes the realisation of
the strategic decisions as
parameters
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 9/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Optimization Scope
Strategic Model
Strategic decisions concerning
which technologies to install
and/or decommission in the long
term
Operational Model
Energy portfolio selection in the
short term
Interaction
The strategic model includes
a simplied version of
operational energy-balance
constraints
The operational model
includes the realisation of
the strategic decisions as
parameters
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 9/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Optimization Scope
Strategic Model
Strategic decisions concerning
which technologies to install
and/or decommission in the long
term
Operational Model
Energy portfolio selection in the
short term
Interaction
The strategic model includes
a simplied version of
operational energy-balance
constraints
The operational model
includes the realisation of
the strategic decisions as
parameters
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 10/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Scheme of the Project EnRiMaDSS
Strategic
Module
Operational
Module
Strategic DVs
Strategic
Constraints
Upper-Level
Operational DVs
Upper-Level
Energy-BalanceConstraints
Lower-Level
Energy-BalanceConstraints
Lower-Level
Operational DVs
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 11/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Scenario trees Decision Time
1 2 543 6 7 98
Stage 1 Stage 2 Stage 3
Scenario 1
Scenario 2
Scenario 3
Scenario 4
Scenario 5
Scenario 6
Illustrative scenario tree
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 12/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Outline
1
Introduction
EnRiMa Project
DSS Description
2
Modelling
Model Description
Model Objects
3
Symbolic Model Specication
From data to solvers
Model Generation Through R
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 13/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Objective Function (example)
min
X
p2P
0
@
X
i2I
CI
p;0
i
G
i
si
p
i
X
j2J
CIS
p;0
j
GS
j
xi
p
j
+
X
i2I
G
i
0
@
p
X
a1=0
CD
pa1
i
p
X
a2=a1+1
sd
a1;a2
i
1
A+
X
j2J
0
@
p
X
a1=0
CDS
pa1
j
p
X
a2=a1+1
xd
a1;a2
j
1
A
+
X
m2M
DM
p
m
X
i2I
X
k2K
X
t2T
CO
p;m;t
i;k
z
p;m;t
i;k
+
X
m2M
DM
p
m
X
j2J
X
k2K
X
t2T
COS
p;m;t
k;j
r
p;m;t
k;j

X
m2M
DM
p
m
X
i2I
X
k2K
X
n2N
S(k)
X
mm2M
A
X
t2T
PP
p;m;t
i;k;n
u
p;m;t;mm
k;n

X
m2M
DM
p
m
X
i2I
X
k2K
X
n2N
S(k)
X
mm2M
S
X
t2T
SP
p;m;t
i;k;n
w
p;m;t;mm
k;n

X
i2I
SU
p
i
G
i
si
p
i
1
A
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 14/29
Introduction
Modelling
Symbolic Model Specication
Model Description
Model Objects
Constraints (two examples)
Energy Balance (operational):
X
i2I
z
p;m;t
i;k
+
X
n2N
B(k)
X
mm2M
A
u
p;m;t;mm
k;n

X
i2I
y
p;m;t
i;k

X
mm2M
S
X
n2N
S(k)
w
p;m;t;mm
k;n
X
j2J
S
qi
p;m;t
k;j
D
p;m;t
k

X
j2J
S
qo
p;m;t
k;j

X
j2J
PS

p;m;t
j

X
j2J
PU
OD
k;j
x
p
j
D
p;m;t
k
p2 P;m2 M;t2 T;k2 K
Emissions limit (strategic):
X
m2M
DM
p
m
0
@
X
i2I
X
k2K
X
t2T
H
i;k;l
y
p;m;t
i;k
X
n2N
X
k2K
X
t2T
C
i;l;n
u
p;m;t;mm
k;n
1
APL
p
l
p2 P;l2 L
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 15/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Outline
1
Introduction
EnRiMa Project
DSS Description
2
Modelling
Model Description
Model Objects
3
Symbolic Model Specication
From data to solvers
Model Generation Through R
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 16/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Symbolic Model Specication
The formulation reached models complex systems
Moreover, the Symbolic Model Specication should be:
Flexible
Replicable
Reproducible
Scalable
Portable
Thus, a suitable structure is needed
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 17/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Data model
Model and Instance Classes, data attributes, input/output methods
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 18/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Outline
1
Introduction
EnRiMa Project
DSS Description
2
Modelling
Model Description
Model Objects
3
Symbolic Model Specication
From data to solvers
Model Generation Through R
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 19/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Algebraic Languages
Needs
Statistical Software
Data Visualization
Data Analysis
Mathematical
Representation
Solver Input
Generation
Output
Documentation
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 20/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
R as an Integrated Environment
Advantages
Open Source
Reproducible Research and Literate Programming capabilities.
Integrated framework for SMS, data, equations and solvers.
Data Analysis (pre- and post-), graphics and reporting.
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 21/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
R Code Example
>
genTechAvail
si
>
\
\
\
mathit
\
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 22/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Solution and report
Sweave le example:
%
\
\
\
\
\
\
\
< < > >=
#
#
#
#
wProblem
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 23/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Solution and report
filename
format
solver
#
wProblem
filename
format
solver
@
\
%
\
\
< < > >=
require
gams
@
\
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 24/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Solution and report
< < > >=
lst 'solvestat', 'full',
solverResults
#
@
\
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 25/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Summary
In this presentation the
DSS have been described
An integrated framework allows to integrate analysis,
representation and solution of optimization problems
Examples of use have been presented
Outlook
Integration of scenarios for stochastic optimization
Extend representation formats: HTML, ODF, . . .
Further formats: AMPL, MPS, XML, . . .
A contributed package?
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 25/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Summary
In this presentation the
DSS have been described
An integrated framework allows to integrate analysis,
representation and solution of optimization problems
Examples of use have been presented Outlook
Integration of scenarios for stochastic optimization
Extend representation formats: HTML, ODF, . . .
Further formats: AMPL, MPS, XML, . . .
A contributed package?
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 26/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
References
[1] lpSolve: Interface to Lpsolve v. 5.5 to solve
linear/integer programs, 2011. URL
http://CRAN.R-project.org/package=lpSolve. R package version 5.6.6.
[2] http://www.coin-or.org/. retrieved
2012-06-12.
[3] Decision Making Under Uncertainty in
Electricity Markets. International Series in Operations Research and Management
Science Series. Springer, 2010. ISBN 9781441974204. URL
http://books.google.es/books?id=zta0qWS_W98C.
[4]
www.enrima-project.eu, 2012.
[5]
http://support.gams-software.com/doku.php?id=gdxrrw:
interfacing_gams_and_r. retrieved 2012-03-06.
[6]
Boubekeur Ouaglal, and Afzal Siddiqui. Modeling of customer adoption of
distributed energy resources. Technical report, Lawrence Berkeley National
Laboratory, 2001. URLhttp://der.lbl.gov/publications/
modeling-customer-adoption-distributed-energy-resources .
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 27/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
References
[7] R: A Language and Environment for Statistical
Computing. R Foundation for Statistical Computing, Vienna, Austria, 2012. URL
http://www.R-project.org/. ISBN 3-900051-07-0.
[8]
Ghosh, and Michael Stadler. Eects of carbon tax on microgrid combined heat
and power adoption.Journal of Energy Engineering, 131(1):2{25, 2005. doi:
10.1061/(ASCE)0733-9402(2005)131:1(2). URL
http://link.aip.org/link/?QEY/131/2/1.
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 28/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Acknowledgements
R-project
GAMS Software
EnRiMa project partners
Project RIESGOS-CM: code S2009/ESP-1685
This work is supported by the European Commission's Seventh
Framework Programme via the \Energy Eciency and Risk Management
in Public Buildings" (EnRiMa) project (number 260041).
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation

Use R! 2012, Vanderbilt University, Nashville, June 14 2012 29/29
Introduction
Modelling
Symbolic Model Specication
From data to solvers
Model Generation Through R
Summary
Discussion
Thanks
[email protected]
@emilopezcano
Emilio L. Cano and Javier M. Moguerza Decision Making under Uncertainty: R implementation
Tags