API
Model
Define energy system model type as JuMP.Model.
EnergySystemModeling.Specs
— Type.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.
EnergySystemModeling.Params
— Type.Input indices and parameters for the model.
EnergySystemModeling.Variables
— Type.Variable values.
EnergySystemModeling.Objectives
— Type.Objective values.
EnergySystemModeling.Variables
— Method.Extract variable values from model.
Arguments
model::EnergySystemModel
EnergySystemModeling.Objectives
— Method.Extract objective values from model.
Arguments
model::EnergySystemModel
EnergySystemModeling.EnergySystemModel
— Method.Creates the energy system model.
Arguments
parameters::Params
specs::Specs
IO
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.
EnergySystemModeling.equivalent_annual_cost
— Function.Equivalent annual cost (EAC)
Arguments
cost::Real
: Net present value of a project.n::Integer
: Number of payments.r::Real
: Interest rate.
EnergySystemModeling.Params
— Method.Loads parameter values for an instance from CSV and JSON files. Reads the following files from instance_path
.
indices.json
with fieldsG
,G_r
,N
,L
,T
,S
constants.json
with fieldskappa
,C
,C_bar
,r
nodes/
– Time clustered data from the nodes with fieldsDem_Inc
,Load_mod
,Max_Load
,Avail_Win
,Avail_Sol
1.csv
2.csv
- ...
technology.csv
with fieldscost
,lifetime
,M
,fuel_cost_1
,fuel_cost_2
,r_minus
,r_plus
transmission.csv
with fieldsM
,cost
,dist
,lifetime
,C
,B
storage.csv
with fieldsxi
,cost
,lifetime
,C
,b0_1, ..., b0_n
Arguments
instance_path::AbstractString
: Path to the instance directory.
EnergySystemModeling.save_json
— Function.Save object into JSON file.
Arguments
object
output_path::AbstractString
: Full filepath, e.g.,path.json
.
EnergySystemModeling.load_json
— Function.Load values to type from JSON file.
Arguments
type
filepath::AbstractString
Plotting
EnergySystemModeling.plot_objective_values
— Function.Plot objective value and individual objective values.
EnergySystemModeling.plot_generation_dispatch
— Function.Plot generation dispatch.
EnergySystemModeling.plot_generation_capacities
— Function.Plot generation capacities.
EnergySystemModeling.plot_transmission_flow
— Function.Plot transmission flow.
Plot transmission capacities.
EnergySystemModeling.plot_storage_level
— Function.Plot storage level.
EnergySystemModeling.plot_storage_capacities
— Function.Plot storage capacities.
EnergySystemModeling.plot_loss_of_load
— Function.Plot loss of load.