Open holgerteichgraeber opened 4 years ago
The last question should be with *0.5
:
I'm thinking of replacing the right hand side of the third constraint by sum(cep.model[:CAP][tech, infrastruct, node] for infrastruct=set["infrastruct"]["all"])*scale[:CAP]/scale[:INTRASTOR] * 0.5. Anything I should be aware of with scaling?
Limit the storage of the energy part of the battery to its installed power
should say: Limit the stored energy of the battery to its energy capacity
to meet what's mathematically happeningsum(cep.model[:CAP][tech, infrastruct, node] for infrastruct=set["infrastruct"]["all"])*scale[:CAP]/scale[:INTRASTOR]
(for each tech=set["tech"]["storage"]
and node=set["nodes"]["all"]
) is used to sum over the installed energy capacity. infrastruct is used to determine between existing and new installation. If you have existing capacities, the summation would be over both new and existing capacities.the proposed change would work. Alternatively you could also add an additional function like:
ts_data::ClustData,
opt_data::OptDataCEP,
scale::Dict{Symbol,Int})
## DATA ##
set=cep.set
#`techs::OptVariable`: techs[tech][tech_group] - OptDataCEPTech
techs = opt_data.techs
## INTRASTORAGE ##
# Set the storage level at the beginning of the first
push!(cep.info,"INTRASTOR[carrier,tech, '0', 1, node] = Σ_{infrastruct} CAP[tech,infrastruct,node] * 0.5 ∀ node, tech_storage, k")
@constraint(cep.model, [node=set["nodes"]["all"], tech=set["tech"]["storage"]], cep.model[:INTRASTOR][tech, techs[tech].input["carrier"], 0, 1, node]== sum(cep.model[:CAP][tech, infrastruct, node] for infrastruct=set["infrastruct"]["all"])*scale[:CAP]/scale[:INTRASTOR] * 0.5
return cep
end
theoretically the factor could also be part of the input.
@YoungFaithful
I'm trying to fix every day at an initial storage level of 50%. This is for the case of
simple
storage.I am looking at the function below in
opt.jl
.Limit the storage of the energy part of the battery to its installed power
: Is this limiting the energy part of the battery to its installed power, or to its installed energy capacity (I would hope the latter)?sum(cep.model[:CAP][tech, infrastruct, node] for infrastruct=set["infrastruct"]["all"])*scale[:CAP]/scale[:INTRASTOR]
? Why the sum over infrastruct, what are examples where it is summed over multiple infrastructs?sum(cep.model[:CAP][tech, infrastruct, node] for infrastruct=set["infrastruct"]["all"])*scale[:CAP]/scale[:INTRASTOR] / 0.5
. Anything I should be aware of with scaling?