• No se han encontrado resultados

Fundamentos teóricos del proceso lector

In document UNIVERSIDAD CÉSAR VALLEJO (página 32-44)

CAPÍTULO II: MARCO TEÓRICO

2.2. Fundamentos teóricos del proceso lector

The simulation of electricity prices for an entire year or several years on hourly level leads to an enormous amount of data that needs to be checked and analysed. If it is taken into account that a normal scenario consists of 50 simulation runs in order to level out the impact of the random generator, things become even more complex. The data produced for a scenario con-sisting of 50 simulation runs amounts to 470 Megabyte [MB] in the minimum case. This fig-ure shows that the amount of data generated by the simulation platform cannot be handled without the support of additional tools. Therefore additional tools for the analysis and aggre-gation of the models results have to be developed.

Another important issue is the required computing power and the resulting calculation time.

The examples of the pump storage optimization given in Chapter 5.5.2 show that calculation times can easily explode. Even with the described measures to speed up the simulation a simulation run for one year requires a minimum of 30-40 seconds on a modern high speed desktop PC8. As a single scenario with a single model setup requires 50 simulation runs, the calculation time reaches a minimum of 30-40 min. This does not sound much, but it has to be taken into account that the calibration procedures or case studies with parameter variations require several thousand simulation runs which can easily reach calculation times of several days on a single computer. The amount of data produced in these cases reaches more than 20 Gigabyte [GB]. These examples underline the necessity of developing solutions to utilize more computing power in order to speed up the analysis.

The last crucial problem dealing with the management of the developed model is the man-agement of model settings. Most settings of the developed model are stored in XML [Exten-sible Markup Language] files. All in all the XML statements for the simulation settings reach more than 550 lines. Especially in cases where a huge number of scenarios with varying pa-rameters (e. g. variation of CO2 prices or fuel prices) have to be calculated the management of model settings becomes a problem.

In order to deal with these issues and keep the developed model manageable, the PowerACE Cluster System has been developed. The PowerACE Cluster System consists of several mod-ules developed to deal with the issues described above. The PowerACE Analyzer is devel-oped for the automated analysis of PowerACE results. The PowerACE Cluster Management helps to utilize several PCs or processor cores of multi-core computers in parallel in order provide more computing power. The developed Scenario Creator provides a graphical user interface for the automated generation of scenario files. These main parts of the PowerACE Cluster system are described in this section.

8 Intel Core 2 Duo E6600 2.4 GHz, 2 GB RAM, (only one core is utilized)

5.6.1 Analysis Tools

The first step for the automated analysis of simulation results is the standardized output of the data produced in the simulation. Therefore all data logged in the simulation is created by the developed "UniversalDataLogger" providing a standardized format for the output of data on different time scales. The data is logged in ".csv" files. The UniversalDataLogger also pro-vides an adequate folder structure in order to facilitate further analysis. The next step is the development of an adequate tool for the automated analysis. Therefore the first task is the aggregation of the data produced by all simulation runs within one scenario. The developed PowerACE Analyzer cycles through all the result files and copies all the data of a given cate-gory into one Excel-file and calculates the average of the entire data set. An example for a possible result is the average spot market price in a given hour. In order to provide additional information the minimum, maximum and average values and the standard deviation of the entire time series for one year are calculated. In cases of simulations for several years these indicators are stored in an additional sheet and figures of the annual development of every indicator are created in order to speed up the analysis. Since the analysis of spot market prices plays an important role in this thesis, additional features have been implemented in order to speed up the calibration of the model. The EEX prices of the years 2001 to 2006 are stored within in the developed tool. If the tool is run for one of these years, it automatically creates a comparison of the simulated time series and actual price development. In order to exclude extreme price events the time series can be filtered. The filtered and ordered time series of hourly prices are automatically displayed in a graph. In addition a graph comparing the daily average prices is created. For more detailed information a summary sheet is created which sums up important indicators for the comparison of both time series. An overview of the out-put of the developed analysis tool is given in Table 5-8 and Table 5-9.

Table 5-8: Model output available for automated analysis

Indicator available for the analysis 1 Total load 8 Installed generation

capa-city 15 CO2 price 2 Renewable load 9 Available generation

capacity 16 Capacity price (Primary reserve)

3 Remaining system load 10 Installed generation

ca-pacity per fuel 17 Capacity price (Secondary reserve)

4 Relation of load and

avaiable capacity 11 Average efficiency of

plants per fuel 18 Cost of the primary re-serve

5 Market volume 12 Utlization of plants 19 Cost of the secondary reserve

6 Renewable market volume 13 Utilization of plants per

fuel 20

7 Profit 14 CO2 emissions 21

Due to the number of indicators and the disk space required for the analysis a graphical user interface is developed where the user can select the variables to be analysed by the analysis tool. The parameters selected by the user are stored in an XML file which is read by the

PowerACE Analyzer. An example of the Evaluation Selector is given in the Appendix (Figure A-1).

Formula 5-14: Definition of Profit

>

m = Spot market price for electricity [Euro/MWh]

Table 5-9: Indicators and figures created by the PowerACE Analyzer

Analysis of all hourly indicators

Indicators (simulation run) Indicators (scenario) Figures (scenario) Sum (annual)

Additional analysis for spot market prices

Benchmark Benchmark figures

Ø price (€/MWh) Minimum price (€/MWh) Maximum price (€/MWh) Standard deviation Correlation

Filtered and sorted prices Average daily prices

In order to help to enable the user to distinguish different scenarios and their corresponding model version, the PowerACE Analyzer copies the entire PowerACE model with the setting files, the databases and the result files to a folder on the network. In a last step the user is noti-fied per email about the finished analysis and the network position of the copied data. An overview of the structure of the PowerACE Analyzer is given in Figure 5-17.

PowerACE Analyzer Databases

Settings.xml

Evaluation Selector GUI

Tools.xml

Output Files Run 1 Output Files Run 2 Output Files Run …

Analysis Files Copy

Model

Model DB

Copy DB Model

Network

Notify user per email

Figure 5-17: Structure of the PowerACE Analyzer

Source: own illustration

In addition to the PowerACE Analyzer implemented in Java a number of additional Tools based on MS Excel are developed which apply Visual Basic methods in order to carry out further analysis for the case studies presented in the next chapter.

5.6.2 Scenario Creator

Another important part of the PowerACE Cluster System is the Scenario Creator. The Sce-nario Creator is a graphical user interface which helps to generate the xml-based parameter files required for a PowerACE Simulation. The Scenario Creator can be run in different modes. The first mode helps to create a number of single scenarios by varying single parame-ters manually. In order to get scenario specific analysis with the PowerACE Analyzer, the Scenario Creator is also linked with the Evaluation Selector GUI. The second mode of the Scenario Creator is far more complex since it allows for the creation of parameter sweeps.

The user can select single parameters and specify the start value, the end value and the step size between these values, and the Scenario Creator creates all scenario files necessary for the number of scenarios to be created. A further extension of the Scenario Creator is the possibil-ity to create nested parameter sweeps. Nested parameter sweeps can for example be used to search the optimal setting in a parameter space of several parameters. The user can select sev-eral parameters and a start value, an end value and the step size for each parameter. If a nested parameter sweep is created the Scenario Creator determines all possible combinations of the selected parameter space and creates the corresponding scenario files for each combination.

Depending on the number of variables and the number of steps for each variable, the number of created scenarios can be huge. The creation of nested parameter sweeps requires a complex algorithm which is capable to deal with parameters of different types (Objects, Integers, Floats…). The developed algorithm utilizes Hash Maps in order to manage the different types of parameters. An example of the graphical user interface of the Scenario Creator is given in Figure A-2. After the creation of the parameter files required for the PowerACE simulation run an additional xml-file is created which contains the most important information of the created scenarios such as an estimation of the required disk space or the number of the

scenar-ios. This xml-file can be used for the automated management of the created scenarios in the cluster management system. An overview of the structure of the developed Scenario Creator is given in Figure 5-18.

General Settings.xml

Scenario GUI Sweep GUI Analysis GUI

Scenarios.xml

Scenario GUI Sweep GUI Analysis GUI

Scenarios.xml

Scenario GUI Sweep GUI Analysis GUI

Scenarios.xml

Figure 5-18: Structure of the developed Scenario Creator

Source: own illustration

5.6.3 Cluster Management

The centre of the PowerACE Cluster System is the PowerACE Cluster Management. The PowerACE Cluster Management fulfils two major tasks: 1. The utilization of several com-puters or processor cores in order to speed up PowerACE simulation runs, 2. The manage-ment of different scenarios by sequential or parallel calculation. The PowerACE Cluster Management is made up of three modules in order to fulfil this task. This first module is the Core Manager. The Core Manager reads a database where all the necessary data on the avail-able computers are stored. This data consists of PC-name, processor, computing power, mem-ory, number of cores and the operation system. The available information on the computers is displayed in a graphical user interface. Based on the displayed information, the user can select the computers to be involved in the simulation (see Figure A-3 for a picture of the interface).

The Core Manager passes the information of the available computing units to the Software Distributor and starts the Cluster Watch which checks the physical availability of the selected computing units in predefined time steps. If one of the selected computing units fails to reply, e. g. because of technical problems (e. g. loss of network connection or power connection), it is deleted from the list of available computing units within the cluster and the status of the task assigned to the given computer is set to its initial status. A crucial issue for the calcula-tion and analysis of several scenarios is to ensure that the same versions of PowerACE, the necessary databases and the Analyzer are applied for the simulation. This task is carried out by the Software Distributor. The Software Distributor connects the selected computing units and copies the predefined software to the target computer. In order to increase the safety of this process the existing versions of the software are deleted on the target computer. All communication between the computers involved in the cluster takes place via SSH connection (Secure Shell). In case of the Software Distributor the Software Distributor creates two batch files. The first batch opens the SSH-connection, copies the second file to the target computer

and executes it. The second batch file contains the necessary commands, e. g. for the copy process of the PowerACE model. Once the software distribution is finished the target com-puter creates a predefined folder on the network. The Core Manager checks for the availabil-ity of this folder in defined time steps. If the folder is detected, the Core Manager passes the information of a free computing unit to the Scenario Manager. The Scenario Manager reads the Scenarios.xml file with the information on the scenarios to be calculated in the simulation.

Based on the given information on the available computing units (processor cores), the Sce-nario Manager assigns a sceSce-nario for each available computing unit and creates the necessary batch files in order to copy the necessary parameter files to the target computer and starts the simulation on the target computer. The status of the computing unit is set to "working". If one of the involved computing units has finished the calculation of its assigned scenario, two ad-ditional predefined folders are created. The first folder contains the number of the scenario and determines which scenario has been finished. This folder is detected by the Scenario Manager and the given scenario is deleted from the list of remaining scenarios. The second folder created by the computing unit contains its name. This folder is detected by the Core Manager and the computing is registered as a free unit. As long as not all scenarios are fin-ished, the free core is again passed to the Scenario Manager which assigns another scenario to the computing unit. The described cycle between the programmes and computing units con-tinues until all scenarios are calculated. The described Cluster Management can also be used on a single computer for the sequential calculation of several scenarios e. g. over night.

CopyScenarioBatch

Figure 5-19: Structure of the developed Cluster Management

Source: own illustration

5.6.4 Interaction of the developed modules

The developed PowerACE Cluster system is characterized by a complex interaction of the developed modules PowerACE, PowerACE Analyzer, Cluster Management and Scenario Creator. In order to enable a stepwise improvement of the single modules, the modules have to fulfil the following criteria: The developed modules have to be capable of running as a sin-gle stand alone application and as an integrated part of the PowerACE Cluster System. The requirement of a stand alone application is also helpful if a single application within the Clus-ter System crashes and the developed system can be restarted with the remaining tasks. How-ever, in most cases the developed modules run within the PowerACE Cluster System. The typical interaction of the PowerACE Cluster System is presented in Figure 5-20.

Scenario..

Scenario GUI Sweep GUI Analysis GUI

Scenarios.xml

Scenario GUI Sweep GUI Analysis GUI

Scenarios.xml

Scenario GUI Sweep GUI Analysis GUI

Scenarios.xml

Scenario GUI Sweep GUI Analysis GUI

Scenarios.xml

Figure 5-20: Structure of the PowerACE Cluster System

Source: own illustration

The first step is to create the scenarios to be calculated with the Scenario Creator. The Sce-nario Creator creates the required xml-files for the simulation and the PowerACE Analyzer.

The aggregate information on the created scenarios is stored in the file "Scenario.xml".

Thereafter the Cluster Management is started. The Cluster Management reads the "Scenar-ios.xml" in order to get the information on the scenarios to be calculated. The user can select the computer to be involved in the cluster. Based on the given information the Cluster Man-agement copies the software and the created parameter files to the target computer and starts the simulation on the target computer. The target computer carries out the simulation. If the simulation on the target computer reaches the required number of runs, the PowerACE model

starts the PowerACE Analyzer. The PowerACE Analyzer carries out the required analysis and copies the software and the result files to the network and notifies the user per email. Once the computer has finished his tasks the Cluster Management assigns a new task to the computer.

If all scenarios are finished, the user can manually start the developed Visual Basic Tools in order to carry out a specific analysis with the generated data set.

In document UNIVERSIDAD CÉSAR VALLEJO (página 32-44)

Documento similar