Methods - EnergyModelsBase

Index

Constraint methods

EnergyModelsBase.constraints_opex_varFunction
EMB.constraints_opex_var(m, n::MultipleBuildingTypes, 𝒯ᴵⁿᵛ, ::EnergyModel)

Function for creating the constraint on the variable OPEX of a MultipleBuildingTypes node.

The variable OPEX is calculate through the penalties for both surplus and deficit for each of the individual resource demands.

source
EMB.constraints_opex_var(m, n::CSPandPV, 𝒯ᴵⁿᵛ, ::EnergyModel)

Function for creating the constraint on the variable OPEX of a CSPandPV node.

source
EnergyModelsBase.constraints_capacityFunction
EMB.constraints_capacity(m, n::MultipleBuildingTypes, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraints on the maximum capacity of a MultipleBuildingTypes node.

source
EMB.constraints_capacity(m, n::CSPandPV, 𝒯::TimeStructure, ::EnergyModel)

Function for creating the constraint on the maximum capacity of a CSPandPV node. Also sets the constraint on the curtailment.

source
EnergyModelsBase.constraints_flow_outFunction
EMB.constraints_flow_out(m, n::CSPandPV, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the outlet flow from a CSPandPV node.

source
EMB.constraints_flow_out(m, n::BioCHP, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the outlet flow from a BioCHP node.

It differs from a standard NetworkNode by not requiring heat production.

source

Variable creation methods

EnergyModelsBase.variables_nodeFunction
EMB.variables_node(m, 𝒩::Vector{MultipleBuildingTypes}, 𝒯, ::EnergyModel)

For a MultipleBuildingTypes node, the following variables are created:

  • buildings_surplus[n, t, p] is the surplus of node n with resource p in operational period t.
  • buildings_deficit[n, t, p] is the surplus of node n with resource p in operational period t.
source
EMB.variables_node(m, 𝒩::Vector{CSPandPV}, 𝒯, ::EnergyModel)

For a CSPandPV node, the following variables are created:

  • solar_curtailment[n, t, p] is the curtailment of node n with resource p in operational period t.
  • solar_cap_use[n, t, p] is the capacity utilization of node n with resource p in operational period t.
  • solar_cap_inst[n, t, p] is the installed capacity of node n with resource p in operational period t.
source

Check methods

EnergyModelsBase.check_nodeFunction
EMB.check_node(n::WindPower, 𝒯, modeltype::EnergyModel, check_timeprofiles::Bool)

This method checks that the WindPower node is valid.

It reuses the standard checks of a Source node through calling the function EMB.check_node_default, but adds an additional check on the data.

Checks

  • The field cap is required to be non-negative (similar to the Source check).
  • The value of the field fixed_opex is required to be non-negative and accessible through a StrategicPeriod as outlined in the function check_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles).
  • The values of the dictionary output are required to be non-negative (similar to the Source check).
  • The field profile is required to be in the range $[0, 1]$ for all time steps $t ∈ \mathcal{T}$.
source
EMB.check_node(n::MultipleBuildingTypes, 𝒯, ::EnergyModel, ::Bool)

This method checks that the MultipleBuildingTypes node is valid.

Checks

  • The field cap_p is required to be non-negative for all resources p.
  • The values of the dictionary input are required to be non-negative.
  • The sum of the fields penalty_surplus and penalty_deficit has to be non-negative to avoid an infeasible model.
source
EMB.check_node(n::CSPandPV, 𝒯, ::EnergyModel, check_timeprofiles::Bool)

This method checks that the CSPandPV node is valid.

Checks

  • The field cap_p is required to be non-negative for all resources p.
  • The values of the dictionary output are required to be non-negative.
  • The value of the field opex_fixed_p is required to be non-negative.
  • The opex_fixed_p time profile cannot have a finer granulation than StrategicProfile.

Conditional checks (if check_timeprofiles=true)

  • The profiles in opex_fixed_p have to have the same length as the number of strategic periods.
source
check_node(n::BioCHP, 𝒯, modeltype::EnergyModel, check_timeprofiles::Bool)

This method checks that the BioCHP node is valid.

Checks

  • The output resources must include electricity_resource.
  • The field cap is required to be non-negative.
  • The values of the dictionary input are required to be non-negative.
  • The values of the dictionary output are required to be non-negative.
  • The value of the field fixed_opex is required to be non-negative and accessible through a StrategicPeriod as outlined in the function check_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles).
source

Field extraction methods

EnergyModelsBase.opex_fixedFunction
EMB.opex_fixed(n::CSPandPV)
EMB.opex_fixed(n::CSPandPV, p::Resource)
EMB.opex_fixed(n::CSPandPV, t_inv, p::Resource)

Returns the fixed OPEX of a CSPandPV n as a Dictionary or of resource p as TimeProfile or in operational period t.

source
EnergyModelsBase.opex_varFunction
EMB.opex_var(n::CSPandPV)
EMB.opex_var(n::CSPandPV, p::Resource)
EMB.opex_var(n::CSPandPV, t, p::Resource)

Returns the variable OPEX of a CSPandPV n as a Dictionary or of resource p as TimeProfile or in operational period t.

source
EnergyModelsBase.has_capacityFunction
EMB.has_capacity(n::CSPandPV)

A CSPandPV has capacity for all its resources but not in a EMB sense.

source
EMB.has_capacity(n::MultipleBuildingTypes)

A MultipleBuildingTypes has capacity for all its resources but not in a EMB sense.

source
EnergyModelsBase.capacityFunction
EMB.capacity(n::CSPandPV)
EMB.capacity(n::CSPandPV, p::Resource)
EMB.capacity(n::CSPandPV, t, p::Resource)

Returns the capacity of a CSPandPV n as a Dictionary or of resource p as TimeProfile or in operational period t.

source
EMB.capacity(n::MultipleBuildingTypes)
EMB.capacity(n::MultipleBuildingTypes, p::Resource)
EMB.capacity(n::MultipleBuildingTypes, t, p::Resource)

Returns the capacity of a MultipleBuildingTypes n as a Dictionary or of resource p as TimeProfile or in operational period t.

source
EnergyModelsBase.surplus_penaltyFunction
EMB.surplus_penalty(n::MultipleBuildingTypes)
EMB.surplus_penalty(n::MultipleBuildingTypes, p::Resource)
EMB.surplus_penalty(n::MultipleBuildingTypes, t, p::Resource)

Returns the surplus penalty of MultipleBuildingTypes n as a Dictionary or of resource p as TimeProfile or in operational period t.

source
EnergyModelsBase.deficit_penaltyFunction
EMB.deficit_penalty(n::MultipleBuildingTypes)
EMB.deficit_penalty(n::MultipleBuildingTypes, p::Resource)
EMB.deficit_penalty(n::MultipleBuildingTypes, t, p::Resource)

Returns the deficit penalty of MultipleBuildingTypes n as a Dictionary or of resource p as TimeProfile or in operational period t.

source