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")using PISP
# Set parameters (see all parameters below)
reference_trace = 2017 # Use 4006 for the reference trace of the ODP
poe = 10 # Probability of exceedance (POE) for demand
target_years = [2040]
# Generate PISP datasets for `target_years`, based on the reference trace 4006 (ODP of the 2024 ISP) for 10% POE demand
PISP.build_ISP24_datasets(
downloadpath = joinpath(@__DIR__, "..", "data", "pisp-downloads"),
poe = poe,
reftrace = reference_trace,
drange = [("09-02-2040", "11-02-2040")],
output_root = joinpath(@__DIR__, "..", "data", "pisp-datasets"),
write_csv = true,
write_arrow = true,
scenarios = [2])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