SiennaNEM.jl enables operational scheduling studies of the NEM using Sienna and JuMP. It constructs unit commitment models from PISP data and provides analysis and visualization tools for system operations insights.
See minimum working example workflow in examples/. Minimum example with data from PISP.jl is as follows,
using SiennaNEM
using PowerSimulations
using Dates
using HiGHS
# input variables parameters
system_data_dir = joinpath(@__DIR__, "../..", "NEM-reliability-suite", "data", "arrow")
schedule_name = "schedule-2030"
scenario = 1
# data and system
data = SiennaNEM.get_data(
system_data_dir, joinpath(system_data_dir, schedule_name); file_format="arrow",
)
sys = SiennaNEM.create_system!(data)
SiennaNEM.add_ts!(
sys, data;
horizon=Hour(24), # horizon of each time slice
interval=Hour(24), # interval between each time slice step in rolling horizon
scenario=scenario, # scenario number
)
# simulation
template_uc = SiennaNEM.build_problem_base_uc()
decision_models = SiennaNEM.run_simulation(
template_uc, sys;
simulation_folder="examples/result/simulation_folder",
simulation_name="$(schedule_name)_scenario-$(scenario)",
simulation_steps=2,
decision_model_kwargs=(
optimizer=optimizer_with_attributes(HiGHS.Optimizer, "mip_rel_gap" => 0.01),
),
)In your Julia global environment (starting Julia with julia, no --project),
using Pkg
Pkg.add("Revise")
Pkg.add("TestEnv")
using ReviseActivate environment,
using Pkg
Pkg.activate(".")
Pkg.instantiate()
using ReviseInstall PISP.jl,
using Pkg
Pkg.develop(path="../PISP.jl")Install specific PowerSimulations.jl and StorageSystemsSimulations.jl commit due to
bug fix. See: PR 1517
and PR 78.
Pkg.add(url="https://github.com/NREL-Sienna/PowerSimulations.jl", rev="8683c998901b7943fe98aab506ce74ef3fc0f06c")
Pkg.add(url="https://github.com/yasirroni/StorageSystemsSimulations.jl", rev="dcd9c46071bc9abf511314dfdf85efaacf8f8cb8")Note
If new version of PowerSimulations.jl and StorageSystemsSimulations.jl are
released, please use the updated version.
using PISP
reference_trace = 4006
poe = 10 # Probability of exceedance (POE) for demand
target_years = [2030, 2031]
PISP.build_ISP24_datasets(
downloadpath = joinpath(@__DIR__, "..", "data", "pisp-downloads"),
poe = poe,
reftrace = reference_trace,
years = target_years,
output_root = joinpath(@__DIR__, "..", "data", "pisp-datasets"),
write_csv = true,
write_arrow = true,
scenarios = [1,2,3]
)Note
Tests require the data/nem12 directory, which is currently not released.
using Pkg
Pkg.activate(".")
Pkg.resolve()
Pkg.instantiate()
Pkg.precompile()
Pkg.test()using Pkg
using TestEnv
TestEnv.activate("SiennaNEM")
Pkg.resolve()run bench/run_bench_data_format.jl and bench/run_bench_horizon.jl