Methods - EnergyModelsBase
Index
EnergyModelsBase.capacityEnergyModelsBase.check_nodeEnergyModelsBase.constraints_capacityEnergyModelsBase.constraints_flow_inEnergyModelsBase.constraints_flow_outEnergyModelsBase.constraints_opex_fixedEnergyModelsBase.constraints_opex_varEnergyModelsBase.deficit_penaltyEnergyModelsBase.has_capacityEnergyModelsBase.opex_fixedEnergyModelsBase.opex_varEnergyModelsBase.surplus_penaltyEnergyModelsBase.variables_node
Constraint methods
EnergyModelsBase.constraints_opex_var — FunctionEMB.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.
EMB.constraints_opex_var(m, n::CSPandPV, 𝒯ᴵⁿᵛ, ::EnergyModel)Function for creating the constraint on the variable OPEX of a CSPandPV node.
EnergyModelsBase.constraints_opex_fixed — FunctionEMB.constraints_opex_fixed(m, n::CSPandPV, 𝒯ᴵⁿᵛ, ::EnergyModel)Function for creating the constraint on the fixed OPEX of a CSPandPV node.
EnergyModelsBase.constraints_capacity — FunctionEMB.constraints_capacity(m, n::MultipleBuildingTypes, 𝒯::TimeStructure, modeltype::EnergyModel)Function for creating the constraints on the maximum capacity of a MultipleBuildingTypes node.
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.
EnergyModelsBase.constraints_flow_in — FunctionEMB.constraints_flow_in(m, n::MultipleBuildingTypes, 𝒯::TimeStructure, ::EnergyModel)The constraints on the inlet flow for a MultipleBuildingTypes node are implemented directly in the function EMB.constraints_capacity.
EnergyModelsBase.constraints_flow_out — FunctionEMB.constraints_flow_out(m, n::CSPandPV, 𝒯::TimeStructure, modeltype::EnergyModel)Function for creating the constraint on the outlet flow from a CSPandPV node.
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.
Variable creation methods
EnergyModelsBase.variables_node — FunctionEMB.variables_node(m, 𝒩::Vector{MultipleBuildingTypes}, 𝒯, ::EnergyModel)For a MultipleBuildingTypes node, the following variables are created:
buildings_surplus[n, t, p]is the surplus of nodenwith resourcepin operational periodt.buildings_deficit[n, t, p]is the surplus of nodenwith resourcepin operational periodt.
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 nodenwith resourcepin operational periodt.solar_cap_use[n, t, p]is the capacity utilization of nodenwith resourcepin operational periodt.solar_cap_inst[n, t, p]is the installed capacity of nodenwith resourcepin operational periodt.
Check methods
EnergyModelsBase.check_node — FunctionEMB.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
capis required to be non-negative (similar to theSourcecheck). - The value of the field
fixed_opexis required to be non-negative and accessible through aStrategicPeriodas outlined in the functioncheck_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles). - The values of the dictionary
outputare required to be non-negative (similar to theSourcecheck). - The field
profileis required to be in the range $[0, 1]$ for all time steps $t ∈ \mathcal{T}$.
EMB.check_node(n::MultipleBuildingTypes, 𝒯, ::EnergyModel, ::Bool)This method checks that the MultipleBuildingTypes node is valid.
Checks
- The field
cap_pis required to be non-negative for all resourcesp. - The values of the dictionary
inputare required to be non-negative. - The sum of the fields
penalty_surplusandpenalty_deficithas to be non-negative to avoid an infeasible model.
EMB.check_node(n::CSPandPV, 𝒯, ::EnergyModel, check_timeprofiles::Bool)This method checks that the CSPandPV node is valid.
Checks
- The field
cap_pis required to be non-negative for all resourcesp. - The values of the dictionary
outputare required to be non-negative. - The value of the field
opex_fixed_pis required to be non-negative. - The
opex_fixed_ptime profile cannot have a finer granulation thanStrategicProfile.
Conditional checks (if check_timeprofiles=true)
- The profiles in
opex_fixed_phave to have the same length as the number of strategic periods.
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
capis required to be non-negative. - The values of the dictionary
inputare required to be non-negative. - The values of the dictionary
outputare required to be non-negative. - The value of the field
fixed_opexis required to be non-negative and accessible through aStrategicPeriodas outlined in the functioncheck_fixed_opex(n, 𝒯ᴵⁿᵛ, check_timeprofiles).
Field extraction methods
EnergyModelsBase.opex_fixed — FunctionEMB.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.
EnergyModelsBase.opex_var — FunctionEMB.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.
EnergyModelsBase.has_capacity — FunctionEMB.has_capacity(n::CSPandPV)A CSPandPV has capacity for all its resources but not in a EMB sense.
EMB.has_capacity(n::MultipleBuildingTypes)A MultipleBuildingTypes has capacity for all its resources but not in a EMB sense.
EnergyModelsBase.capacity — FunctionEMB.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.
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.
EnergyModelsBase.surplus_penalty — FunctionEMB.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.
EnergyModelsBase.deficit_penalty — FunctionEMB.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.