Simulation Utilities

NEMStorageUnderUncertainty.calculate_actual_revenueMethod
calculate_actual_revenue(
    sim_results::DataFrames.DataFrame,
    actual_price_data::DataFrames.DataFrame,
    τ::Float64
) -> Any

Summary

Calculates actual revenue and adds it as a column to sim_results.

  • Revenue is calculated for binding decisions
  • non binding decisions have missing revenue

Arguments:

  • sim_results: DataFrame of simulation results
  • actual_price_data: DataFrame with actual price data

(with SETTLEMENTDATE column and prices covering simulation period)

  • tau: Interval length in hours

Returns

sim_results with revenue column.

Methods

calculate_actual_revenue(sim_results, actual_price_data, τ)

defined at /home/runner/work/NEMStorageUnderUncertainty/NEMStorageUnderUncertainty/src/simulation_utils.jl:18.

source
NEMStorageUnderUncertainty.results_to_jld2Method
results_to_jld2(
    results_file::String,
    group::String,
    key::String,
    data::DataFrames.DataFrame
)

Summary

Saves simulation results to a JLD2 (HDF5) data file

Simulation results (data) are saved in results_file/group/key

Arguments

  • results_file: Path to file, including .jld2 extension
  • group: Data group - actual or forecast
  • key: Dataset key - storage power capacity
  • data: Simulation results DataFrame

Methods

results_to_jld2(results_file, group, key, data)

defined at /home/runner/work/NEMStorageUnderUncertainty/NEMStorageUnderUncertainty/src/simulation_utils.jl:114.

source
NEMStorageUnderUncertainty.run_perfect_foresightMethod
run_perfect_foresight(
    optimizer::MathOptInterface.OptimizerWithAttributes,
    storage::NEMStorageUnderUncertainty.StorageDevice,
    actual_data::NEMStorageUnderUncertainty.ActualData,
    formulation::NEMStorageUnderUncertainty.StorageModelFormulation,
    degradation::NEMStorageUnderUncertainty.DegradationModel;
    silent,
    time_limit_sec,
    string_names
) -> Any

Summary

Runs a perfect foresight model across the period of an ActualData instance.

Perfect foresight entails:

  • Perfect knowledge of future price (hence use of actual price data)
  • Complete horizon lookahead

Arguments

  • optimizer: A solver optimizer
  • storage: StorageDevice
  • actual_data: ActualData
  • formulation: A model formulation (StorageModelFormulation)
  • degradation: A degradation model (DegradationModel)
  • silent: default false. true to suppress solver output
  • time_limit_sec: default nothing. Float64 to impose solver time limit in seconds
  • string_names: default true. false to disable JuMP string names

Returns

Simulation results for the one binding decision point (i.e. at start of simulation period)

Methods

run_perfect_foresight(
    optimizer,
    storage,
    actual_data,
    formulation,
    degradation;
    silent,
    time_limit_sec,
    string_names
)

defined at /home/runner/work/NEMStorageUnderUncertainty/NEMStorageUnderUncertainty/src/simulation_utils.jl:68.

source