diff --git a/.gitignore b/.gitignore index d760600..0d2614f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,13 @@ -*.csv -*.jld2 -*.json -*.pyc -*.log -.DS_Store -.vscode -*.txt -*.ipynb_checkpoints -*.sh -*.ipynb -*.json +*.csv +*.jld2 +*.json +*.pyc +*.log +.DS_Store +.vscode +*.txt +*.ipynb_checkpoints +*.sh +*.ipynb +*.json Manifest.toml \ No newline at end of file diff --git a/LICENSE b/LICENSE index 37f5fcd..52a1b7d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,29 +1,29 @@ -BSD 3-Clause License - -Copyright (c) 2019, Alliance for Sustainable Energy, LLC -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +BSD 3-Clause License + +Copyright (c) 2019, Alliance for Sustainable Energy, LLC +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Project.toml b/Project.toml index 7200ac7..6d89ef7 100644 --- a/Project.toml +++ b/Project.toml @@ -12,6 +12,7 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" +EMISExtensions = "ea396fd1-c9da-422a-af29-096b7307fcdf" FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" InfrastructureSystems = "2cd47ed4-ca9b-11e9-27f2-ab636a7671f1" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" @@ -21,11 +22,15 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" MinCostFlows = "62286e6e-1779-56f1-888a-1c0056788ce0" PRAS = "05348d26-1c52-11e9-35e3-9d51842d34b9" +PooledArrays = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" PowerSimulations = "e690365d-45e2-57bb-ac84-44ba829e73c4" PowerSystems = "bcd98974-b02a-5e2f-9ee0-a103f5c450dd" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +ReliablePowerSimulations = "52e8e31b-eef8-4797-aa92-cb78ffe3b27e" Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" TimeSeries = "9e3dc215-6440-5c97-bce1-76c03772f85e" +TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53" UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +Xpress = "9e70acf3-d6c9-5be6-b5bd-4e2c73e3e054" diff --git a/README.md b/README.md index e9e0869..6f8cea2 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,66 @@ -# EMIS AgentSimulation Model - -The Electricity Markets Investment Suite Agent-based Simulation (EMIS-AS) -model is an agent-based model developed at NREL for simulating annual investment -and retirement decisions of heterogeneous investors in the electricity sector. -EMIS-AS is designed to capture the evolution of the electricity generation portfolio -resulting from the interactions of heterogeneous investors under different policy -and market designs. EMIS-AS not only allows end-users to customize market products -and rules, but also to capture investors' heterogeneous financing parameters, -technology preferences, beliefs about the future (forecasts), ability to update -those forecasts, and risk preferences under uncertainty. - -## Model Structure - - - -EMIS-AS is initialized based on the input data detailing the test system, generation -units, market design, investors' characteristics and simulation parameters. Additionally, -the pre-processing step includes calculation of the weighted average cost of capital -(WACC) and adjusted CAPEX for all existing and option projects for each investor. -Next, the model selects the specified number of representative days (with hourly -resolution) to be used by the investors for price prediction. These representative -days and their corresponding weights are determined based on load and renewable -generation timeseries using k-medoids clustering. - -Subsequently, the simulation commences with successive yearly iterations for the specified -simulation horizon. At the start of each simulation year, the investors project future -prices and make revenue predictions. The predicted revenues are then used to calculate the -expected utility (based on the expected net present value (NPV)) for all projects. -Subsequently, the revenue prediction outcomes and expected utility are used to make -investment and retirement decisions and for calculation of market bids. - - -Once all investors have completed their decision-making process, their investment and -retirement decisions are announced. The model then updates the build-phases of all -projects, which are depicted below. - - - -The projects in the Option phase which get decided to be invested in are sent to the -interconnection queue and included in the list of active projects. The projects already -in the interconnection queue progress one year further in the queue. -The projects which have completed their queue time then enter the construction phase. It -is assumed that the investors only have to pay the annual queue costs when the projects are -in the queue, but would have to pay the full capital cost once construction commences. -The projects which have completed their construction times are included in the set of existing -projects. Finally, if any project is to be retired, either due to end-of-life or profitability -reasons, is removed from the list of active projects. - -The life cycle phase updates are followed by the actual clearing of the modeled electricity -markets. The current version of EMIS-AS includes energy, ancillary services, capacity and -Renewable Energy Certificates (REC) markets. The investors then update the realized revenues -for their projects and also update their beliefs (using Kalman Filters) based on the realized -values of the parameters. Finally, the derating factors of variable renewable generation -are calculated based on the updated installed capacities using the top-n net-load hour methodology. - -## Loading Data and Simulation Creation - -While the model's input data for investors and markets can be instantiated directly as -Julia structs, the model provides a CSV-based file import functionality that may be -more convenient. Data organized according to the file structure -[described here](input_file_structure.html) will be automatically populated into a -corresponding `AgentSimulation`. The worklow for processing the input data for creating -the `AgentSimulation` is depicted below. - +# EMIS AgentSimulation Model + +The Electricity Markets Investment Suite Agent-based Simulation (EMIS-AS) +model is an agent-based model developed at NREL for simulating annual investment +and retirement decisions of heterogeneous investors in the electricity sector. +EMIS-AS is designed to capture the evolution of the electricity generation portfolio +resulting from the interactions of heterogeneous investors under different policy +and market designs. EMIS-AS not only allows end-users to customize market products +and rules, but also to capture investors' heterogeneous financing parameters, +technology preferences, beliefs about the future (forecasts), ability to update +those forecasts, and risk preferences under uncertainty. + +## Model Structure + + + +EMIS-AS is initialized based on the input data detailing the test system, generation +units, market design, investors' characteristics and simulation parameters. Additionally, +the pre-processing step includes calculation of the weighted average cost of capital +(WACC) and adjusted CAPEX for all existing and option projects for each investor. +Next, the model selects the specified number of representative days (with hourly +resolution) to be used by the investors for price prediction. These representative +days and their corresponding weights are determined based on load and renewable +generation timeseries using k-medoids clustering. + +Subsequently, the simulation commences with successive yearly iterations for the specified +simulation horizon. At the start of each simulation year, the investors project future +prices and make revenue predictions. The predicted revenues are then used to calculate the +expected utility (based on the expected net present value (NPV)) for all projects. +Subsequently, the revenue prediction outcomes and expected utility are used to make +investment and retirement decisions and for calculation of market bids. + + +Once all investors have completed their decision-making process, their investment and +retirement decisions are announced. The model then updates the build-phases of all +projects, which are depicted below. + + + +The projects in the Option phase which get decided to be invested in are sent to the +interconnection queue and included in the list of active projects. The projects already +in the interconnection queue progress one year further in the queue. +The projects which have completed their queue time then enter the construction phase. It +is assumed that the investors only have to pay the annual queue costs when the projects are +in the queue, but would have to pay the full capital cost once construction commences. +The projects which have completed their construction times are included in the set of existing +projects. Finally, if any project is to be retired, either due to end-of-life or profitability +reasons, is removed from the list of active projects. + +The life cycle phase updates are followed by the actual clearing of the modeled electricity +markets. The current version of EMIS-AS includes energy, ancillary services, capacity and +Renewable Energy Certificates (REC) markets. The investors then update the realized revenues +for their projects and also update their beliefs (using Kalman Filters) based on the realized +values of the parameters. Finally, the derating factors of variable renewable generation +are calculated based on the updated installed capacities using the top-n net-load hour methodology. + +## Loading Data and Simulation Creation + +While the model's input data for investors and markets can be instantiated directly as +Julia structs, the model provides a CSV-based file import functionality that may be +more convenient. Data organized according to the file structure +[described here](input_file_structure.html) will be automatically populated into a +corresponding `AgentSimulation`. The worklow for processing the input data for creating +the `AgentSimulation` is depicted below. + \ No newline at end of file diff --git a/input_file_structure.html b/input_file_structure.html index a69a8bf..89b672c 100644 --- a/input_file_structure.html +++ b/input_file_structure.html @@ -1,424 +1,424 @@ - - - - - - - - - -