API

API

Model

Define energy system model type as JuMP.Model.

source

Specifation for which constraints to include to the model. Constraints that are not specified are included by default.

Arguments

  • renewable_target::Bool: Whether to include renewables target constraint.
  • storage::Bool: Whether to include storage constraints.
  • ramping::Bool: Whether to include ramping constraints.
  • voltage_angles::Bool: Whether to include voltage angle constraints.
source

Input indices and parameters for the model.

source

Variable values.

source

Objective values.

source

Extract variable values from model.

Arguments

  • model::EnergySystemModel
source

Extract objective values from model.

Arguments

  • model::EnergySystemModel
source

Creates the energy system model.

Arguments

  • parameters::Params
  • specs::Specs
source

IO

Note

JSON stores multi-dimensional arrays as nested arrays. If we load an array a whose elements are accessed a[i, j, k], the elements of the nested array are accessed in reverse order a[k][j][i]. However, the function load_json converts the nested arrays back to multi-dimensional arrays.

We use simple plain text formats CSV and JSON for input and output of numerical values.

Equivalent annual cost (EAC)

Arguments

  • cost::Real: Net present value of a project.
  • n::Integer: Number of payments.
  • r::Real: Interest rate.
source

Loads parameter values for an instance from CSV and JSON files. Reads the following files from instance_path.

  • indices.json with fields G, G_r, N, L, T, S
  • constants.json with fields kappa, C, C_bar, r
  • nodes/ – Time clustered data from the nodes with fields Dem_Inc, Load_mod, Max_Load, Avail_Win, Avail_Sol
    • 1.csv
    • 2.csv
    • ...
  • technology.csv with fields cost, lifetime, M, fuel_cost_1, fuel_cost_2, r_minus, r_plus
  • transmission.csv with fields M, cost, dist, lifetime, C, B
  • storage.csv with fields xi, cost, lifetime, C, b0_1, ..., b0_n

Arguments

  • instance_path::AbstractString: Path to the instance directory.
source

Save object into JSON file.

Arguments

  • object
  • output_path::AbstractString: Full filepath, e.g., path.json.
source

Load values to type from JSON file.

Arguments

  • type
  • filepath::AbstractString
source

Plotting

Plot objective value and individual objective values.

source

Plot generation dispatch.

source

Plot generation capacities.

source

Plot transmission flow.

source

Plot transmission capacities.

source

Plot storage level.

source

Plot storage capacities.

source

Plot loss of load.

source