Skip to content

yasirroni/SiennaNEM.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

177 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SiennaNEM

Build Status Coverage

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.

Usage

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),
    ),
)

Development

Installation

In your Julia global environment (starting Julia with julia, no --project),

using Pkg
Pkg.add("Revise")
Pkg.add("TestEnv")
using Revise

Activate environment,

using Pkg
Pkg.activate(".")
Pkg.instantiate()
using Revise

Install PISP.jl,

using Pkg
Pkg.develop(path="../PISP.jl")

Add data

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])

Test

Note

Tests require the data/nem12 directory, which is currently not released.

using Pkg

Pkg.activate(".")
Pkg.resolve()
Pkg.instantiate()
Pkg.precompile()
Pkg.test()

Benchmark

using Pkg
using TestEnv
TestEnv.activate("SiennaNEM")
Pkg.resolve()

run bench/run_bench_data_format.jl and bench/run_bench_horizon.jl

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Julia 100.0%