Capacity Expansion Problem Formulation for Julia
Author YoungFaithful
4 Stars
Updated Last
10 Months Ago
Started In
March 2019

CapacityExpansion logo

Build Status

CapacityExpansion is a julia implementation of an input-data-scaling capacity expansion modeling framework.

The main purpose of the package is providing an extensible, simple-to-use generation and transmission capacity expansion model that allows to address a diverse set of research questions in the area of energy systems planning. The secondary purposes are:

  1. Providing a simple process to integrate (clustered) time-series input data, geographical input data, cost input data, and technology input data.
  2. Providing a model configuration, a modular model setup and model optimization.
  3. Providing an interface between the optimization result and further analysis.

Please refer to the documentation for details on how to use this software.

Model Information
Model class Capacity Expansion Problem
Model type Optimization, Linear optimization model input-data depending energy system
Carriers Electricity, Hydrogen, ...
Technologies dispatchable and non-dispatchable Generation, Conversion, Storage (seasonal), Transmission
Decisions investment and dispatch
Objective Total system cost
Variables Cost, Capacities, Generation, Storage, Lost-Load, Lost-Emissions
Input Data Depending Provided Input Data
Regions California, USA (single and multi-node) and Germany, Europe (single and multi-node)
Geographic Resolution aggregated regions
Time resolution hourly
Network coverage transmission, DCOPF load flow

The package uses TimeSeriesClustering as a basis for its time-series aggregation.

This package is developed by Elias Kuepper @YoungFaithful and Holger Teichgraeber @holgerteichgraeber.


This package runs under julia v1.0 and higher. It depends on multiple packages, which are also listed in the Project.toml. The packages are automatically installed by the julia package manager:

  • JuMP.jl - for the modeling environment
  • CSV.jl - for handling of .csv-Files
  • DataFrames.jl - for handling of tables
  • StatsBase.jl - for handling of basic
  • JLD2 - for saving your result data
  • FileIO - for file accessing
  • TimeSeriesClustering.jl - for time-series data

You can install CapacityExpansion using the package mode:

add CapacityExpansion

or using the Pkg.add function:

using Pkg

A solver is required to run an optimization as explained in section Solver. Install e.g. Clp using the package mode:

add Clp

or using the Pkg.add function:

using Pkg

Example Workflow

using CapacityExpansion
using Clp
optimizer=Clp.Optimizer # select optimizer

# laod ts-data
ts_input_data = load_timeseries_data_provided("GER_1"; T=24, years=[2016])
# load cep-data
cep_data = load_cep_data_provided("GER_1")

# run a simple


The model is being tested against a capacity expansion model presented in the paper On representation of temporal variability in electricity capacity planning models by Merrick 2016. The model additionally tests itself against previously calculated data to detect new errors.