an integrated solver manager
play

An integrated Solver Manager: useR! 2013 using R and Python for - PowerPoint PPT Presentation

Energy Systems Planning An integrated Solver Manager: useR! 2013 using R and Python for energy systems Emilio L. Cano Introduction optimization Motivation DSS Solver Manager Architecture Components Emilio L. Cano 1 Antonio Alonso Ayuso 1


  1. Energy Systems Planning An integrated Solver Manager: useR! 2013 using R and Python for energy systems Emilio L. Cano Introduction optimization Motivation DSS Solver Manager Architecture Components Emilio L. Cano 1 Antonio Alonso Ayuso 1 Example A simplified model Javier M. Moguerza 1 Felipe Ortega 1 Model instance Solution 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. Outline Energy Systems Planning useR! 2013 Emilio L. Cano Introduction 1 Introduction Motivation Motivation DSS DSS Solver Manager Architecture Components Solver Manager 2 Example Architecture A simplified model Model instance Solution Components Example 3 A simplified model Model instance Solution The R User Conference 2013 2/27

  3. Outline Energy Systems Planning useR! 2013 Emilio L. Cano Introduction 1 Introduction Motivation Motivation DSS DSS Solver Manager Architecture Components Solver Manager 2 Example Architecture A simplified model Model instance Solution Components Example 3 A simplified model Model instance Solution The R User Conference 2013 3/27

  4. Global changes, local challenges Energy Systems Planning useR! 2013 Emilio L. Cano Global Local Introduction Regulations: Users’ confort Motivation DSS emissions, Security Solver Manager Architecture efficiency Availability Components De-regulations: Example Limited budget A simplified model market Model instance New options Solution Global warming Resources scarcity Global markets The R User Conference 2013 4/27

  5. Building systems enery flow: Sankey diagram

  6. Decision Support Systems Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution The R User Conference 2013 6/27

  7. EnRiMa DSS Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution The R User Conference 2013 7/27

  8. Outline Energy Systems Planning useR! 2013 Emilio L. Cano Introduction 1 Introduction Motivation Motivation DSS DSS Solver Manager Architecture Components Solver Manager 2 Example Architecture A simplified model Model instance Solution Components Example 3 A simplified model Model instance Solution The R User Conference 2013 8/27

  9. DSS Integration Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution The R User Conference 2013 9/27

  10. Solver Manager Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution The R User Conference 2013 10/27

  11. SM Interface - overview Energy Systems Planning useR! 2013 The SM Interface allows to separate Emilio L. Cano communication tasks and other interaction Introduction Motivation features from the core features of the Solver DSS Solver Manager Manager Architecture Components Example A simplified model Model instance Solution The R User Conference 2013 11/27

  12. SM Interface (Python) Energy Systems Planning useR! 2013 Model Emilio L. Cano Introduction Tasks Motivation DSS Data Solver Manager Architecture Interaction Components Example Logs A simplified model Model instance Solution The R User Conference 2013 12/27

  13. Solver Manager core script Energy Systems Planning useR! 2013 Emilio L. Cano Instance checking Introduction Motivation DSS Input data Libraries Solver Manager preparation Architecture optimr : Components Example Call to the optimSMS and A simplified model Model instance Optimiser optimInstance S4 Solution objects Result checking gdxrrw : GAMS Output data Interface preparation Control and log The R User Conference 2013 13/27

  14. Solver Manager process flow Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS Solver Manager Architecture Components Example A simplified model Model instance Solution The R User Conference 2013 14/27

  15. Outline Energy Systems Planning useR! 2013 Emilio L. Cano Introduction 1 Introduction Motivation Motivation DSS DSS Solver Manager Architecture Components Solver Manager 2 Example Architecture A simplified model Model instance Solution Components Example 3 A simplified model Model instance Solution The R User Conference 2013 15/27

  16. Optimization model Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS �� � � � Solver Manager CI t CO t i , j · DT t i · x t j · y t min i + Architecture i , j Components t ∈T i ∈I i ∈I , j ∈J Example A simplified model Model instance Solution t − LT i s t i = s t − 1 + x t i − x ∀ i ∈ I , t ∈ T s . t . : i i � y t i , j = D t ∀ j ∈ J , t ∈ T j i ∈I y t i , j ≤ G t i , j · s t ∀ i ∈ I , j ∈ J , t ∈ T i The R User Conference 2013 16/27

  17. Symbolic Model Specification Energy Systems Planning useR! 2013 Emilio L. Cano showClass("optimSMS") Introduction Motivation DSS ## Class "optimSMS" [package "optimr"] Solver Manager ## Architecture ## Slots: Components ## Example ## Name: consts sets vars pars A simplified model Model instance ## Class: data.frame data.frame data.frame data.frame Solution ## ## 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. SMS Sets and Variables Energy Systems Planning useR! 2013 Emilio L. Cano SMSsets(mod1SMS) Introduction Motivation ## id symbol tag sDes lDes loc inSet setType dataCom DSS ## 1 1 i NA Technology NA sub NA set NA Solver Manager ## 2 2 j NA Period NA sub NA set NA Architecture ## 3 3 t NA Year NA sup NA set NA Components ## ordered setDom Example ## 1 NA NA A simplified model ## 2 NA NA Model instance Solution ## 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. SMS parameters and expressions Energy Systems Planning useR! 2013 Emilio L. Cano Introduction SMSpars(mod1SMS)[, c(1:4, 7, 12)] Motivation DSS Solver Manager ## id symbol tag sDes units ind Architecture ## 1 1 LT NA Lifetime years 1 Components ## 2 2 D NA Demand Level kW 2, 3 Example ## 3 3 G NA Technology Availability kW/kW 1, 2, 3 A simplified model ## 4 4 CI NA Investment Cost EUR/kW 1, 3 Model instance Solution ## 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. SMS equations Energy Systems Planning useR! 2013 SMSeqs(mod1SMS)[1:4, c(1, 2, 5, 6, 7)] Emilio L. Cano Introduction ## id symbol lDes nature relation Motivation ## 1 1 aux1 NA aux eq DSS ## 2 2 aux2 NA aux eq Solver Manager ## 3 3 eqAvail NA constraint eq Architecture ## 4 4 eqDemand NA constraint eq Components Example A simplified model mod1SMS@terms[1:4, c(1, 6:10)] Model instance Solution ## 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} \\cdot The R User Conference 2013 20/27

  21. Optimization Instance Energy Systems Planning useR! 2013 Emilio L. Cano Introduction Motivation DSS showClass("optimInstance") Solver Manager Architecture Components ## Class "optimInstance" [package "optimr"] Example ## A simplified model ## Slots: Model instance ## Solution ## 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. Instance data Energy Systems Planning useR! 2013 Emilio L. Cano names(mod1Instance@pars) Introduction Motivation DSS ## [1] "LT" "CI" "D" "G" "DT" "CO" Solver Manager Architecture Components head(instancePars(mod1Instance, "CI"), 4) Example A simplified model ## i t value Model instance Solution ## 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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend