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::Paramsspecs::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.jsonwith fieldsG,G_r,N,L,T,Sconstants.jsonwith fieldskappa,C,C_bar,rnodes/– Time clustered data from the nodes with fieldsDem_Inc,Load_mod,Max_Load,Avail_Win,Avail_Sol1.csv2.csv- ...
technology.csvwith fieldscost,lifetime,M,fuel_cost_1,fuel_cost_2,r_minus,r_plustransmission.csvwith fieldsM,cost,dist,lifetime,C,Bstorage.csvwith 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
objectoutput_path::AbstractString: Full filepath, e.g.,path.json.
EnergySystemModeling.load_json — Function.Load values to type from JSON file.
Arguments
typefilepath::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.