-
Notifications
You must be signed in to change notification settings - Fork 0
/
testProductionCostModel.jl
38 lines (32 loc) · 1.43 KB
/
testProductionCostModel.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
This is a test Production Cost Model using PowerSystems.jl and PowerSimulations.jl.
The following test is based off the demonstration by Dr. Kate Doubleday of the Global
Power Systems Transformation Consortium.
The walkthrough for the example can be found using this link:
https://www.youtube.com/watch?v=84IQjMe_CPs&pp=ygUaa2F0ZSBkb3VibGVkYXkgbnJlbCBzaWVubmE%3D
The walkthrough has been modified using the documented example in PowerSimulations.jl:
https://nrel-sienna.github.io/PowerSimulations.jl/latest/tutorials/pcm_simulation/
@author: Anna Casavant and Pradyumna Rao
"""
# Bringing in the import statements
using PowerSystems
using PowerSimulations
using PowerAnalytics
using PowerGraphics
using Logging
using Dates
using CSV
using DataFrames
using HiGHS
solver = optimizer_with_attributes(HiGHS.Optimizer, "mip_rel_gap" => 0.5)
MathOptInterface.OptimizerWithAttributes(HiGHS.Optimizer, Pair{MathOptInterface.AbstractOptimizerAttribute, Any}[MathOptInterface.RawOptimizerAttribute("mip_rel_gap") => 0.5])
plotlyjs()
# Import System
sys_DA = build_system(PSISystems, "modified_RTS_GMLC_DA_sys") # Day Ahead System
sys_RT = build_system(PSISystems, "modified_RTS_GMLC_RT_sys") # Real Time System
# Defining unit committment for Day Ahead problem
"""
template_uc = template_unit_commitment()
set_device_model!(template_uc, ThermalStandard, ThermalStandardUnitCommitment)
set_device_model!(template_uc, HydroDispatch, HydroDispatchRunOfRiver)
"""