Public interface

New nodal types

EnergyModelsLanguageInterfaces.WindPowerType
WindPower <: AbstractNonDisRES

A wind power source. It extends the existing AbstractNonDisRES node through allowing for sampling the profile from a Python code through a constructor.

Fields

  • id is the name/identifyer of the node.
  • cap::TimeProfile is the installed capacity.
  • profile::TimeProfile is the power production in each operational period as a ratio of the installed capacity at that time.
  • opex_var::TimeProfile is the variable operating expense per energy unit produced.
  • opex_fixed::TimeProfile is the fixed operating expense.
  • output::Dict{Resource, Real} are the generated Resources, normally Power.
  • data::Vector{<:Data} is the additional data (e.g. for investments). The field data is conditional through usage of a constructor.
source
EnergyModelsLanguageInterfaces.CSPandPVType
CSPandPV <: AbstractNonDisRES

A combined CSP and PV source producing both power and heat. It extends the existing AbstractNonDisRES to multiple production profiles. The profiles can have variations on the strategic level.

Fields

  • id is the name/identifyer of the node.
  • cap::Dict{<:Resource,<:TimeProfile} is the installed capacity (for all resources in a Dict).
  • profile::Dict{<:Resource,<:TimeProfile} is the production profile in each operational period as a ratio of the installed capacity at that time (for all resources in a Dict).
  • opex_var::Dict{<:Resource,<:TimeProfile} is the variable operating expense per energy unit produced (for all resources in a Dict).
  • opex_fixed::Dict{<:Resource,<:TimeProfile} is the fixed operating expense (for all resources in a Dict).
  • output::Dict{Resource, Real} are the generated Resources, normally Power.
  • data::Vector{<:Data} is the additional data (e.g. for investments). The field data is conditional through usage of a constructor.
Danger

Investments are not available for this node.

source
EnergyModelsLanguageInterfaces.MultipleBuildingTypesType
struct MultipleBuildingTypes <: EMB.Sink

A MultipleBuildingTypes node that creates sinks for all demand resources. The demand for each resources has a penalty for both surplus and deficit. The penalties introduced in the field penalty affect the variable OPEX for both a surplus and deficit.

Fields

  • id is the name/identifier of the node.
  • cap::Dict{<:Resource,<:TimeProfile} is the demand.
  • penalty_surplus::Dict{<:Resource,<:TimeProfile} are the penalties for surplus.
  • penalty_deficit::Dict{<:Resource,<:TimeProfile} are the penalties for deficit.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • data::Vector{<:Data} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
Danger

Investments are not available for this node.

source
EnergyModelsLanguageInterfaces.ResourceBioType
ResourceBio{T<:Real} <: Resource

Resources that can be transported and converted. These resources cannot be included as resources that are emitted, e.g, in the variable emissions_strategic. Compared to a ResourceCarrier, the ResourceBio Resource includes additionally the fuel definition (a string identifier of the biomass) and the moisture content of the biomass (as a mass fraction).

Fields

  • id is the name/identifyer of the resource.
  • bio_type::String is the type of biomass, e.g., "sprucestem", "sprucebark", "spruceT&B", or "birchstem".
  • moisture::Float64 is the moisture content of the biomass resource as a mass fraction.
  • co2_int::T is the CO₂ intensity, e.g., t/MWh.
source
EnergyModelsLanguageInterfaces.BioCHPType
BioCHP <: NetworkNode

A BioCHP node that samples the CHP model at https://github.com/iDesignRES/CHP_modelling.git.

CHP_modelling version

The current implementation supports v0.4.0 (can be achieved with git checkout v0.4.0).

The BioCHP utilizes a linear, time independent conversion rate of the input Resources to the output Resources, subject to the available capacity. The capacity is hereby normalized to a conversion value of 1 in the fields input and output.

Fields

  • id is the name/identifier of the node.
  • cap::TimeProfile is the installed capacity.
  • electricity_resource::Resource is the electric power resource.
  • opex_var::TimeProfile is the variable operating expense per per capacity usage through the variable :cap_use.
  • opex_fixed::TimeProfile is the fixed operating expense per installed capacity through the variable :cap_inst.
  • input::Dict{<:Resource,<:Real} are the input Resources with conversion value Real.
  • output::Dict{<:Resource,<:Real} are the generated Resources with conversion value Real.
  • data::Vector{<:Data} is the additional data (e.g., for investments). The field data is conditional through usage of a constructor.
source

Utility functions

EnergyModelsLanguageInterfaces.call_python_functionFunction
call_python_function(module_name::String, function_name::String; kwargs...)
call_python_function(module_name::String, function_name::String, args::Vector)

Call an external Python function.

Arguments

  • module_name - the name of the Python module to be used.
  • function_name - the name of the function to be called. Nested names (e.g., due to sub modules) must be separated by ".".

This function enables a vector of arguments (args) or keyword arguments (kwargs) as the input to the python function to be called.

Arguments

The function can be called with either a vector of arguments or keyword arguments, but not both. A combination of both arguments and keyword arguments is not possible as Julia does not distinguish methods solely based on the presence of keyword arguments.

Environments

It is assumed that the required packages of the python module is installed in the root environment.

If a specific python environment is required, one can use conda to create the environment and then set ENV["PYTHON"] to the path of the python executable in that environment. This requires a rebuild of PyCall with Pkg.build("PyCall") followed by a restart of Julia.

Arguments

If kwargs is not used and the function requires arguments, the function will assume all arguments are collected in the Vector args. That is, if you only have one argument to the python function which is a Vector, it must be passed as a Vector of the Vector.

source