OptimPriceStorage {ConConPiWiFun} | R Documentation |
Optimisation of storage operation with market prices taking into acount storage efficiency and network taxes.
OptimPriceStorage(Prices,Pplus,Pmoins,Cplus,Cmoins=0,
efficiencyS=0,efficiencyP=efficiencyS,networkTax=0)
Prices |
A vector of prices |
Pplus |
A value for the upper power constraint or a vector of values with the same size as Prices |
Pmoins |
A value for the lower power constraint or a vector of values with the same size as Prices |
Cplus |
A value for the upper capacity constraint or a vector of values with the same size as Prices |
Cmoins |
A value for the lower capacity constraint or a vector of values with the same size as Prices |
efficiencyS |
storage efficiency when storing electricity |
efficiencyP |
storage efficiency when producing electricity |
networkTax |
networkTax |
function OptimPriceStorage solves # min_x sum_i=1^n Y_i*efficiencyP x_i*(x_i<0)+(Y_i*efficiencyS +networkTax)*x_i*(x_i>0) # Pmoins_i<= x_i <=Pplus_i i=1,...,n # Cmoins_i<= sum_j=1^i x_j <=Cplus_i i=1,...,n
when efficiency=1 and networkTax=0 this gives # min_x sum_i=1^n Y_i x_i # Pmoins_i<= x_i <=Pplus_i i=1,...,n # Cmoins_i<= sum_j=1^i x_j <=Cplus_i i=1,...,n
A list with
Operation |
the optimal operation for each time step |
Revenue |
the revenue for each time step |
TODO
Robin Girard
TODO
to See Also cplfunction
(method OptimMargInt that is more general)
n=8760
Prices=runif(n,1,100) ##uniform random prices in [1;100] in Euro/MWh
Pmax=1; Pmin=-1; Cmax=5; ## 1MW maximum during 5 hours.
res=OptimPriceStorage(Prices,Pmax,Pmin,Cmax) # solving the optimization problem
sum(res$Revenue)## Revenue
res=OptimPriceStorage(Prices,Pmax,Pmin,Cmax,efficiencyS=0.8) # solving the optimization problem
sum(res$Revenue)## Revenue