SlideShare a Scribd company logo
1 of 28
Download to read offline
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
An integrated Solver Manager:
using R and Python for energy systems
optimization
Emilio L. Cano1
Antonio Alonso Ayuso1
Javier M. Moguerza1
Felipe Ortega1
1
DEIO, Universidad Rey Juan Carlos, Madrid
The R user Conference 2013
Albacete July 10-12 2013
The R User Conference 2013 1/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Outline
1 Introduction
Motivation
DSS
2 Solver Manager
Architecture
Components
3 Example
A simplified model
Model instance
Solution
The R User Conference 2013 2/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Outline
1 Introduction
Motivation
DSS
2 Solver Manager
Architecture
Components
3 Example
A simplified model
Model instance
Solution
The R User Conference 2013 3/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Global changes, local challenges
Global
Regulations:
emissions,
efficiency
De-regulations:
market
Global warming
Resources scarcity
Global markets
Local
Users’ confort
Security
Availability
Limited budget
New options
The R User Conference 2013 4/27
Building systems enery flow: Sankey diagram
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Decision Support Systems
The R User Conference 2013 6/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
EnRiMa DSS
The R User Conference 2013 7/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Outline
1 Introduction
Motivation
DSS
2 Solver Manager
Architecture
Components
3 Example
A simplified model
Model instance
Solution
The R User Conference 2013 8/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
DSS Integration
The R User Conference 2013 9/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Solver Manager
The R User Conference 2013 10/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
SM Interface - overview
The SM Interface allows to separate
communication tasks and other interaction
features from the core features of the Solver
Manager
The R User Conference 2013 11/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
SM Interface (Python)
Model
Tasks
Data
Interaction
Logs
The R User Conference 2013 12/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Solver Manager core script
Instance checking
Input data
preparation
Call to the
Optimiser
Result checking
Output data
preparation
Control and log
Libraries
optimr:
optimSMS and
optimInstance S4
objects
gdxrrw: GAMS
Interface
The R User Conference 2013 13/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Solver Manager process flow
The R User Conference 2013 14/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Outline
1 Introduction
Motivation
DSS
2 Solver Manager
Architecture
Components
3 Example
A simplified model
Model instance
Solution
The R User Conference 2013 15/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Optimization model
min
t∈T i∈I
CI t
i · xt
i +
i∈I,j∈J
COt
i,j · DTt
j · yt
i,j
s.t. : st
i = st−1
i + xt
i − x
t−LTi
i ∀ i ∈ I, t ∈ T
i∈I
yt
i,j = Dt
j ∀ j ∈ J , t ∈ T
yt
i,j ≤ Gt
i,j · st
i ∀ i ∈ I, j ∈ J , t ∈ T
The R User Conference 2013 16/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Symbolic Model Specification
showClass("optimSMS")
## Class "optimSMS" [package "optimr"]
##
## Slots:
##
## Name: consts sets vars pars
## Class: data.frame data.frame data.frame data.frame
##
## Name: eqs terms name sDes
## Class: data.frame data.frame character character
##
## Name: lDes
## Class: character
data(mod1SMS)
The R User Conference 2013 17/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
SMS Sets and Variables
SMSsets(mod1SMS)
## id symbol tag sDes lDes loc inSet setType dataCom
## 1 1 i NA Technology NA sub NA set NA
## 2 2 j NA Period NA sub NA set NA
## 3 3 t NA Year NA sup NA set NA
## ordered setDom
## 1 NA NA
## 2 NA NA
## 3 NA NA
SMSvars(mod1SMS)[, c(1:4, 11)]
## id symbol tag sDes ind
## 1 1 x NA Capacity to be installed 1, 3
## 2 2 y NA Production plan 1, 2, 3
## 3 3 s NA Available capacity 1, 3
## 4 4 z NA Total cost NULL
The R User Conference 2013 18/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
SMS parameters and expressions
SMSpars(mod1SMS)[, c(1:4, 7, 12)]
## id symbol tag sDes units ind
## 1 1 LT NA Lifetime years 1
## 2 2 D NA Demand Level kW 2, 3
## 3 3 G NA Technology Availability kW/kW 1, 2, 3
## 4 4 CI NA Investment Cost EUR/kW 1, 3
## 5 5 CO NA Operational Cost EUR/kWh 1, 2, 3
## 6 6 DT NA Duration time of period hours 2, 3
getExpr(mod1SMS, "vars", 2, "gams")
## [1] "y(i,j,t)"
The R User Conference 2013 19/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
SMS equations
SMSeqs(mod1SMS)[1:4, c(1, 2, 5, 6, 7)]
## id symbol lDes nature relation
## 1 1 aux1 NA aux eq
## 2 2 aux2 NA aux eq
## 3 3 eqAvail NA constraint eq
## 4 4 eqDemand NA constraint eq
mod1SMS@terms[1:4, c(1, 6:10)]
## id eq side parent nature item
## 1 1 1 l NA sets 3
## 2 2 1 r 0 sets 3
## 3 3 1 r 0 consts 1
## 4 1 2 l NA sets 3
getEq(mod1SMS, 5, "tex")
## [1] " mathit{y}_{i,j}^{t} leq mathit{G}_{i,j}^{t} cdo
The R User Conference 2013 20/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Optimization Instance
showClass("optimInstance")
## Class "optimInstance" [package "optimr"]
##
## Slots:
##
## Name: id name sDes lDes sets
## Class: integer character character character list
##
## Name: vars pars eqs sms
## Class: list list list optimSMS
The R User Conference 2013 21/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Instance data
names(mod1Instance@pars)
## [1] "LT" "CI" "D" "G" "DT" "CO"
head(instancePars(mod1Instance, "CI"), 4)
## i t value
## 1 PV 2013 700
## 2 CHP 2013 1182
## 3 PV 2014 490
## 4 CHP 2014 1123
instanceSets(mod1Instance, "i")
## [1] "RTE" "PV" "CHP"
The R User Conference 2013 22/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Getting the solution
setwd("~/gamsdir")
wProblem(mod1Instance, "mod1.gms", "gams", "lp")
library(gdxrrw)
igdx("~/Programs/gams")
## The GDX library has been loaded
## GDX library load path: /home/emilio/Programs/gams
gams("mod1.gms")
## [1] 0
importGams(mod1Instance) <- "outSolDeterministic1.gdx"
instanceVars(mod1Instance, "x")
## i t value
## 1 RTE 2013 6.30
## 2 PV 2015 17.50
## 3 PV 2016 1.75
## 4 CHP 2013 1.40
The R User Conference 2013 23/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Late motivation
Joseph Kallrath (2012). Algebraic
Modeling Systems, Springer. Chapter
12: A Practioner’s Wish List Towards
Algebraic Modeling Systems
“The automatic generation of a model’s
documentation in LATEX would be very helpful
for mathematicians, physicists, astronomers,
and other communities publishing in LATEX.”
The R User Conference 2013 24/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Summary
New challenges for building managers.
Decision Support Systems are needed.
Solver Manager: flexible and extensible.
The R User Conference 2013 25/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Summary
New challenges for building managers.
Decision Support Systems are needed.
Solver Manager: flexible and extensible.
Outlook
Improve optimr package
More complex instances
More modeling and optimization softwares,
solvers, alogorithms and benchmarking.
The R User Conference 2013 25/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Acknowledgements
This work has been partially funded by the
project Energy Efficiency and Risk
Management in Public Buildings (EnRiMa)
EC’s FP7 project (number 260041)
We also acknowledge the projects:
OPTIMOS3 (MTM2012-36163-C06-06)
Project RIESGOS-CM: code S2009/ESP-1685
HAUS: IPT-2011-1049-430000
EDUCALAB: IPT-2011-1071-430000
DEMOCRACY4ALL: IPT-2011-0869-430000
CORPORATE COMMUNITY: IPT-2011-0871-430000
CONTENT & INTELIGENCE: IPT-2012-0912-430000
and the Young Scientists Summer Program (YSSP) at the International
Institute of Applied Systems Analysis (IIASA).
The R User Conference 2013 26/27
Energy Systems
Planning
useR! 2013
Emilio L. Cano
Introduction
Motivation
DSS
Solver Manager
Architecture
Components
Example
A simplified model
Model instance
Solution
Discussion
Thanks !
emilio.lopez@urjc.es
@emilopezcano
http://www.proyectum.es
The R User Conference 2013 27/27

More Related Content

Viewers also liked

Gang announcements 2010 09
Gang announcements 2010 09Gang announcements 2010 09
Gang announcements 2010 09
David Giard
 
Cultural Quiz - Across Borders
Cultural Quiz  - Across BordersCultural Quiz  - Across Borders
Cultural Quiz - Across Borders
Stuart Friedman
 
Jack Thurston (farmsubsidy.org): Westminster Forum on Food and Nutrition: CAP
Jack Thurston (farmsubsidy.org): Westminster Forum on Food and Nutrition: CAPJack Thurston (farmsubsidy.org): Westminster Forum on Food and Nutrition: CAP
Jack Thurston (farmsubsidy.org): Westminster Forum on Food and Nutrition: CAP
jackthur
 
Gang announcements 2010 11
Gang announcements 2010 11Gang announcements 2010 11
Gang announcements 2010 11
David Giard
 
Calling Dr Watson To Radiology - RSNA Presentation
Calling Dr Watson To Radiology - RSNA PresentationCalling Dr Watson To Radiology - RSNA Presentation
Calling Dr Watson To Radiology - RSNA Presentation
Nick van Terheyden
 
Tbfs uc commercial presentation
Tbfs uc commercial presentationTbfs uc commercial presentation
Tbfs uc commercial presentation
raj638
 

Viewers also liked (20)

Test.Odt
Test.OdtTest.Odt
Test.Odt
 
Gang announcements 2010 09
Gang announcements 2010 09Gang announcements 2010 09
Gang announcements 2010 09
 
Verifica Di Strutture In Acciaio. Nuove Norme Tecniche 2008
Verifica Di Strutture In Acciaio. Nuove Norme Tecniche 2008Verifica Di Strutture In Acciaio. Nuove Norme Tecniche 2008
Verifica Di Strutture In Acciaio. Nuove Norme Tecniche 2008
 
Horario de examenes 1 er trimestre colegio 2010
Horario de examenes 1 er trimestre colegio 2010Horario de examenes 1 er trimestre colegio 2010
Horario de examenes 1 er trimestre colegio 2010
 
InfiniteGraph
InfiniteGraphInfiniteGraph
InfiniteGraph
 
City University Food Thinkers
City University Food ThinkersCity University Food Thinkers
City University Food Thinkers
 
Edifici antisismici in Calcestruzzo Armato - 0 Obiettivi del capitolo 10 dell...
Edifici antisismici in Calcestruzzo Armato - 0 Obiettivi del capitolo 10 dell...Edifici antisismici in Calcestruzzo Armato - 0 Obiettivi del capitolo 10 dell...
Edifici antisismici in Calcestruzzo Armato - 0 Obiettivi del capitolo 10 dell...
 
Nase Zoo
Nase ZooNase Zoo
Nase Zoo
 
2o Γυμνάσιο Ελληνικού - Εθνικό Ιστορικό Μουσείο- National History Museum ( A...
2o Γυμνάσιο Ελληνικού - Εθνικό Ιστορικό Μουσείο- National History Museum  ( A...2o Γυμνάσιο Ελληνικού - Εθνικό Ιστορικό Μουσείο- National History Museum  ( A...
2o Γυμνάσιο Ελληνικού - Εθνικό Ιστορικό Μουσείο- National History Museum ( A...
 
J query
J queryJ query
J query
 
Cultural Quiz - Across Borders
Cultural Quiz  - Across BordersCultural Quiz  - Across Borders
Cultural Quiz - Across Borders
 
Jack Thurston (farmsubsidy.org): Westminster Forum on Food and Nutrition: CAP
Jack Thurston (farmsubsidy.org): Westminster Forum on Food and Nutrition: CAPJack Thurston (farmsubsidy.org): Westminster Forum on Food and Nutrition: CAP
Jack Thurston (farmsubsidy.org): Westminster Forum on Food and Nutrition: CAP
 
Web based information resources
Web based information resourcesWeb based information resources
Web based information resources
 
Advice for Entrepreneurs from an Internet Startup Enthusiast, Brian Link
Advice for Entrepreneurs from an Internet Startup Enthusiast, Brian LinkAdvice for Entrepreneurs from an Internet Startup Enthusiast, Brian Link
Advice for Entrepreneurs from an Internet Startup Enthusiast, Brian Link
 
Website Audit Reports: Are They Necessary?
Website Audit Reports: Are They Necessary?Website Audit Reports: Are They Necessary?
Website Audit Reports: Are They Necessary?
 
Gang announcements 2010 11
Gang announcements 2010 11Gang announcements 2010 11
Gang announcements 2010 11
 
What is a Mobile Responsive Website?
What is a Mobile Responsive Website?What is a Mobile Responsive Website?
What is a Mobile Responsive Website?
 
Class 6 data visualization
Class 6  data visualizationClass 6  data visualization
Class 6 data visualization
 
Calling Dr Watson To Radiology - RSNA Presentation
Calling Dr Watson To Radiology - RSNA PresentationCalling Dr Watson To Radiology - RSNA Presentation
Calling Dr Watson To Radiology - RSNA Presentation
 
Tbfs uc commercial presentation
Tbfs uc commercial presentationTbfs uc commercial presentation
Tbfs uc commercial presentation
 

Similar to An integrated Solver Manager: using R and Python for energy systems optimization

Ag o product overview
Ag o product overviewAg o product overview
Ag o product overview
Manoj Nagesh
 
MIMOSA and IBM IIC - Role of Process, Systems and Tools in Integrated Project...
MIMOSA and IBM IIC - Role of Process, Systems and Tools in Integrated Project...MIMOSA and IBM IIC - Role of Process, Systems and Tools in Integrated Project...
MIMOSA and IBM IIC - Role of Process, Systems and Tools in Integrated Project...
Cormac Ryan
 

Similar to An integrated Solver Manager: using R and Python for energy systems optimization (20)

Reproducible Operations Research. An Application to Energy Systems Optimization
Reproducible Operations Research. An Application to Energy Systems OptimizationReproducible Operations Research. An Application to Energy Systems Optimization
Reproducible Operations Research. An Application to Energy Systems Optimization
 
A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...
 
A Methodology for Degradation Based Long-Term Analysis and Optimization of En...
A Methodology for Degradation Based Long-Term Analysis and Optimization of En...A Methodology for Degradation Based Long-Term Analysis and Optimization of En...
A Methodology for Degradation Based Long-Term Analysis and Optimization of En...
 
Managing Complexity and Change with Scalable Software Design
Managing Complexity and Change with Scalable Software DesignManaging Complexity and Change with Scalable Software Design
Managing Complexity and Change with Scalable Software Design
 
Dst
DstDst
Dst
 
Analyzing Changes in Software Systems From ChangeDistiller to FMDiff
Analyzing Changes in Software Systems From ChangeDistiller to FMDiffAnalyzing Changes in Software Systems From ChangeDistiller to FMDiff
Analyzing Changes in Software Systems From ChangeDistiller to FMDiff
 
CAQA5e_ch1 (3).pptx
CAQA5e_ch1 (3).pptxCAQA5e_ch1 (3).pptx
CAQA5e_ch1 (3).pptx
 
Accelerated Disassembly, Reconstruction and Reversing training public slides
Accelerated Disassembly, Reconstruction and Reversing training public slidesAccelerated Disassembly, Reconstruction and Reversing training public slides
Accelerated Disassembly, Reconstruction and Reversing training public slides
 
Strategic Buildings’ Energy Systems Planning
Strategic Buildings’ Energy Systems PlanningStrategic Buildings’ Energy Systems Planning
Strategic Buildings’ Energy Systems Planning
 
Ag o product overview
Ag o product overviewAg o product overview
Ag o product overview
 
Green scheduling
Green schedulingGreen scheduling
Green scheduling
 
Auto conversion of serial C code to CUDA code
Auto conversion of serial C code to CUDA codeAuto conversion of serial C code to CUDA code
Auto conversion of serial C code to CUDA code
 
Deadline Miss Detection with SCHED_DEADLINE
Deadline Miss Detection with SCHED_DEADLINEDeadline Miss Detection with SCHED_DEADLINE
Deadline Miss Detection with SCHED_DEADLINE
 
Software development effort reduction with Co-op
Software development effort reduction with Co-opSoftware development effort reduction with Co-op
Software development effort reduction with Co-op
 
DECORATOR PATTERN IN WEB APPLICATION
DECORATOR PATTERN IN WEB APPLICATIONDECORATOR PATTERN IN WEB APPLICATION
DECORATOR PATTERN IN WEB APPLICATION
 
Android application for the engineering economy
Android application for the engineering economyAndroid application for the engineering economy
Android application for the engineering economy
 
IRJET- Optimization of Plastic Injection Molding
IRJET- Optimization of Plastic Injection MoldingIRJET- Optimization of Plastic Injection Molding
IRJET- Optimization of Plastic Injection Molding
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
Keynote: Machine Learning for Design Automation at DAC 2018
Keynote:  Machine Learning for Design Automation at DAC 2018Keynote:  Machine Learning for Design Automation at DAC 2018
Keynote: Machine Learning for Design Automation at DAC 2018
 
MIMOSA and IBM IIC - Role of Process, Systems and Tools in Integrated Project...
MIMOSA and IBM IIC - Role of Process, Systems and Tools in Integrated Project...MIMOSA and IBM IIC - Role of Process, Systems and Tools in Integrated Project...
MIMOSA and IBM IIC - Role of Process, Systems and Tools in Integrated Project...
 

More from Emilio L. Cano

More from Emilio L. Cano (20)

R and Shiny to support real estate appraisers: An expert algorithm implementa...
R and Shiny to support real estate appraisers: An expert algorithm implementa...R and Shiny to support real estate appraisers: An expert algorithm implementa...
R and Shiny to support real estate appraisers: An expert algorithm implementa...
 
Generación de materiales didácticos multiformato con bookdown
Generación de materiales didácticos multiformato con bookdownGeneración de materiales didácticos multiformato con bookdown
Generación de materiales didácticos multiformato con bookdown
 
Unattended SVM parameters fitting for monitoring nonlinear profiles
Unattended SVM parameters fitting for monitoring nonlinear profilesUnattended SVM parameters fitting for monitoring nonlinear profiles
Unattended SVM parameters fitting for monitoring nonlinear profiles
 
Six Sigma as a Quality Improvement Tool for Academic Programs
Six Sigma as a Quality Improvement Tool for Academic ProgramsSix Sigma as a Quality Improvement Tool for Academic Programs
Six Sigma as a Quality Improvement Tool for Academic Programs
 
Monitoring nonlinear profiles with {R}: an application to quality control
Monitoring nonlinear profiles with {R}: an application to quality controlMonitoring nonlinear profiles with {R}: an application to quality control
Monitoring nonlinear profiles with {R}: an application to quality control
 
Energy-efficient technology investments using a decision support system frame...
Energy-efficient technology investments using a decision support system frame...Energy-efficient technology investments using a decision support system frame...
Energy-efficient technology investments using a decision support system frame...
 
Generación y corrección automática de trabajos evaluables personalizados con ...
Generación y corrección automática de trabajos evaluables personalizados con ...Generación y corrección automática de trabajos evaluables personalizados con ...
Generación y corrección automática de trabajos evaluables personalizados con ...
 
Talentyon: how to turn R expertise into business within the collaborative eco...
Talentyon: how to turn R expertise into business within the collaborative eco...Talentyon: how to turn R expertise into business within the collaborative eco...
Talentyon: how to turn R expertise into business within the collaborative eco...
 
Las normas ISO como puerta de entrada de la Estadística en la empresa
Las normas ISO como puerta de entrada de la Estadística en la empresaLas normas ISO como puerta de entrada de la Estadística en la empresa
Las normas ISO como puerta de entrada de la Estadística en la empresa
 
Las 7 herramientas básicas de la calidad con R
Las 7 herramientas básicas de la calidad con RLas 7 herramientas básicas de la calidad con R
Las 7 herramientas básicas de la calidad con R
 
Stochastic optimization and risk management for an efficient planning of buil...
Stochastic optimization and risk management for an efficient planning of buil...Stochastic optimization and risk management for an efficient planning of buil...
Stochastic optimization and risk management for an efficient planning of buil...
 
Análisis de inversiones energéticas en el ámbito del edificio
Análisis de inversiones energéticas en el ámbito del edificioAnálisis de inversiones energéticas en el ámbito del edificio
Análisis de inversiones energéticas en el ámbito del edificio
 
Standardisation on Statistics: ISO Standards and R Tools
Standardisation on Statistics: ISO Standards and R ToolsStandardisation on Statistics: ISO Standards and R Tools
Standardisation on Statistics: ISO Standards and R Tools
 
Statistical Methods for Quality
Statistical Methods for QualityStatistical Methods for Quality
Statistical Methods for Quality
 
Calidad Seis Sigma con R: Aplicación a la docencia
Calidad Seis Sigma con R: Aplicación a la docenciaCalidad Seis Sigma con R: Aplicación a la docencia
Calidad Seis Sigma con R: Aplicación a la docencia
 
Strategic Energy Systems Planning under Uncertainty
Strategic Energy Systems Planning under UncertaintyStrategic Energy Systems Planning under Uncertainty
Strategic Energy Systems Planning under Uncertainty
 
Six Sigma with R
Six Sigma with RSix Sigma with R
Six Sigma with R
 
A Symbolic Model Specification for Energy Efficiency Optimization Models
A Symbolic Model Specification for Energy Efficiency Optimization ModelsA Symbolic Model Specification for Energy Efficiency Optimization Models
A Symbolic Model Specification for Energy Efficiency Optimization Models
 
Decision Making under Uncertainty: R implementation for Energy Efficient Buil...
Decision Making under Uncertainty: R implementation for Energy Efficient Buil...Decision Making under Uncertainty: R implementation for Energy Efficient Buil...
Decision Making under Uncertainty: R implementation for Energy Efficient Buil...
 
A Strategic Planning Model for Energy Efficiency in Public Buildings
A Strategic Planning Model for Energy Efficiency in Public BuildingsA Strategic Planning Model for Energy Efficiency in Public Buildings
A Strategic Planning Model for Energy Efficiency in Public Buildings
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

An integrated Solver Manager: using R and Python for energy systems optimization

  • 1. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution An integrated Solver Manager: using R and Python for energy systems optimization Emilio L. Cano1 Antonio Alonso Ayuso1 Javier M. Moguerza1 Felipe Ortega1 1 DEIO, Universidad Rey Juan Carlos, Madrid The R user Conference 2013 Albacete July 10-12 2013 The R User Conference 2013 1/27
  • 2. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Outline 1 Introduction Motivation DSS 2 Solver Manager Architecture Components 3 Example A simplified model Model instance Solution The R User Conference 2013 2/27
  • 3. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Outline 1 Introduction Motivation DSS 2 Solver Manager Architecture Components 3 Example A simplified model Model instance Solution The R User Conference 2013 3/27
  • 4. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Global changes, local challenges Global Regulations: emissions, efficiency De-regulations: market Global warming Resources scarcity Global markets Local Users’ confort Security Availability Limited budget New options The R User Conference 2013 4/27
  • 5. Building systems enery flow: Sankey diagram
  • 6. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Decision Support Systems The R User Conference 2013 6/27
  • 7. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution EnRiMa DSS The R User Conference 2013 7/27
  • 8. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Outline 1 Introduction Motivation DSS 2 Solver Manager Architecture Components 3 Example A simplified model Model instance Solution The R User Conference 2013 8/27
  • 9. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution DSS Integration The R User Conference 2013 9/27
  • 10. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Solver Manager The R User Conference 2013 10/27
  • 11. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution SM Interface - overview The SM Interface allows to separate communication tasks and other interaction features from the core features of the Solver Manager The R User Conference 2013 11/27
  • 12. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution SM Interface (Python) Model Tasks Data Interaction Logs The R User Conference 2013 12/27
  • 13. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Solver Manager core script Instance checking Input data preparation Call to the Optimiser Result checking Output data preparation Control and log Libraries optimr: optimSMS and optimInstance S4 objects gdxrrw: GAMS Interface The R User Conference 2013 13/27
  • 14. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Solver Manager process flow The R User Conference 2013 14/27
  • 15. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Outline 1 Introduction Motivation DSS 2 Solver Manager Architecture Components 3 Example A simplified model Model instance Solution The R User Conference 2013 15/27
  • 16. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Optimization model min t∈T i∈I CI t i · xt i + i∈I,j∈J COt i,j · DTt j · yt i,j s.t. : st i = st−1 i + xt i − x t−LTi i ∀ i ∈ I, t ∈ T i∈I yt i,j = Dt j ∀ j ∈ J , t ∈ T yt i,j ≤ Gt i,j · st i ∀ i ∈ I, j ∈ J , t ∈ T The R User Conference 2013 16/27
  • 17. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Symbolic Model Specification showClass("optimSMS") ## Class "optimSMS" [package "optimr"] ## ## Slots: ## ## Name: consts sets vars pars ## Class: data.frame data.frame data.frame data.frame ## ## Name: eqs terms name sDes ## Class: data.frame data.frame character character ## ## Name: lDes ## Class: character data(mod1SMS) The R User Conference 2013 17/27
  • 18. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution SMS Sets and Variables SMSsets(mod1SMS) ## id symbol tag sDes lDes loc inSet setType dataCom ## 1 1 i NA Technology NA sub NA set NA ## 2 2 j NA Period NA sub NA set NA ## 3 3 t NA Year NA sup NA set NA ## ordered setDom ## 1 NA NA ## 2 NA NA ## 3 NA NA SMSvars(mod1SMS)[, c(1:4, 11)] ## id symbol tag sDes ind ## 1 1 x NA Capacity to be installed 1, 3 ## 2 2 y NA Production plan 1, 2, 3 ## 3 3 s NA Available capacity 1, 3 ## 4 4 z NA Total cost NULL The R User Conference 2013 18/27
  • 19. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution SMS parameters and expressions SMSpars(mod1SMS)[, c(1:4, 7, 12)] ## id symbol tag sDes units ind ## 1 1 LT NA Lifetime years 1 ## 2 2 D NA Demand Level kW 2, 3 ## 3 3 G NA Technology Availability kW/kW 1, 2, 3 ## 4 4 CI NA Investment Cost EUR/kW 1, 3 ## 5 5 CO NA Operational Cost EUR/kWh 1, 2, 3 ## 6 6 DT NA Duration time of period hours 2, 3 getExpr(mod1SMS, "vars", 2, "gams") ## [1] "y(i,j,t)" The R User Conference 2013 19/27
  • 20. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution SMS equations SMSeqs(mod1SMS)[1:4, c(1, 2, 5, 6, 7)] ## id symbol lDes nature relation ## 1 1 aux1 NA aux eq ## 2 2 aux2 NA aux eq ## 3 3 eqAvail NA constraint eq ## 4 4 eqDemand NA constraint eq mod1SMS@terms[1:4, c(1, 6:10)] ## id eq side parent nature item ## 1 1 1 l NA sets 3 ## 2 2 1 r 0 sets 3 ## 3 3 1 r 0 consts 1 ## 4 1 2 l NA sets 3 getEq(mod1SMS, 5, "tex") ## [1] " mathit{y}_{i,j}^{t} leq mathit{G}_{i,j}^{t} cdo The R User Conference 2013 20/27
  • 21. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Optimization Instance showClass("optimInstance") ## Class "optimInstance" [package "optimr"] ## ## Slots: ## ## Name: id name sDes lDes sets ## Class: integer character character character list ## ## Name: vars pars eqs sms ## Class: list list list optimSMS The R User Conference 2013 21/27
  • 22. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Instance data names(mod1Instance@pars) ## [1] "LT" "CI" "D" "G" "DT" "CO" head(instancePars(mod1Instance, "CI"), 4) ## i t value ## 1 PV 2013 700 ## 2 CHP 2013 1182 ## 3 PV 2014 490 ## 4 CHP 2014 1123 instanceSets(mod1Instance, "i") ## [1] "RTE" "PV" "CHP" The R User Conference 2013 22/27
  • 23. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Getting the solution setwd("~/gamsdir") wProblem(mod1Instance, "mod1.gms", "gams", "lp") library(gdxrrw) igdx("~/Programs/gams") ## The GDX library has been loaded ## GDX library load path: /home/emilio/Programs/gams gams("mod1.gms") ## [1] 0 importGams(mod1Instance) <- "outSolDeterministic1.gdx" instanceVars(mod1Instance, "x") ## i t value ## 1 RTE 2013 6.30 ## 2 PV 2015 17.50 ## 3 PV 2016 1.75 ## 4 CHP 2013 1.40 The R User Conference 2013 23/27
  • 24. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Late motivation Joseph Kallrath (2012). Algebraic Modeling Systems, Springer. Chapter 12: A Practioner’s Wish List Towards Algebraic Modeling Systems “The automatic generation of a model’s documentation in LATEX would be very helpful for mathematicians, physicists, astronomers, and other communities publishing in LATEX.” The R User Conference 2013 24/27
  • 25. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Summary New challenges for building managers. Decision Support Systems are needed. Solver Manager: flexible and extensible. The R User Conference 2013 25/27
  • 26. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Summary New challenges for building managers. Decision Support Systems are needed. Solver Manager: flexible and extensible. Outlook Improve optimr package More complex instances More modeling and optimization softwares, solvers, alogorithms and benchmarking. The R User Conference 2013 25/27
  • 27. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Acknowledgements This work has been partially funded by the project Energy Efficiency and Risk Management in Public Buildings (EnRiMa) EC’s FP7 project (number 260041) We also acknowledge the projects: OPTIMOS3 (MTM2012-36163-C06-06) Project RIESGOS-CM: code S2009/ESP-1685 HAUS: IPT-2011-1049-430000 EDUCALAB: IPT-2011-1071-430000 DEMOCRACY4ALL: IPT-2011-0869-430000 CORPORATE COMMUNITY: IPT-2011-0871-430000 CONTENT & INTELIGENCE: IPT-2012-0912-430000 and the Young Scientists Summer Program (YSSP) at the International Institute of Applied Systems Analysis (IIASA). The R User Conference 2013 26/27
  • 28. Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution Discussion Thanks ! emilio.lopez@urjc.es @emilopezcano http://www.proyectum.es The R User Conference 2013 27/27