generated from NREL-Sienna/SiennaTemplate.jl
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:NREL-Sienna/PowerSystemsInvestments.jl
- Loading branch information
Showing
59 changed files
with
4,699 additions
and
745 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
abstract type AbstractTechnologyFormulation end | ||
|
||
abstract type InvestmentTechnologyFormulation <: AbstractTechnologyFormulation end | ||
abstract type OperationsTechnologyFormulation <: AbstractTechnologyFormulation end | ||
abstract type FeasibilityTechnologyFormulation <: AbstractTechnologyFormulation end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
### Investment Constraints ### | ||
struct MaximumCumulativeCapacity <: ISOPT.ConstraintType end | ||
|
||
struct MaximumCumulativePowerCapacity <: ISOPT.ConstraintType end | ||
|
||
struct MaximumCumulativeEnergyCapacity <: ISOPT.ConstraintType end | ||
|
||
### Operations Constraints ### | ||
|
||
struct SupplyDemandBalance <: ISOPT.ConstraintType end | ||
|
||
struct MaximumCumulativeCapacity <: ISOPT.ConstraintType end | ||
struct SingleRegionBalanceConstraint <: ISOPT.ConstraintType end | ||
|
||
struct ActivePowerVariableLimitsConstraint <: ISOPT.ConstraintType end | ||
|
||
struct ActivePowerLimitsConstraint <: ISOPT.ConstraintType end | ||
|
||
struct OutputActivePowerVariableLimitsConstraint <: ISOPT.ConstraintType end | ||
|
||
struct InputActivePowerVariableLimitsConstraint <: ISOPT.ConstraintType end | ||
|
||
struct EnergyBalanceConstraint <: ISOPT.ConstraintType end | ||
|
||
struct StateofChargeLimitsConstraint <: ISOPT.ConstraintType end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const UNSET_HORIZON = Dates.Millisecond(0) | ||
const UNSET_RESOLUTION = Dates.Millisecond(0) | ||
const UNSET_INI_TIME = Dates.DateTime(0) | ||
|
||
const SECONDS_IN_MINUTE = 60.0 | ||
const MINUTES_IN_HOUR = 60.0 | ||
const SECONDS_IN_HOUR = 3600.0 | ||
const MILLISECONDS_IN_HOUR = 3600000.0 | ||
const MAX_START_STAGES = 3 | ||
const OBJECTIVE_FUNCTION_POSITIVE = 1.0 | ||
const OBJECTIVE_FUNCTION_NEGATIVE = -1.0 | ||
|
||
# Type Alias for JuMP containers | ||
const GAE = JuMP.GenericAffExpr{Float64, JuMP.VariableRef} | ||
const JuMPAffineExpressionArray = Matrix{GAE} | ||
const JuMPAffineExpressionVector = Vector{GAE} | ||
|
||
IS.@scoped_enum(SOSStatusVariable, NO_VARIABLE = 1, PARAMETER = 2, VARIABLE = 3,) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
struct SupplyTotal <: ISOPT.ExpressionType end | ||
struct DemandTotal <: ISOPT.ExpressionType end | ||
abstract type InvestmentExpressionType <: ISOPT.ExpressionType end | ||
abstract type OperationsExpressionType <: ISOPT.ExpressionType end | ||
|
||
struct CumulativeCapacity <: ISOPT.ExpressionType end | ||
struct CapitalCost <: ISOPT.ExpressionType end | ||
struct FixedOMCost <: ISOPT.ExpressionType end | ||
struct SupplyTotal <: OperationsExpressionType end | ||
struct DemandTotal <: OperationsExpressionType end | ||
struct ActivePowerBalance <: OperationsExpressionType end | ||
|
||
struct CumulativeCapacity <: InvestmentExpressionType end | ||
|
||
struct CumulativePowerCapacity <: InvestmentExpressionType end | ||
struct CumulativeEnergyCapacity <: InvestmentExpressionType end | ||
|
||
struct CapitalCost <: InvestmentExpressionType end | ||
struct FixedOperationModelCost <: InvestmentExpressionType end | ||
|
||
struct TotalCapitalCost <: ISOPT.ExpressionType end | ||
|
||
struct VariableOMCost <: ISOPT.ExpressionType end | ||
struct VariableOMCost <: OperationsExpressionType end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
abstract type AbstractInvestmentModelTemplate end | ||
|
||
mutable struct InvestmentModelTemplate <: AbstractInvestmentModelTemplate | ||
capital_model::CapitalCostModel | ||
operation_model::OperationCostModel | ||
feasibility_model::FeasibilityModel | ||
transport_model::TransportModel{<:AbstractTransportAggregation} | ||
technology_models::Dict # Type to be refined later | ||
|
||
function InvestmentModelTemplate( | ||
capital_model::CapitalCostModel, | ||
operation_model::OperationCostModel, | ||
feasibility_model::FeasibilityModel, | ||
transport_model::TransportModel{T}, | ||
) where {T <: AbstractTransportAggregation} | ||
new(capital_model, operation_model, feasibility_model, transport_model, Dict()) | ||
end | ||
end | ||
|
||
function Base.isempty(template::InvestmentModelTemplate) | ||
if !isempty(template.technologies) | ||
return false | ||
else | ||
return true | ||
end | ||
end | ||
|
||
InvestmentModelTemplate(::Type{T}) where {T <: AbstractTransportAggregation} = | ||
InvestmentModelTemplate(TransportModel(T)) | ||
InvestmentModelTemplate() = InvestmentModelTemplate(SingleRegionPowerModel) | ||
|
||
get_technology_models(template::InvestmentModelTemplate) = template.technologies | ||
get_network_model(template::InvestmentModelTemplate) = template.network_model | ||
get_network_formulation(template::InvestmentModelTemplate) = | ||
get_network_formulation(get_network_model(template)) | ||
|
||
""" | ||
Sets the network model in a template. | ||
""" | ||
function set_transport_model!( | ||
template::InvestmentModelTemplate, | ||
model::TransportModel{<:AbstractTransportAggregation}, | ||
) | ||
template.transport_model = model | ||
return | ||
end | ||
|
||
function set_device_model!( | ||
template::InvestmentModelTemplate, | ||
component_type::Type{<:PSIP.Technology}, | ||
investment_formulation::Type{<:InvestmentTechnologyFormulation}, | ||
operations_formulation::Type{<:OperationsTechnologyFormulation}, | ||
) | ||
set_device_model!( | ||
template, | ||
TechnologyModel(component_type, investment_formulation, operations_formulation), | ||
) | ||
return | ||
end | ||
|
||
function set_device_model!( | ||
template::InvestmentModelTemplate, | ||
model::TechnologyModel{ | ||
<:PSIP.Technology, | ||
<:InvestmentTechnologyFormulation, | ||
<:OperationsTechnologyFormulation, | ||
}, | ||
) | ||
_set_model!(template.technologies, model) | ||
return | ||
end |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.